diff --git a/cli/.config/fish/conf.d/prompt.fish b/cli/.config/fish/conf.d/prompt.fish index a6b7836..fb88e85 100644 --- a/cli/.config/fish/conf.d/prompt.fish +++ b/cli/.config/fish/conf.d/prompt.fish @@ -1,13 +1,13 @@ if ! string match -eq linux $TERM - set prompt_sep \ue0b0 - set prompt_bang \n\ (set_color brred)\u266a\ + set prompt_bang \n\u266a\ set git_sign \ue0a0 else - set prompt_bang \n\ (set_color brred)\#\ + set prompt_bang \n\#\ set git_sign g end -set color_fg brwhite -set color_user 222222 -set color_git_branch 3c3c3c +# git symbols and colors +# [1] unstaged, [2] staged, [3] untracked, [4] conflicts +set symbol_git \~ + ! \* set color_git yellow blue red purple +set color_git_branch brblack diff --git a/cli/.config/fish/functions/fish_prompt.fish b/cli/.config/fish/functions/fish_prompt.fish index cf683ec..c38ba06 100644 --- a/cli/.config/fish/functions/fish_prompt.fish +++ b/cli/.config/fish/functions/fish_prompt.fish @@ -1,10 +1,12 @@ function fish_prompt set -g prompt_string set -g prev_color + prompt.add \[ prompt.user - prompt.add blue (prompt_pwd) + prompt.add (prompt_pwd) blue prompt.git - prompt.add normal $prompt_bang + prompt.add \] + prompt.add $prompt_bang brred echo $prompt_string set -e prompt_string diff --git a/cli/.config/fish/functions/prompt.add.fish b/cli/.config/fish/functions/prompt.add.fish index 5da49fa..fa28bf1 100644 --- a/cli/.config/fish/functions/prompt.add.fish +++ b/cli/.config/fish/functions/prompt.add.fish @@ -1,14 +1,14 @@ function prompt.add - set -l color $argv[1] - set -l text $argv[2] - set -l sep '' - if test -n "$prompt_sep" - set sep (set_color $prev_color)$prompt_sep(set_color $color_fg) - set prev_color $color + set -l text $argv[1] + set -l color $argv[2] + if test -n "$color" + set value (set_color $color)$text(set_color normal) + else + set value $text end if test -z "$prompt_string" - set prompt_string (set_color -b $color)(set_color $color_fg) $text + set prompt_string $value else - set -a prompt_string (set_color -b $color)$sep $text + set -a prompt_string $value end end diff --git a/cli/.config/fish/functions/prompt.add.pl.fish b/cli/.config/fish/functions/prompt.add.pl.fish new file mode 100644 index 0000000..b53d54d --- /dev/null +++ b/cli/.config/fish/functions/prompt.add.pl.fish @@ -0,0 +1,14 @@ +function prompt.add.pl + set -l color $argv[1] + set -l text $argv[2] + set -l sep '' + if test -n "$prompt_sep" + set sep (set_color $prev_color)$prompt_sep(set_color $color_fg) + set prev_color $color + end + if test -z "$prompt_string" + set prompt_string (set_color -b $color)(set_color $color_fg) $text + else + set -a prompt_string (set_color -b $color)$sep $text + end +end diff --git a/cli/.config/fish/functions/prompt.git.fish b/cli/.config/fish/functions/prompt.git.fish index a457a89..f4c0710 100644 --- a/cli/.config/fish/functions/prompt.git.fish +++ b/cli/.config/fish/functions/prompt.git.fish @@ -6,7 +6,7 @@ function prompt.git set git_branch (string match -r '[^# .]+' "$line") string match -qr '\[behind' $line && set git_branch "$git_branch?" string match -qr '\[ahead' $line && set git_branch "$git_branch!" - prompt.add "$color_git_branch" "$git_sign $git_branch" + prompt.add "$git_sign $git_branch" "$color_git_branch" else string match -qr "^.[MD]" "$line" && set git_count[1] (math $git_count[1] + 1) string match -qr "^[MDARC]." "$line" && set git_count[2] (math $git_count[2] + 1) @@ -14,8 +14,8 @@ function prompt.git string match -qr "^[ADU]{2}" "$line" && set git_count[4] (math $git_count[4] + 1) end end - test -n "$git_count[1]" && prompt.add "$color_git[1]" "~$git_count[1]" - test -n "$git_count[2]" && prompt.add "$color_git[2]" "+$git_count[2]" - test -n "$git_count[3]" && prompt.add "$color_git[3]" "!$git_count[3]" - test -n "$git_count[4]" && prompt.add "$color_git[4]" "*$git_count[4]" + test -n "$git_count[1]" && prompt.add "$git_count[1]$symbol_git[1]" "$color_git[1]" + test -n "$git_count[2]" && prompt.add "$git_count[2]$symbol_git[2]" "$color_git[2]" + test -n "$git_count[3]" && prompt.add "$git_count[3]$symbol_git[3]" "$color_git[3]" + test -n "$git_count[4]" && prompt.add "$git_count[4]$symbol_git[4]" "$color_git[4]" end diff --git a/cli/.config/fish/functions/prompt.user.fish b/cli/.config/fish/functions/prompt.user.fish index cd0ae8f..b627674 100644 --- a/cli/.config/fish/functions/prompt.user.fish +++ b/cli/.config/fish/functions/prompt.user.fish @@ -1,5 +1,5 @@ function prompt.user if test -n "$SSH_CONNECTION" || string match -qe root "$USER" - prompt.add $color_user $USER@$hostname + prompt.add $USER@$hostname end end diff --git a/cli/.config/nvim/lua/plugins.lua b/cli/.config/nvim/lua/plugins.lua index cf705fc..01cd1f4 100644 --- a/cli/.config/nvim/lua/plugins.lua +++ b/cli/.config/nvim/lua/plugins.lua @@ -25,18 +25,11 @@ end if require('packer_init').init(plugins) then return end --[[ plugins config ]] -if os.getenv('TERM'):match('linux') then - lualine_section_separators = { left = nil, right = nil } - lualine_component_separators = { left = '|', right = '|' } -else - lualine_section_separators = nil - lualine_component_separators = { left = '\u{2022}', right = '\u{2022}' } -end require('lualine').setup{ options = { icons_enabled = false, - section_separators = lualine_section_separators, - component_separators = lualine_component_separators + section_separators = { left = nil, right = nil }, + component_separators = { left = '|', right = '|' } } } @@ -48,7 +41,6 @@ map('n', ',', 'Telescope buffers') vim.o.bg = 'dark' vim.o.termguicolors = true -vim.g.gruvbox_transp_bg = 1 vim.g.gruvbox_plugin_hi_groups = 1 vim.g.gruvbox_filetype_hi_groups = 1 diff --git a/cli/.vimplugrc b/cli/.vimplugrc index 91bfba7..dcccbc0 100644 --- a/cli/.vimplugrc +++ b/cli/.vimplugrc @@ -33,11 +33,18 @@ nmap ft :Filetypes # lightline g:lightline = { colorscheme: 'gruvbox8', - separator: { left: "\ue0b0", right: "\ue0b2"}, - subseparator: { left: "\u2022", right: "\u2022"} + separator: { left: "", right: ""}, + subseparator: { left: "|", right: "|"} } -g:gruvbox_transp_bg = 1 +if has('gui_running') + set guifont=VascadiaMod:h14 + set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor + set guiheadroom=0 guioptions=aei mouse=a + map + map! +endif + g:gruvbox_plugin_hi_groups = 1 g:gruvbox_filetype_hi_groups = 1 &t_8f = "\u1b[38;2;%lu;%lu;%lum" @@ -45,11 +52,3 @@ g:gruvbox_filetype_hi_groups = 1 &tgc = 1 &bg = 'dark' colorscheme gruvbox8 - -if has('gui_running') - set guifont=JetBrains\ Mono:h14 - set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor - set guiheadroom=0 guioptions=aei mouse=a - map - map! -endif diff --git a/gui/.wezterm.lua b/gui/.wezterm.lua index 9ffcdce..53f34bb 100644 --- a/gui/.wezterm.lua +++ b/gui/.wezterm.lua @@ -1,6 +1,6 @@ local wt = require('wezterm') local act = wt.action -local font = 'VascadiaModL' +local font = 'VascadiaMod' local harfbuzz_features = nil local fontsizes = { Darwin = 14, others = 11 } local theme = 'GruvboxDark'