Remove old code from colors.vim

This is now all in colors.lua
This commit is contained in:
Talia 2024-08-05 08:20:13 +02:00
parent 90632d9d27
commit 06caadc9e6
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -1,11 +1,5 @@
let g:only_generic_hl=1 let g:only_generic_hl=1
function! s:wez_color(value)
let g:__color = a:value
lua vim.g.__color = vim.base64.encode(vim.g.__color)
call chansend(v:stderr, "\x1b]1337;SetUserVar=bgcolor=".g:__color."\x07")
endfun
function! s:term_bg_color() function! s:term_bg_color()
let l:num_color=synIDattr(hlID("normal"), "bg") let l:num_color=synIDattr(hlID("normal"), "bg")
if $TERM=="xterm-kitty" || $KITTY_LISTEN_ON != "" if $TERM=="xterm-kitty" || $KITTY_LISTEN_ON != ""
@ -19,8 +13,6 @@ function! s:term_bg_color()
call jobstart('kitty @ --to $KITTY_LISTEN_ON set-colors background="'.l:color.'"') call jobstart('kitty @ --to $KITTY_LISTEN_ON set-colors background="'.l:color.'"')
call jobstart("cat ".$HOME."/darkrc/kitty_".&bg.".conf | grep cursor | sed -e 's/ /=/' | xargs -L 1 kitty @ --to $KITTY_LISTEN_ON set-colors") call jobstart("cat ".$HOME."/darkrc/kitty_".&bg.".conf | grep cursor | sed -e 's/ /=/' | xargs -L 1 kitty @ --to $KITTY_LISTEN_ON set-colors")
end end
elseif $TERM_PROGRAM=="WezTerm"
call <SID>wez_color(l:num_color)
end end
endfun endfun
@ -36,42 +28,9 @@ function! s:term_bg_color_reset()
let l:file = $HOME."/darkrc/kitty_light.conf" let l:file = $HOME."/darkrc/kitty_light.conf"
end end
call system("kitty @ --to ".$KITTY_LISTEN_ON." set-colors ".l:file) call system("kitty @ --to ".$KITTY_LISTEN_ON." set-colors ".l:file)
elseif $TERM_PROGRAM=="WezTerm"
end end
endfun endfun
augroup termcolors augroup termcolors
au VimLeavePre * call <SID>term_bg_color_reset() au VimLeavePre * call <SID>term_bg_color_reset()
augroup END augroup END
com! Dark silent! let g:colors_name_bak = g:colors_name
\ | 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
com! Light silent! let g:colors_name_bak = g:colors_name
\ | 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
if filereadable($HOME."/.dark")
Dark
else
Light
end
if $TERM=="xterm-kitty" || match($TERM, '-256color$')
set termguicolors
if &bg=="dark"
colorscheme sierra
else
colorscheme PaperColor
end
end