my-tmux-config/.tmux.conf

99 lines
3.2 KiB
Text
Raw Normal View History

2023-05-24 21:53:12 +00:00
### keybindings
2023-05-24 21:32:40 +00:00
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# Vi copypaste mode
set-window-option -g mode-keys vi
# set to main-horizontal, 60% height for main pane
bind m set-window-option main-pane-height 60\; select-layout main-horizontal
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
2023-05-24 21:53:12 +00:00
# set window split
bind-key v split-window -h
bind-key b split-window
2023-05-24 21:32:40 +00:00
# auto window rename
set-window-option -g automatic-rename
2023-05-24 22:37:22 +00:00
set -g status-interval 2
2023-05-24 21:53:12 +00:00
####################################
# new theme
set-window-option -g status-style bg=colour236,fg=white
2023-05-24 22:37:22 +00:00
# left
set-window-option -g status-left "#[bg=colour240,fg=white] #S #[fg=colour236,reverse]"
set-window-option -g status-left-length 40
# right
set-window-option -g status-right "#[fg=black,bg=colour76] #(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep time | awk '{print $4, $5}' | sed 's/hours/h/; s/minutes/m/; s/,/\./') #[bg=colour236,fg=white] #(tmux-mem-cpu-load --colors --interval 2) #[fg=colour252]#[fg=black,bg=colour252,nobold] %Y-%m-%d #[bold]%H:%M #[fg=colour231,bg=colour240] #H "
set-window-option -g status-right-length 80
# Status bar window currently active
set-window-option -g window-status-current-format "#[fg=colour236]#[default,bold] #I #[fg=colour123,reverse]#[default]#[bg=colour123] #W #[fg=colour236,reverse]"
# colour33 is green
set-window-option -g window-status-current-style none,bg=colour33,fg=black
# Status bar window in background (not active)
set-window-option -g window-status-format "#[fg=colour236,nounderscore]#[default,bold,nounderscore] #I #[fg=colour240,reverse]#[default]#[bg=colour240]#[nounderscore] #[default]#[fg=colour231,bg=colour240]#W#[nounderscore] #[fg=colour236,reverse]"
# Black on green
set-window-option -g window-status-style none,bg=colour76,fg=black
#
# Status bar window last active (Tmux 1.8+)
#
set-window-option -g window-status-last-style none,bg=cyan,fg=black
#
# Status bar window with activity/silence (monitor-activity, monitor-silence)
#
# colour127 is pink
set-window-option -g window-status-activity-style bold,bg=colour127,fg=black
#
# Status bar window with bell triggered
#
# red is urgent
set-window-option -g window-status-bell-style bold,bg=red,fg=black
######
# notes
# battery status
#(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep time | awk '{print $4, $5}' | sed 's/hours/h/; s/minutes/m/; s/,/\./')
2023-05-24 21:53:12 +00:00
2023-05-24 22:37:22 +00:00
# uptime
#(uptime -p |sed 's/\ week/w/; s/\ days/d/; s/\ day/d/; s/\ hours/h/; s/\ minutes/m/; s/\ minute/m/; s/,//g; s/up//')
2023-05-24 21:53:12 +00:00
2023-05-24 22:37:22 +00:00
# load
#(cat /proc/loadavg | awk '{print $1,$2,$3}')
2023-05-24 21:32:40 +00:00