1
0
Fork 0

fish, vim, neovim: remove powerline

This commit is contained in:
Von Random 2023-08-21 20:58:02 +03:00
parent 4255130bd5
commit 9be728d5d6
9 changed files with 51 additions and 44 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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', '<Leader>,', '<cmd>Telescope buffers<CR>')
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

View file

@ -33,11 +33,18 @@ nmap <Leader>ft :Filetypes<CR>
# 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 <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
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 <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
endif

View file

@ -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'