diff --git a/nvim/nvim.symlink/autoload/darkmodesocket.vim b/nvim/nvim.symlink/autoload/darkmodesocket.vim index f4808b3..fab8442 100644 --- a/nvim/nvim.symlink/autoload/darkmodesocket.vim +++ b/nvim/nvim.symlink/autoload/darkmodesocket.vim @@ -1,3 +1,14 @@ +function! darkmodesocket#updateTheme() + let is_dark_mode = system("isdark") + + if is_dark_mode == "true\n" + set background=dark + colorscheme maxbucknell_dark + else + set background=light + colorscheme maxbucknell_neo + endif +endfunction function! darkmodesocket#listenForLights() let pid = string(getpid()) diff --git a/nvim/nvim.symlink/init.vim b/nvim/nvim.symlink/init.vim index c350494..be7f564 100644 --- a/nvim/nvim.symlink/init.vim +++ b/nvim/nvim.symlink/init.vim @@ -152,17 +152,7 @@ syntax on " Enable file type detection. filetype plugin indent on -" Theme configuration -" Should make this a plugin that detects file changes somehow -let g:is_dark_mode = system("isdark") - -if g:is_dark_mode == "true\n" - set background=dark - colorscheme maxbucknell_dark -else - set background=light - colorscheme maxbucknell_neo -endif +call darkmodesocket#updateTheme() let g:go_def_mapping_enabled = 0