From d53b1a3a2599caba5a7b85eff626bbd705b40f3f Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Wed, 5 Feb 2020 17:28:50 +0100 Subject: [PATCH] lightline & tmuxline tweaks --- conf/tmux.conf | 18 +++++++++--------- vim/init.vim | 31 ++++--------------------------- 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/conf/tmux.conf b/conf/tmux.conf index e4c7ad2..2f015ee 100644 --- a/conf/tmux.conf +++ b/conf/tmux.conf @@ -39,18 +39,18 @@ bind - split-window -v set -g status-justify "left" set -g status "on" set -g status-left-style "none" -set -g message-command-style "fg=colour231,bg=colour31" +set -g message-command-style "fg=colour231,bg=colour240" set -g status-right-style "none" -set -g pane-active-border-style "fg=colour254" -set -g status-style "none,bg=colour234" -set -g message-style "fg=colour231,bg=colour31" +set -g pane-active-border-style "fg=colour148" +set -g status-style "none,bg=colour236" +set -g message-style "fg=colour231,bg=colour240" set -g pane-border-style "fg=colour240" set -g status-right-length "100" set -g status-left-length "100" setw -g window-status-activity-style "none" setw -g window-status-separator "" -setw -g window-status-style "none,fg=colour250,bg=colour234" -set -g status-left "#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold,nounderscore,noitalics]" -set -g status-right "#[fg=colour236,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236] %Y-%m-%d  %H:%M #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #h " -setw -g window-status-format "#[fg=colour244,bg=colour234] #I #[fg=colour250,bg=colour234] #W " -setw -g window-status-current-format "#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W #[fg=colour31,bg=colour234,nobold,nounderscore,noitalics]" +setw -g window-status-style "none,fg=colour245,bg=colour236" +set -g status-left "#[fg=colour22,bg=colour148,bold] #S #[fg=colour148,bg=colour236,nobold,nounderscore,noitalics]" +set -g status-right "#[fg=colour240,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour250,bg=colour240] %Y-%m-%d | %H:%M #[fg=colour252,bg=colour240,nobold,nounderscore,noitalics]#[fg=colour241,bg=colour252] #h " +setw -g window-status-format "#[fg=colour245,bg=colour236] #I #[fg=colour245,bg=colour236] #W " +setw -g window-status-current-format "#[fg=colour236,bg=colour240,nobold,nounderscore,noitalics]#[fg=colour231,bg=colour240] #I #[fg=colour231,bg=colour240] #W #[fg=colour240,bg=colour236,nobold,nounderscore,noitalics]" diff --git a/vim/init.vim b/vim/init.vim index d2a4a35..4e55af6 100644 --- a/vim/init.vim +++ b/vim/init.vim @@ -82,42 +82,19 @@ let g:syntastic_puppet_puppetlint_args = "--no-80chars-check --no-autoloader_lay let g:lightline = { \ 'active': { \ 'left': [ [ 'mode', 'paste' ], - \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ], + \ [ 'fugitive', 'readonly', 'filename' ] ], \ 'right': [ [ 'lineinfo' ], \ [ 'percent' ], - \ [ 'fileencoding' ] ] + \ [ 'filetype' ] ] \ }, \ 'component_function': { \ 'fugitive': 'LightLineFugitive', \ 'readonly': 'LightLineReadonly', - \ 'modified': 'LightLineModified' - \ }, - \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, - \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, - \ 'tabline_separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, - \ 'tabline_subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } + \ 'modified': 'LightLineModified'} \ } -function! LightLineModified() - if &filetype == "help" - return "" - elseif &modified - return "+" - elseif &modifiable - return "" - else - return "" - endif -endfunction - function! LightLineReadonly() - if &filetype == "help" || &filetype == "gitcommit" - return "" - elseif &readonly - return "" - else - return "" - endif + return &readonly && &filetype !=# 'help' ? 'RO' : '' endfunction function! LightLineFugitive()