Set initial colorscheme on debian hosts
This commit is contained in:
parent
4dba4f2bb0
commit
8bd8ce698c
1 changed files with 20 additions and 13 deletions
|
|
@ -1,9 +1,6 @@
|
||||||
-- {{ ansible_managed }}
|
-- {{ ansible_managed }}
|
||||||
|
|
||||||
-- set the colorscheme whenever the background setting changes
|
local background_callback = function()
|
||||||
vim.api.nvim_create_autocmd({'OptionSet'}, {
|
|
||||||
pattern = {'background'},
|
|
||||||
callback = function()
|
|
||||||
if vim.o.background == 'dark' then
|
if vim.o.background == 'dark' then
|
||||||
vim.cmd('colorscheme github_dark_dimmed')
|
vim.cmd('colorscheme github_dark_dimmed')
|
||||||
else
|
else
|
||||||
|
|
@ -12,8 +9,18 @@ vim.api.nvim_create_autocmd({'OptionSet'}, {
|
||||||
|
|
||||||
-- force a full redraw:
|
-- force a full redraw:
|
||||||
vim.cmd('mode')
|
vim.cmd('mode')
|
||||||
end
|
end
|
||||||
})
|
|
||||||
|
-- set the colorscheme whenever the background setting changes
|
||||||
|
vim.api.nvim_create_autocmd(
|
||||||
|
{ 'OptionSet' },
|
||||||
|
{ pattern = { 'background' }, callback = background_callback }
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
{% if ansible_facts['os_family'] == 'Debian' %}
|
||||||
|
background_callback()
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if ansible_facts['os_family'] == 'Archlinux' %}
|
{% if ansible_facts['os_family'] == 'Archlinux' %}
|
||||||
--[[
|
--[[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue