From b8805c6f9717e0d6740b0e8672cfdea46371f957 Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Thu, 25 May 2023 00:57:51 +0200 Subject: [PATCH] bw/data new tmux theme for sophie --- data/users/files/tmux/sophie.conf | 110 ++++++++++++------------------ 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/data/users/files/tmux/sophie.conf b/data/users/files/tmux/sophie.conf index d8c2819..cf385ec 100644 --- a/data/users/files/tmux/sophie.conf +++ b/data/users/files/tmux/sophie.conf @@ -1,39 +1,4 @@ -# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf -set-option -g status-style bg=colour235,fg=colour136 - -# set window split -bind-key v split-window -h -bind-key b split-window - -# default window title colors -set-window-option -g window-status-style fg=colour39,bg=default,dim - -# active window title colors -set-window-option -g window-status-current-style fg=colour235,bg=colour113,bright - -# pane border -set-option -g pane-border-style fg=colour235 #base02 -set-option -g pane-active-border-style fg=colour240 #base01 - -# message text -set-option -g message-style bg=colour235 #base02 -set-option -g message-style fg=colour166 #orange - -# pane number display -set-option -g display-panes-active-colour colour33 #blue -set-option -g display-panes-colour colour166 #orange -# clock -set-window-option -g clock-mode-colour green #green - - -set -g status-interval 1 -set -g status-justify left # center align window list -set -g status-left-length 14 -set -g status-right-length 140 -#set -g status-left '#[default]〘 ' -set -g status-left '#[fg=green,bright]#(uname -r | cut -c 1-8)#[default]〘' -set -g status-right "〙#[fg=red,bg=default]⇑#(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//') #[fg=green,bg=default]⎋ #(cat /proc/loadavg | awk '{print $1,$2,$3}') #[fg=blue] %Y-%m-%d #[fg=white,bg=default] %H:%M #[fg=green] #H" - +### keybindings # C-b is not acceptable -- Vim uses it set-option -g prefix C-a bind-key C-a last-window @@ -44,12 +9,12 @@ 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 +# 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 to send commands to a TMUX session inside +# Allows us to use C-a a to send commands to a TMUX session inside # another TMUX session bind-key a send-prefix @@ -59,17 +24,7 @@ set -g visual-activity on # Vi copypaste mode set-window-option -g mode-keys vi -#bind-key -t vi-copy 'v' begin-selection -#bind-key -t vi-copy 'y' copy-selection -#/home/sophie/.tmux.conf:68: usage: bind-key [-cnr] [-T key-table] key command [arguments] [0/0] - - -# hjkl pane traversal -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R # set to main-horizontal, 60% height for main pane bind m set-window-option main-pane-height 60\; select-layout main-horizontal @@ -79,28 +34,51 @@ 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..." +# set window split +bind-key v split-window -h +bind-key b split-window + # auto window rename set-window-option -g automatic-rename -# color -set -g default-terminal "tmux-256color" +set -g status-interval 2 -# status bar -#set-option -g status-utf8 on +#################################### +# new theme -# https://github.com/edkolev/dots/blob/master/tmux.conf -# Updates for tmux 1.9's current pane splitting paths. +set-window-option -g status-style bg=colour236,fg=white +# 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=colour208]#(uptime -p |sed 's/\ week/w/; s/\ day/d/; s/\ hour/h/; s/\ minute/m/; s/s//g; s/,//g; s/up//') #[bg=colour236,fg=white] #(cat /proc/loadavg | awk '{print $1,$2,$3}') #[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]" -# from powerline -run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')" -run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')" +# Black on green +set-window-option -g window-status-style none,bg=colour76,fg=black -# rm mouse mode fail -if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\) -o #{$TMUX_VERSION_MAJOR} -gt 2' 'set -g mouse off' -if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 1\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set -g mode-mouse off' +# +# Status bar window last active (Tmux 1.8+) +# -# fix pane_current_path on new window and splits -if-shell "#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)" 'unbind c; bind c new-window -c "#{pane_current_path}"' -if-shell "#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)" "unbind '\"'; bind '\"' split-window -v -c '#{pane_current_path}'" -if-shell "#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)" 'unbind v; bind v split-window -h -c "#{pane_current_path}"' -if-shell "#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)" 'unbind %; bind % split-window -h -c "#{pane_current_path}"' +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