fish, vim, neovim: remove powerline
This commit is contained in:
parent
4255130bd5
commit
9be728d5d6
9 changed files with 51 additions and 44 deletions
|
@ -1,13 +1,13 @@
|
||||||
if ! string match -eq linux $TERM
|
if ! string match -eq linux $TERM
|
||||||
set prompt_sep \ue0b0
|
set prompt_bang \n\u266a\
|
||||||
set prompt_bang \n\ (set_color brred)\u266a\
|
|
||||||
set git_sign \ue0a0
|
set git_sign \ue0a0
|
||||||
else
|
else
|
||||||
set prompt_bang \n\ (set_color brred)\#\
|
set prompt_bang \n\#\
|
||||||
set git_sign g
|
set git_sign g
|
||||||
end
|
end
|
||||||
|
|
||||||
set color_fg brwhite
|
# git symbols and colors
|
||||||
set color_user 222222
|
# [1] unstaged, [2] staged, [3] untracked, [4] conflicts
|
||||||
set color_git_branch 3c3c3c
|
set symbol_git \~ + ! \*
|
||||||
set color_git yellow blue red purple
|
set color_git yellow blue red purple
|
||||||
|
set color_git_branch brblack
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set -g prompt_string
|
set -g prompt_string
|
||||||
set -g prev_color
|
set -g prev_color
|
||||||
|
prompt.add \[
|
||||||
prompt.user
|
prompt.user
|
||||||
prompt.add blue (prompt_pwd)
|
prompt.add (prompt_pwd) blue
|
||||||
prompt.git
|
prompt.git
|
||||||
prompt.add normal $prompt_bang
|
prompt.add \]
|
||||||
|
prompt.add $prompt_bang brred
|
||||||
|
|
||||||
echo $prompt_string
|
echo $prompt_string
|
||||||
set -e prompt_string
|
set -e prompt_string
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
function prompt.add
|
function prompt.add
|
||||||
set -l color $argv[1]
|
set -l text $argv[1]
|
||||||
set -l text $argv[2]
|
set -l color $argv[2]
|
||||||
set -l sep ''
|
if test -n "$color"
|
||||||
if test -n "$prompt_sep"
|
set value (set_color $color)$text(set_color normal)
|
||||||
set sep (set_color $prev_color)$prompt_sep(set_color $color_fg)
|
else
|
||||||
set prev_color $color
|
set value $text
|
||||||
end
|
end
|
||||||
if test -z "$prompt_string"
|
if test -z "$prompt_string"
|
||||||
set prompt_string (set_color -b $color)(set_color $color_fg) $text
|
set prompt_string $value
|
||||||
else
|
else
|
||||||
set -a prompt_string (set_color -b $color)$sep $text
|
set -a prompt_string $value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
14
cli/.config/fish/functions/prompt.add.pl.fish
Normal file
14
cli/.config/fish/functions/prompt.add.pl.fish
Normal 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
|
|
@ -6,7 +6,7 @@ function prompt.git
|
||||||
set git_branch (string match -r '[^# .]+' "$line")
|
set git_branch (string match -r '[^# .]+' "$line")
|
||||||
string match -qr '\[behind' $line && set git_branch "$git_branch?"
|
string match -qr '\[behind' $line && set git_branch "$git_branch?"
|
||||||
string match -qr '\[ahead' $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
|
else
|
||||||
string match -qr "^.[MD]" "$line" && set git_count[1] (math $git_count[1] + 1)
|
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)
|
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)
|
string match -qr "^[ADU]{2}" "$line" && set git_count[4] (math $git_count[4] + 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
test -n "$git_count[1]" && prompt.add "$color_git[1]" "~$git_count[1]"
|
test -n "$git_count[1]" && prompt.add "$git_count[1]$symbol_git[1]" "$color_git[1]"
|
||||||
test -n "$git_count[2]" && prompt.add "$color_git[2]" "+$git_count[2]"
|
test -n "$git_count[2]" && prompt.add "$git_count[2]$symbol_git[2]" "$color_git[2]"
|
||||||
test -n "$git_count[3]" && prompt.add "$color_git[3]" "!$git_count[3]"
|
test -n "$git_count[3]" && prompt.add "$git_count[3]$symbol_git[3]" "$color_git[3]"
|
||||||
test -n "$git_count[4]" && prompt.add "$color_git[4]" "*$git_count[4]"
|
test -n "$git_count[4]" && prompt.add "$git_count[4]$symbol_git[4]" "$color_git[4]"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function prompt.user
|
function prompt.user
|
||||||
if test -n "$SSH_CONNECTION" || string match -qe root "$USER"
|
if test -n "$SSH_CONNECTION" || string match -qe root "$USER"
|
||||||
prompt.add $color_user $USER@$hostname
|
prompt.add $USER@$hostname
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,18 +25,11 @@ end
|
||||||
if require('packer_init').init(plugins) then return end
|
if require('packer_init').init(plugins) then return end
|
||||||
|
|
||||||
--[[ plugins config ]]
|
--[[ 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{
|
require('lualine').setup{
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = false,
|
||||||
section_separators = lualine_section_separators,
|
section_separators = { left = nil, right = nil },
|
||||||
component_separators = lualine_component_separators
|
component_separators = { left = '|', right = '|' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +41,6 @@ map('n', '<Leader>,', '<cmd>Telescope buffers<CR>')
|
||||||
vim.o.bg = 'dark'
|
vim.o.bg = 'dark'
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
vim.g.gruvbox_transp_bg = 1
|
|
||||||
vim.g.gruvbox_plugin_hi_groups = 1
|
vim.g.gruvbox_plugin_hi_groups = 1
|
||||||
vim.g.gruvbox_filetype_hi_groups = 1
|
vim.g.gruvbox_filetype_hi_groups = 1
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,18 @@ nmap <Leader>ft :Filetypes<CR>
|
||||||
# lightline
|
# lightline
|
||||||
g:lightline = {
|
g:lightline = {
|
||||||
colorscheme: 'gruvbox8',
|
colorscheme: 'gruvbox8',
|
||||||
separator: { left: "\ue0b0", right: "\ue0b2"},
|
separator: { left: "", right: ""},
|
||||||
subseparator: { left: "\u2022", right: "\u2022"}
|
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_plugin_hi_groups = 1
|
||||||
g:gruvbox_filetype_hi_groups = 1
|
g:gruvbox_filetype_hi_groups = 1
|
||||||
&t_8f = "\u1b[38;2;%lu;%lu;%lum"
|
&t_8f = "\u1b[38;2;%lu;%lu;%lum"
|
||||||
|
@ -45,11 +52,3 @@ g:gruvbox_filetype_hi_groups = 1
|
||||||
&tgc = 1
|
&tgc = 1
|
||||||
&bg = 'dark'
|
&bg = 'dark'
|
||||||
colorscheme gruvbox8
|
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
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local wt = require('wezterm')
|
local wt = require('wezterm')
|
||||||
local act = wt.action
|
local act = wt.action
|
||||||
local font = 'VascadiaModL'
|
local font = 'VascadiaMod'
|
||||||
local harfbuzz_features = nil
|
local harfbuzz_features = nil
|
||||||
local fontsizes = { Darwin = 14, others = 11 }
|
local fontsizes = { Darwin = 14, others = 11 }
|
||||||
local theme = 'GruvboxDark'
|
local theme = 'GruvboxDark'
|
||||||
|
|
Loading…
Reference in a new issue