summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Saini <pryr@pryr.xyz>2022-05-20 19:19:37 +0000
committerShubham Saini <pryr@pryr.xyz>2022-05-20 19:19:37 +0000
commit2ce4fbab0eee785d915d8f347186065299ab05e0 (patch)
tree6102781c0e9aa48836b2777a63c0d23fe6ad558b
parent9dd1e4ab3f3f28c90156f76ff531f5a9756528c3 (diff)
darwin: automatic theme change
-rwxr-xr-xnvim/.config/nvim/colors/jellybeans.vim1
-rwxr-xr-xnvim/.config/nvim/colors/pencil.vim2
-rwxr-xr-xnvim/.config/nvim/init.vim16
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
91let s:background_color = "NONE"
91let s:background_color = "000000" 92let s:background_color = "000000"
92 93
93if exists("g:jellybeans_overrides") 94if 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
66let s:black = { "gui": "#212121", "cterm": "NONE" } 66let s:black = { "gui": "#212121", "cterm": "NONE" }
67let s:medium_gray = { "gui": "#767676", "cterm": "243" } 67let s:medium_gray = { "gui": "#767676", "cterm": "243" }
68let s:white = { "gui": "#F1F1F1", "cterm": "15" } 68let s:white = { "gui": "#F1F1F1", "cterm": "NONE" }
69let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } 69let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" }
70let s:light_black = { "gui": "#424242", "cterm": "235" } 70let s:light_black = { "gui": "#424242", "cterm": "235" }
71let s:lighter_black = { "gui": "#545454", "cterm": "240" } 71let 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'
13Plug 'vuciv/vim-bujo' 13Plug 'vuciv/vim-bujo'
14Plug 'lervag/vimtex' 14Plug 'lervag/vimtex'
15Plug 'metakirby5/codi.vim' 15Plug 'metakirby5/codi.vim'
16Plug 'hashivim/vim-terraform'
16call plug#end() 17call plug#end()
17 18
18" sets 19" sets
19set guicursor= 20set guicursor=
20set number relativenumber 21set number relativenumber
21set mouse=a 22set mouse=a
22set background=dark 23"set background=dark
23syntax enable 24syntax enable
24set cursorline 25set cursorline
25set ignorecase 26set 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
43let output = system("defaults read -g AppleInterfaceStyle")
44if v:shell_error != 0
45 set background=light
46 colorscheme plain
47else
48 set background=dark
49 colorscheme pencil
50endif
51
41let mapleader=" " 52let mapleader=" "
42 53
54" Reload vimrc
55nnoremap <leader>sv :source $VIMRC<CR>
56
43" Alias write and quit to Q 57" Alias write and quit to Q
44nnoremap <leader>q :wq<CR> 58nnoremap <leader>q :wq<CR>
45nnoremap <leader>w :w<CR> 59nnoremap <leader>w :w<CR>