Rework tmux status line
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
358d665ff0
commit
f6531c3d2c
2 changed files with 55 additions and 15 deletions
42
.config/tmux-collector.yml
Normal file
42
.config/tmux-collector.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
# Must match background color of bar or will look weird
|
||||||
|
base_bg_color: colour235
|
||||||
|
|
||||||
|
# Segments to display (first = left, last = right)
|
||||||
|
segments:
|
||||||
|
|
||||||
|
# Arch Linux: Check for Updates
|
||||||
|
- background_success: colour88
|
||||||
|
foreground_success: colour251
|
||||||
|
command: [bash, -c, 'echo "$(checkupdates | wc -l) Updates" | grep -v "^0 Updates" || true']
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
# Dropbox CLI: Check daemon status
|
||||||
|
- background_success: colour19
|
||||||
|
foreground_success: colour251
|
||||||
|
command: [bash, -c, 'dropbox.py status | head -n1 | grep -v "Up to date" || true']
|
||||||
|
interval: 30s
|
||||||
|
prefix: ""
|
||||||
|
|
||||||
|
# System: If present display battery status
|
||||||
|
- background_success: colour195
|
||||||
|
foreground_success: colour237
|
||||||
|
command: [tmux-battery]
|
||||||
|
|
||||||
|
# System: Display a stable subset of the uptime
|
||||||
|
- background_success: colour34
|
||||||
|
foreground_success: colour232
|
||||||
|
command: [bash, -c, 'uptime | cut -f 4-5 -d " " | cut -f 1 -d ","']
|
||||||
|
|
||||||
|
# Time
|
||||||
|
- background_success: colour235
|
||||||
|
foreground_success: colour250
|
||||||
|
command: ['date', '+%a, %H:%M:%S']
|
||||||
|
|
||||||
|
# Date
|
||||||
|
- background_success: colour235
|
||||||
|
foreground_success: colour69
|
||||||
|
command: ['date', '+%Y-%m-%d (KW %V)']
|
||||||
|
|
||||||
|
...
|
28
.tmux.conf
28
.tmux.conf
|
@ -4,19 +4,20 @@ set-option -g status-fg colour136 #yellow
|
||||||
set-option -g status-attr default
|
set-option -g status-attr default
|
||||||
|
|
||||||
# default window title colors
|
# default window title colors
|
||||||
set-window-option -g window-status-fg colour244 #base0
|
set-window-option -g window-status-fg colour235 #base0
|
||||||
set-window-option -g window-status-bg default
|
set-window-option -g window-status-bg colour244
|
||||||
#set-window-option -g window-status-attr dim
|
set-window-option -g window-status-format " #I:#W#F"
|
||||||
|
set-window-option -g window-status-separator ""
|
||||||
|
|
||||||
# active window title colors
|
# active window title colors
|
||||||
#set-window-option -g window-status-current-fg colour166 #orange
|
set-window-option -g window-status-current-fg colour248 #orange
|
||||||
set-window-option -g window-status-current-fg black #orange
|
set-window-option -g window-status-current-bg colour235
|
||||||
set-window-option -g window-status-current-bg default
|
set-window-option -g window-status-current-format " #I:#W#F"
|
||||||
#set-window-option -g window-status-current-attr bright
|
|
||||||
|
|
||||||
# pane border
|
# pane border
|
||||||
set-option -g pane-border-fg colour235 #base02
|
set-option -g pane-border-fg colour235 #base02
|
||||||
set-option -g pane-active-border-fg colour240 #base01
|
set-option -g pane-active-border-fg colour69 #base01
|
||||||
|
|
||||||
|
|
||||||
# message text
|
# message text
|
||||||
set-option -g message-bg colour235 #base02
|
set-option -g message-bg colour235 #base02
|
||||||
|
@ -33,8 +34,8 @@ set -g status-interval 1
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
set -g status-left-length 40
|
set -g status-left-length 40
|
||||||
set -g status-right-length 140
|
set -g status-right-length 140
|
||||||
set -g status-left '#[fg=green]#H#[default] '
|
set -g status-left '#[fg=colour234,bg=colour28] #H #[fg=colour28,bg=colour235]'
|
||||||
set -g status-right '#[fg=white,bg=red]#(tmux-reboot-required)#[default] #[fg=white,bg=default]#(tmux-battery)#[default] #[fg=green,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a, %H:%M:%S#[default] #[fg=blue,bright]%Y-%m-%d (KW %V) '
|
set -g status-right '#(tmux-collector -c /home/luzifer/.config/tmux-collector.yml)'
|
||||||
|
|
||||||
# C-b is not acceptable -- Vim uses it
|
# C-b is not acceptable -- Vim uses it
|
||||||
set-option -g prefix C-a
|
set-option -g prefix C-a
|
||||||
|
@ -46,6 +47,7 @@ bind C-a send-prefix
|
||||||
|
|
||||||
# Start numbering at 1
|
# Start numbering at 1
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
|
set -g pane-base-index 1
|
||||||
|
|
||||||
# Allows for faster key repetition
|
# Allows for faster key repetition
|
||||||
set -s escape-time 0
|
set -s escape-time 0
|
||||||
|
@ -59,9 +61,6 @@ setw -g aggressive-resize on
|
||||||
setw -g monitor-activity on
|
setw -g monitor-activity on
|
||||||
set -g visual-activity on
|
set -g visual-activity on
|
||||||
|
|
||||||
# Highlight active window
|
|
||||||
set-window-option -g window-status-current-bg green
|
|
||||||
|
|
||||||
# Vi copypaste mode
|
# Vi copypaste mode
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||||
|
@ -96,8 +95,7 @@ bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft=
|
||||||
# http://superuser.com/questions/401926/how-to-get-shiftarrows-and-ctrlarrows-working-in-vim-in-tmux
|
# http://superuser.com/questions/401926/how-to-get-shiftarrows-and-ctrlarrows-working-in-vim-in-tmux
|
||||||
set-window-option -g xterm-keys on
|
set-window-option -g xterm-keys on
|
||||||
|
|
||||||
set -g pane-base-index 1
|
# Allow to send tmux copy buffer to redpaste
|
||||||
|
|
||||||
bind C-y run "tmux save-buffer - | redpaste set"
|
bind C-y run "tmux save-buffer - | redpaste set"
|
||||||
|
|
||||||
# SSH Agent
|
# SSH Agent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue