diff options
author | Shubham Saini <pryr@pryr.xyz> | 2022-05-20 19:19:37 +0000 |
---|---|---|
committer | Shubham Saini <pryr@pryr.xyz> | 2022-05-20 19:19:37 +0000 |
commit | 2ce4fbab0eee785d915d8f347186065299ab05e0 (patch) | |
tree | 6102781c0e9aa48836b2777a63c0d23fe6ad558b /nvim | |
parent | 9dd1e4ab3f3f28c90156f76ff531f5a9756528c3 (diff) |
darwin: automatic theme change
Diffstat (limited to 'nvim')
-rwxr-xr-x | nvim/.config/nvim/colors/jellybeans.vim | 1 | ||||
-rwxr-xr-x | nvim/.config/nvim/colors/pencil.vim | 2 | ||||
-rwxr-xr-x | nvim/.config/nvim/init.vim | 16 |
3 files changed, 17 insertions, 2 deletions
diff --git a/nvim/.config/nvim/colors/jellybeans.vim b/nvim/.config/nvim/colors/jellybeans.vim index 73a0d98..bae6c69 100755 --- a/nvim/.config/nvim/colors/jellybeans.vim +++ b/nvim/.config/nvim/colors/jellybeans.vim | |||
@@ -88,6 +88,7 @@ endif | |||
88 | " - g:jellybeans_use_gui_italics (default = 1) | 88 | " - g:jellybeans_use_gui_italics (default = 1) |
89 | " - g:jellybeans_use_term_italics (default = 0) | 89 | " - g:jellybeans_use_term_italics (default = 0) |
90 | 90 | ||
91 | let s:background_color = "NONE" | ||
91 | let s:background_color = "000000" | 92 | let s:background_color = "000000" |
92 | 93 | ||
93 | if exists("g:jellybeans_overrides") | 94 | if exists("g:jellybeans_overrides") |
diff --git a/nvim/.config/nvim/colors/pencil.vim b/nvim/.config/nvim/colors/pencil.vim index 75c6ab2..6ec59a5 100755 --- a/nvim/.config/nvim/colors/pencil.vim +++ b/nvim/.config/nvim/colors/pencil.vim | |||
@@ -65,7 +65,7 @@ endif | |||
65 | " Colors | 65 | " Colors |
66 | let s:black = { "gui": "#212121", "cterm": "NONE" } | 66 | let s:black = { "gui": "#212121", "cterm": "NONE" } |
67 | let s:medium_gray = { "gui": "#767676", "cterm": "243" } | 67 | let s:medium_gray = { "gui": "#767676", "cterm": "243" } |
68 | let s:white = { "gui": "#F1F1F1", "cterm": "15" } | 68 | let s:white = { "gui": "#F1F1F1", "cterm": "NONE" } |
69 | let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } | 69 | let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } |
70 | let s:light_black = { "gui": "#424242", "cterm": "235" } | 70 | let s:light_black = { "gui": "#424242", "cterm": "235" } |
71 | let s:lighter_black = { "gui": "#545454", "cterm": "240" } | 71 | let s:lighter_black = { "gui": "#545454", "cterm": "240" } |
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index ee7fddf..ff1a0c5 100755 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim | |||
@@ -13,13 +13,14 @@ Plug 'plasticboy/vim-markdown' | |||
13 | Plug 'vuciv/vim-bujo' | 13 | Plug 'vuciv/vim-bujo' |
14 | Plug 'lervag/vimtex' | 14 | Plug 'lervag/vimtex' |
15 | Plug 'metakirby5/codi.vim' | 15 | Plug 'metakirby5/codi.vim' |
16 | Plug 'hashivim/vim-terraform' | ||
16 | call plug#end() | 17 | call plug#end() |
17 | 18 | ||
18 | " sets | 19 | " sets |
19 | set guicursor= | 20 | set guicursor= |
20 | set number relativenumber | 21 | set number relativenumber |
21 | set mouse=a | 22 | set mouse=a |
22 | set background=dark | 23 | "set background=dark |
23 | syntax enable | 24 | syntax enable |
24 | set cursorline | 25 | set cursorline |
25 | set ignorecase | 26 | set ignorecase |
@@ -38,8 +39,21 @@ colorscheme pencil | |||
38 | "hi Normal ctermbg=16 guibg=#000000 | 39 | "hi Normal ctermbg=16 guibg=#000000 |
39 | "hi LineNr ctermbg=16 guibg=#000000 | 40 | "hi LineNr ctermbg=16 guibg=#000000 |
40 | 41 | ||
42 | " Change background based on macos theme | ||
43 | let output = system("defaults read -g AppleInterfaceStyle") | ||
44 | if v:shell_error != 0 | ||
45 | set background=light | ||
46 | colorscheme plain | ||
47 | else | ||
48 | set background=dark | ||
49 | colorscheme pencil | ||
50 | endif | ||
51 | |||
41 | let mapleader=" " | 52 | let mapleader=" " |
42 | 53 | ||
54 | " Reload vimrc | ||
55 | nnoremap <leader>sv :source $VIMRC<CR> | ||
56 | |||
43 | " Alias write and quit to Q | 57 | " Alias write and quit to Q |
44 | nnoremap <leader>q :wq<CR> | 58 | nnoremap <leader>q :wq<CR> |
45 | nnoremap <leader>w :w<CR> | 59 | nnoremap <leader>w :w<CR> |