Browse Source

meta: update term colours and have vim use only 16

master
sentriz 1 month ago
parent
commit
d3e34aba31
No known key found for this signature in database GPG Key ID: 9A8DAE1CA907B862
8 changed files with 145 additions and 72 deletions
  1. +0
    -3
      .gitmodules
  2. +2
    -0
      conf_common/.config/fish/interactive.laptop.fish
  3. +68
    -35
      conf_common/.config/nvim/conf_appearance.vim
  4. +0
    -13
      conf_common/.config/nvim/conf_lang_server.vim
  5. +0
    -1
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone
  6. +1
    -18
      conf_extra/.config/foot/foot.ini
  7. +2
    -2
      conf_extra/.config/sway/config
  8. +72
    -0
      conf_extra/bin/theme

+ 0
- 3
.gitmodules View File

@@ -37,9 +37,6 @@
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-surround"]
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-surround
url = https://github.com/tpope/vim-surround
[submodule "conf_common/.local/share/nvim/site/pack/look/opt/Lokaltog/vim-monotone"]
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone
url = https://github.com/Lokaltog/vim-monotone
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/sentriz/vim-print-debug"]
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-print-debug
url = https://github.com/sentriz/vim-print-debug


+ 2
- 0
conf_common/.config/fish/interactive.laptop.fish View File

@@ -1,5 +1,7 @@
set -gx fish_colour_host 'brgreen'

theme dark

function p --argument project
cd "$DOTS_PROJECTS_DIR/$project"
end


+ 68
- 35
conf_common/.config/nvim/conf_appearance.vim View File

@@ -1,45 +1,78 @@
" tree sitter will highlight
syntax off

let g:monotone_color = [10, 3, 100]
let g:monotone_secondary_hue_offset = 0
colorscheme monotone

highlight Directory gui=bold
highlight Normal guibg=none
highlight QuickFixLine guibg=#444444
highlight Pmenu guifg=#a5a1a0 guibg=#444444
highlight mkdLineBreak guifg=none guibg=none
highlight yamlKey gui=bold
highlight jsExport gui=bold

" paren/block matching
highlight clear ParenMatch
highlight clear MatchParen
highlight MatchParen gui=bold,reverse guifg=#413e3d guibg=#f9d39e

" diffing
highlight link diffAdded DiffAdd
highlight link diffRemoved DiffDelete
highlight DiffAdd guifg=#4e9a06
highlight DiffDelete guifg=#cc0000

" basics
set listchars=tab:>\ ,trail:.
set fillchars=vert:\ ,eob:\
set sidescroll=1
set noshowmode
set laststatus=2
set signcolumn=number
set termguicolors
set mouse+=a

" here trying to ask vim to only use the terminal's 16 ansi colours. then the
" theme is switched for the terminal and vim at the same time with the script
" $ theme <dark|light>
set t_Co=16
set notermguicolors
set background=dark

syntax off
syntax reset

for gr in getcompletion('', 'highlight')
execute 'highlight clear ' .. gr
endfor

highlight LineNr ctermfg=8
highlight Visual ctermfg=0 ctermbg=15
highlight Search ctermfg=0 ctermbg=11
highlight IncSearch ctermfg=0 ctermbg=11
highlight StatusLine ctermfg=15 ctermbg=0
highlight StatusLineNC ctermfg=15 ctermbg=NONE
highlight CursorLine ctermfg=0 ctermbg=11

highlight link diffAdded DiffAdd
highlight link diffRemoved DiffDelete
highlight DiffAdd ctermfg=2
highlight DiffDelete ctermfg=1

highlight TSKeyword cterm=bold
highlight TSKeywordOperator cterm=bold
highlight TSKeywordFunction cterm=bold
highlight TSKeywordReturn cterm=bold
highlight TSType cterm=bold
highlight TSTypeBuiltin cterm=bold
highlight TSRepeat cterm=bold
highlight TSFunction cterm=bold
highlight TSOperator cterm=bold
highlight TSInclude cterm=bold
highlight TSConditional cterm=bold

highlight TSString ctermfg=15
highlight TSComment ctermfg=8 cterm=italic

highlight Pmenu ctermfg=15 ctermbg=0
highlight PmenuSel ctermfg=0 ctermbg=15

sign define LspDiagnosticsSignError text=ee texthl=LspDiagnosticsSignError
sign define LspDiagnosticsSignWarning text=ww texthl=LspDiagnosticsSignWarning
sign define LspDiagnosticsSignInformation text=ii texthl=LspDiagnosticsSignInformation
sign define LspDiagnosticsSignHint text=hh texthl=LspDiagnosticsSignHint

highlight LspDiagnosticsSignError ctermfg=1
highlight LspDiagnosticsSignWarning ctermfg=3
highlight LspDiagnosticsSignInformation ctermfg=15
highlight LspDiagnosticsSignHint ctermfg=2

highlight LspDiagnosticsFloatingError ctermfg=15 cterm=bold
highlight LspDiagnosticsFloatingWarning ctermfg=15 cterm=bold
highlight LspDiagnosticsFloatingInformation ctermfg=15 cterm=bold
highlight LspDiagnosticsFloatingHint ctermfg=15 cterm=bold

" statusline
highlight statusReadOnly gui=underline guifg=#f99e9e
highlight statusModifided gui=underline guifg=#f99e9e
highlight statusReadOnly ctermfg=9 ctermbg=0
highlight statusModifided ctermfg=9 ctermbg=0

set statusline=
set statusline+=%#statusReadOnly#%{&readonly?'read\ only\ ':''}%* " read only flag
set statusline+=%{pathshorten(@%)}
set statusline+=%#statusModifided#%{&modified?'\ \ modified':''}%* " modified flag
set statusline+=%= " /
set statusline+=\ column\ %c " column number
set statusline+=%#statusReadOnly#%{&readonly?'\ \ read\ only\ ':''}%* " read only flag
set statusline+=\ %{pathshorten(@%)}\
set statusline+=%#statusModifided#%{&modified?'\ modified\ ':''}%* " modified flag
set statusline+=%= " /
set statusline+=\ column\ %c " column number

+ 0
- 13
conf_common/.config/nvim/conf_lang_server.vim View File

@@ -28,16 +28,3 @@ augroup AutoFormat
autocmd!
autocmd BufWritePre * lua require("nvim-lsp-compose").write()
augroup END

sign define LspDiagnosticsSignError text=ee texthl=LspDiagnosticsSignError
sign define LspDiagnosticsSignWarning text=ww texthl=LspDiagnosticsSignWarning
sign define LspDiagnosticsSignInformation text=ii texthl=LspDiagnosticsSignInformation
sign define LspDiagnosticsSignHint text=hh texthl=LspDiagnosticsSignHint

highlight link LspDiagnosticsFloatingError LspDiagnosticsFloatingError
highlight link NormalFloat Pmenu

highlight def link LspReference CursorLine
highlight def link LspReferenceText CursorLine
highlight def link LspReferenceWrite CursorLine
highlight def link LspReferenceRead CursorLine

+ 0
- 1
conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone

@@ -1 +0,0 @@
Subproject commit 5393343ff2d639519e4bcebdb54572dfe5c35686

+ 1
- 18
conf_extra/.config/foot/foot.ini View File

@@ -10,24 +10,7 @@ lines=20000
[mouse]

[colors]
background=303030
foreground=f7f7f7
regular0=000000
regular1=cc0000
regular2=4e9a06
regular3=c4a000
regular4=3465a4
regular5=75507b
regular6=06989a
regular7=d3d7cf
bright0=555753
bright1=ef2929
bright2=8ae234
bright3=fce94f
bright4=729fcf
bright5=ad7fa8
bright6=34e2e2
bright7=eeeeec
background=353535

[csd]



+ 2
- 2
conf_extra/.config/sway/config View File

@@ -31,8 +31,8 @@ set $up_block_2 pkill -RTMIN+2 i3blocks
set $up_block_3 pkill -RTMIN+3 i3blocks
set $up_block_4 pkill -RTMIN+4 i3blocks

set $colour_grey #303030
set $colour_grey_alpha #30303060
set $colour_grey #353535
set $colour_grey_alpha #35353560
set $colour_blue #0088CC
set $colour_red #BC5858
set $colour_inactive #8D8D8D


+ 72
- 0
conf_extra/bin/theme View File

@@ -0,0 +1,72 @@
#!/usr/bin/env bash

# shellcheck disable=SC2059

if test $# -ne 1; then
echo "please provide a <dark|light>" >&2
exit 1
fi

printf_template="\033]4;%d;#%s\033\\"
printf_template_var="\033]%d;#%s\033\\"
if [[ -n "$TMUX" ]]; then
printf_template="\033Ptmux;\033\033]4;%d;#%s\007\033\\"
printf_template_var="\033Ptmux;\033\033]%d;#%s\007\033\\"
fi

function dark() {
printf "$printf_template" \
0 "5f5f5f" \
1 "d96468" \
2 "a2d964" \
3 "d9c964" \
4 "64a2d9" \
5 "9a64d9" \
6 "64d9d5" \
7 "989898" \
8 "828282" \
9 "d98f93" \
10 "b8d98f" \
11 "d9cf8f" \
12 "8f99d9" \
13 "b08fd9" \
14 "8fd9d5" \
15 "c5c5c5"

# fg bg cursor
printf "$printf_template_var" \
10 "f1f3f3" \
11 "353535" \
12 "93a1a1"
}

function light() {
printf "$printf_template" \
0 "3a3e4b" \
1 "18a3a7" \
2 "ff5daf" \
3 "5f75ff" \
4 "df7004" \
5 "2e9f3b" \
6 "ff5b3e" \
7 "c1bdb2" \
8 "5e594d" \
9 "4dd4ce" \
10 "ff8bd8" \
11 "8ea0ff" \
12 "ff9a35" \
13 "5fce69" \
14 "ff896c" \
15 "757575"

# fg bg cursor
printf "$printf_template_var" \
10 "565e65" \
11 "f3f4f5" \
12 "565e65"
}

case "$1" in
"dark") dark ;;
"light") light ;;
esac

Loading…
Cancel
Save