updated .tmux.conf

* added fancy weather indicator
* clipboard fix to adapt to both Wayland and X (whichever is active)
* added full date on status line (I never know what day it is)
* increase the width of the right part by two (2) points to fit it all in
This commit is contained in:
surtur 2020-04-29 12:12:40 +02:00
parent 20de46cafc
commit 0b13cb0f9c
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -13,7 +13,7 @@ set -g history-limit 1000000
setw -g mouse on setw -g mouse on
setw -g mode-keys vi setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i' bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'if [[ -z "$WAYLAND_DISPLAY" ]];then xclip -sel clip -i;else wl-copy;fi'
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle \; send-keys -X begin-selection bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle \; send-keys -X begin-selection
set -g @yank_selection 'primary' # or 'secondary' or 'clipboard' set -g @yank_selection 'primary' # or 'secondary' or 'clipboard'
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary' set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
@ -46,6 +46,7 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# https://github.com/tmux/tmux/issues/1246: # https://github.com/tmux/tmux/issues/1246:
set -g default-terminal "xterm-256color" set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc" set -ga terminal-overrides ",*256col*:Tc"
WEATHER='#(curl wttr.in/$DAT_WEATHER\?format\="3&period=60")'
# THEME # THEME
set -g status-bg black set -g status-bg black
@ -55,10 +56,10 @@ setw -g status-bg colour237
setw -g status-fg colour39 setw -g status-fg colour39
set -g status-interval 10 # redraw status line every n seconds set -g status-interval 10 # redraw status line every n seconds
set -g status-left-length 70 set -g status-left-length 70
set -g status-right-length 70 set -g status-right-length 72
set -g status-left '#[fg=green,bold](#S) '# #(whoami) ' set -g status-left '#[fg=green,bold](#S) '# #(whoami) '
#set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%a %H:%M#[default]' #set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%a %H:%M#[default]'
set -g status-right '#{battery_status_bg} #{battery_percentage} #{battery_remain} #[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[fg=white] %a %H:%M #[default]' set -g status-right "#{battery_status_bg} #{battery_percentage} #{battery_remain} #[fg=yellow]#(cut -d \" \" -f 1-3 /proc/loadavg) #[fg=colour4]$WEATHER #[fg=white]%a %Y-%m-%d %H:%M #[default]"
# List of plugins # List of plugins
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'