diff --git a/etc/shell_prompt.sh b/etc/shell_prompt.sh index 71ced3d..9593daa 100644 --- a/etc/shell_prompt.sh +++ b/etc/shell_prompt.sh @@ -71,7 +71,7 @@ function __promptline_cwd { local first_char local part_count=0 local formatted_cwd="" - local dir_sep=" " + local dir_sep=" " local tilde="~" local cwd="${PWD/#$HOME/$tilde}" @@ -155,10 +155,10 @@ function __promptline { fi local wrap="$noprint$esc" end_wrap="$end_esc$end_noprint" local space=" " - local sep="" - local rsep="" - local alt_sep="" - local alt_rsep="" + local sep="" + local rsep="" + local alt_sep="" + local alt_rsep="" local reset="${wrap}0${end_wrap}" local reset_bg="${wrap}49${end_wrap}" local a_fg="${wrap}38;5;240${end_wrap}" diff --git a/etc/tmuxline.conf b/etc/tmuxline.conf index 2dab5b4..efd0675 100644 --- a/etc/tmuxline.conf +++ b/etc/tmuxline.conf @@ -1,5 +1,5 @@ # This tmux statusbar config was created by tmuxline.vim -# on Tue, 19 Mar 2019 +# on 三, 20 3月 2019 set -g status-justify "left" set -g status "on" @@ -22,7 +22,7 @@ setw -g window-status-activity-attr "none" setw -g window-status-activity-fg "#e4e4e4" setw -g window-status-separator "" setw -g window-status-bg "#005f87" -set -g status-left "#[fg=#585858,bg=#e4e4e4] #S #[fg=#e4e4e4,bg=#005f87,nobold,nounderscore,noitalics]" -set -g status-right "#[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]#[fg=#eeeeee,bg=#005f87] %Y-%m-%d #[fg=#0087af,bg=#005f87,nobold,nounderscore,noitalics]#[fg=#e4e4e4,bg=#0087af] %H:%M:%S #[fg=#e4e4e4,bg=#0087af,nobold,nounderscore,noitalics]#[fg=#585858,bg=#e4e4e4] #(ifconfig | grep inet[^6] | awk -F'[: ]+' '{print $3,$4}' | sed 's/netmask//; s/addr//; s/ //' | grep -v '127.0.0.1' | grep -v '^10.0') " -setw -g window-status-format "#[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]#[default] #I #W #[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]" -setw -g window-status-current-format "#[fg=#005f87,bg=#0087af,nobold,nounderscore,noitalics]#[fg=#e4e4e4,bg=#0087af] #I #W #F #[fg=#0087af,bg=#005f87,nobold,nounderscore,noitalics]" +set -g status-left "#[fg=#585858,bg=#e4e4e4] #S #[fg=#e4e4e4,bg=#005f87,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]#[fg=#eeeeee,bg=#005f87] %Y-%m-%d #[fg=#0087af,bg=#005f87,nobold,nounderscore,noitalics]#[fg=#e4e4e4,bg=#0087af] %H:%M:%S #[fg=#e4e4e4,bg=#0087af,nobold,nounderscore,noitalics]#[fg=#585858,bg=#e4e4e4] #(ifconfig | grep inet[^6] | awk -F'[: ]+' '{print $3,$4}' | sed 's/netmask//; s/addr//; s/ //' | grep -v '127.0.0.1' | grep -v '^10.0') " +setw -g window-status-format "#[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]#[default] #I #W #[fg=#005f87,bg=#005f87,nobold,nounderscore,noitalics]" +setw -g window-status-current-format "#[fg=#005f87,bg=#0087af,nobold,nounderscore,noitalics]#[fg=#e4e4e4,bg=#0087af] #I #W #F #[fg=#0087af,bg=#005f87,nobold,nounderscore,noitalics]" diff --git a/etc/vimrc.vim b/etc/vimrc.vim index f8d3d52..066d7fc 100644 --- a/etc/vimrc.vim +++ b/etc/vimrc.vim @@ -34,6 +34,12 @@ syn on syn enable set t_Co=256 +let g:left_sep="\uE0B4" +let g:left_alt_sep="\uE0B5" +let g:right_sep="\uE0B6" +let g:right_alt_sep="\uE0B7" +let g:dir_sep="\uE0B5" + "fonts from https://github.com/ryanoasis/nerd-fonts if (has("nvim")) @@ -219,7 +225,7 @@ noremap <c-m> :LeaderfMru<cr> noremap <c-n> :LeaderfFunction<cr> let g:Lf_WorkingDirectory = g:root_dir let g:Lf_MruMaxFiles = 64 -let g:Lf_StlSeparator = { 'left': "\uE0B8", 'right': "\uE0B9", 'font': '' } +let g:Lf_StlSeparator = { 'left': g:left_sep, 'right': g:right_sep, 'font': '' } let g:Lf_WindowHeight = 0.30 let g:Lf_CacheDirectory = expand('~/.vim/cache') let g:Lf_ShowRelativePath = 1 @@ -278,10 +284,10 @@ inoremap <m-n> <c-\><c-o>:PreviewSignature!<cr> "airline{ let g:airline_powerline_fonts = 1 -let g:airline_left_sep="\uE0B8" -let g:airline_left_alt_sep="\uE0B9" -let g:airline_right_sep="\uE0BA" -let g:airline_right_alt_sep="\uE0BB" +let g:airline_left_sep=g:left_sep +let g:airline_left_alt_sep=g:left_alt_sep +let g:airline_right_sep=g:right_sep +let g:airline_right_alt_sep=g:right_alt_sep let g:airline_section_z = airline#section#create(["\uE0A1" . '%{line(".")}' . "\uE0A3" . '%{col(".")}']) let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#show_buffers = 0 @@ -296,13 +302,13 @@ let g:airline#extensions#default#layout = [ "promptline{ ":PromptlineSnapshot! ~/.local/etc/shell_prompt.sh airline let g:promptline_symbols = { - \ 'left' : "\uE0B8", - \ 'left_alt' : "\uE0B9", - \ 'right' : "\uE0BA", - \ 'right_alt' : "\uE0BB", - \ 'dir_sep' : " \uE0BF ", - \ 'truncation' : "...", - \ 'vcs_branch' : "\uE0A0 "} + \ 'left' : g:left_sep, + \ 'left_alt' : g:left_alt_sep, + \ 'right' : g:right_sep, + \ 'right_alt' : g:right_alt_sep, + \ 'dir_sep' : " ".g:dir_sep." ", + \ 'truncation' : "...", + \ 'vcs_branch' : "\uE0A0 "} if !empty(globpath(&rtp, "promptline.vim")) let g:promptline_preset = { \ 'a' : [ promptline#slices#user() ], @@ -315,10 +321,10 @@ endif ":Tmuxline airline ":TmuxlineSnapshot! ~/.local/etc/tmuxline.conf let g:tmuxline_separators = { - \ 'left' : "\uE0B8", - \ 'left_alt' : "\uE0B9", - \ 'right' : "\uE0BA", - \ 'right_alt': "\uE0BB"} + \ 'left' : g:left_sep, + \ 'left_alt' : g:left_alt_sep, + \ 'right' : g:right_sep, + \ 'right_alt': g:right_alt_sep} let g:tmuxline_preset = { \'a' : '#S',