2020-05-18 14:32:01 +00:00
|
|
|
" For my patched version of the papercolor theme
|
|
|
|
let g:only_generic_hl=1
|
|
|
|
|
2020-08-17 13:54:59 +00:00
|
|
|
function! s:kitty_bg_color()
|
2021-12-21 14:45:37 +00:00
|
|
|
if $TERM=="xterm-kitty" || $KITTY_LISTEN_ON != ""
|
2020-08-17 13:54:59 +00:00
|
|
|
let l:num_color=synIDattr(hlID("normal"), "bg")
|
|
|
|
if l:num_color!=""
|
2023-05-08 13:51:51 +00:00
|
|
|
if match(l:num_color, "^\\d\\{3}$")==0
|
|
|
|
let l:color=system("kitty @ --to $KITTY_LISTEN_ON get-colors | grep 'color".l:num_color."'")
|
|
|
|
let l:color=l:color[match(l:color, "#"):]
|
|
|
|
elseif match(l:num_color, "^#\\x\\{6}$")==0
|
|
|
|
let l:color=l:num_color
|
|
|
|
end
|
2021-12-21 14:45:37 +00:00
|
|
|
call system('kitty @ --to $KITTY_LISTEN_ON set-colors background="'.l:color.'"')
|
|
|
|
call system("cat ".$HOME."/darkrc/kitty_".&bg.".conf | grep cursor | sed -e 's/ /=/' | xargs -L 1 kitty @ --to $KITTY_LISTEN_ON set-colors")
|
2020-08-17 13:54:59 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
endfun
|
2021-12-21 14:45:37 +00:00
|
|
|
|
2020-08-17 13:58:45 +00:00
|
|
|
augroup kitty
|
|
|
|
au ColorScheme * call <SID>kitty_bg_color()
|
|
|
|
augroup END
|
2020-08-17 13:54:59 +00:00
|
|
|
|
2020-08-19 16:41:42 +00:00
|
|
|
function! s:kitty_bg_color_reset()
|
|
|
|
if filereadable($HOME."/.dark")
|
|
|
|
let l:file = $HOME."/darkrc/kitty_dark.conf"
|
|
|
|
else
|
|
|
|
let l:file = $HOME."/darkrc/kitty_light.conf"
|
|
|
|
end
|
2021-12-21 14:45:37 +00:00
|
|
|
call system("kitty @ --to ".$KITTY_LISTEN_ON." set-colors ".l:file)
|
2020-08-19 16:41:42 +00:00
|
|
|
endfun
|
|
|
|
|
2021-12-21 14:45:37 +00:00
|
|
|
if $TERM=="xterm-kitty" || $KITTY_LISTEN_ON != ""
|
2020-08-19 15:57:36 +00:00
|
|
|
augroup kitty
|
2020-08-19 16:41:42 +00:00
|
|
|
au VimLeavePre * call <SID>kitty_bg_color_reset()
|
2020-08-19 15:57:36 +00:00
|
|
|
augroup END
|
2020-08-17 13:54:59 +00:00
|
|
|
end
|
|
|
|
|
2020-05-18 14:32:01 +00:00
|
|
|
com! Dark silent! let g:colors_name_bak = g:colors_name
|
2020-08-17 12:54:08 +00:00
|
|
|
\ | let g:ayucolor="dark"
|
|
|
|
\ | let g:arcadia_Daybreak=0
|
|
|
|
\ | let g:arcadia_Midnight=1
|
|
|
|
\ | let g:alduin_Shout_Become_Ethereal=1
|
|
|
|
\ | set bg=dark
|
|
|
|
\ | silent! exec "colorscheme ".g:colors_name_bak
|
|
|
|
\ | silent! delc PaperColor
|
2020-05-18 14:32:01 +00:00
|
|
|
com! Light silent! let g:colors_name_bak = g:colors_name
|
2020-08-17 12:54:08 +00:00
|
|
|
\ | let g:ayucolor="light"
|
|
|
|
\ | let g:arcadia_Daybreak=1
|
|
|
|
\ | let g:arcadia_Midnight=0
|
|
|
|
\ | let g:alduin_Shout_Become_Ethereal=0
|
|
|
|
\ | set bg=light
|
|
|
|
\ | silent! exec "colorscheme ".g:colors_name_bak
|
|
|
|
\ | silent! delc PaperColor
|
2020-05-18 14:32:01 +00:00
|
|
|
|
|
|
|
" Commands for some colorschemes I often use
|
|
|
|
com! Ayu colorscheme ayu
|
2020-10-28 16:06:20 +00:00
|
|
|
com! Arcadia colorscheme arcadia
|
2020-08-17 13:58:45 +00:00
|
|
|
com! Alduin colorscheme alduin
|
|
|
|
com! Moria colorscheme moria
|
|
|
|
com! Molokai colorscheme molokai
|
|
|
|
com! Iceberg colorscheme iceberg
|
|
|
|
com! Papercolor colorscheme PaperColor | delc PaperColor
|
|
|
|
com! Firewatch colorscheme two-firewatch
|
2020-08-17 12:56:50 +00:00
|
|
|
|
2020-08-17 15:27:04 +00:00
|
|
|
if filereadable($HOME."/.dark")
|
|
|
|
Dark
|
|
|
|
else
|
|
|
|
Light
|
|
|
|
end
|
|
|
|
|
2021-08-16 08:21:31 +00:00
|
|
|
if $TERM=="xterm-kitty" || match($TERM, '-256color$')
|
2020-10-28 16:06:20 +00:00
|
|
|
Arcadia
|
2020-08-17 12:56:50 +00:00
|
|
|
end
|