diff --git a/theme.tmux b/theme.tmux new file mode 100644 index 0000000..1f815ba --- /dev/null +++ b/theme.tmux @@ -0,0 +1,33 @@ +# Left status style +if -b '[ "$WSL_DISTRO_NAME" != "" ]' \ + 'setw -g status-left " #(hostname)|#{WSL_DISTRO_NAME}|#{session_name}"' \ + 'setw -g status-left " #(hostname -s)|#{session_name}"' +setw -g status-left-style fg=colour240,bg=colour233 +setw -g status-left-length 32 + +# Centre status style +setw -g status-style fg=colour240,bg=colour233 + +# Right status style shows system info, date, and time. +setw -g status-right "#[fg=colour240]#(cat ~/.cache/tmux/system-info)#[fg=white] %a %d-%m-%y %H:%M " +setw -g status-right-style fg=white,bg=colour233 +if -b '[ "`uname`" != "Darwin" ]' \ + 'run "tmux setw -g status-right-length $((`nproc --all` + 48))"' + +# Active window status style +setw -g window-status-current-format " #{window_index}: #{window_name}" +setw -g window-status-current-style fg=white,bg=colour233 + +# Inactive window status style +setw -g window-status-format " #{window_index}: #{window_name}" +setw -g window-status-style fg=colour240,bg=colour233 + +# Pane border style +set -g pane-border-style fg=colour233,bg=colour233 +set -g pane-active-border-style fg=colour235,bg=colour235 + +# Command line window list selection +set-window-option -g mode-style fg=white,bg=colour237 +set-option -g message-style fg=white,bg=colour237 + +# vim: ft=tmux diff --git a/tmux.conf b/tmux.conf index c77230e..b1f01d5 100644 --- a/tmux.conf +++ b/tmux.conf @@ -145,34 +145,4 @@ if -b '[ "$WSLENV" = "" ]' \ 'bind -T copy-mode-vi y send-keys -X copy-pipe "xsel -i --clipboard"' \ 'bind -T copy-mode-vi y send-keys -X copy-pipe "win32yank.exe -i -crlf"' -# Left status style -if -b '[ "$WSL_DISTRO_NAME" != "" ]' \ - 'setw -g status-left " #(hostname)|#{WSL_DISTRO_NAME}|#{session_name}"' \ - 'setw -g status-left " #(hostname -s)|#{session_name}"' -setw -g status-left-style fg=colour240,bg=colour233 -setw -g status-left-length 32 - -# Centre status style -setw -g status-style fg=colour240,bg=colour233 - -# Right status style shows system info, date, and time. -setw -g status-right "#[fg=colour240]#(cat ~/.cache/tmux/system-info)#[fg=white] %a %d-%m-%y %H:%M " -setw -g status-right-style fg=white,bg=colour233 -if -b '[ "`uname`" != "Darwin" ]' \ - 'run "tmux setw -g status-right-length $((`nproc --all` + 48))"' - -# Active window status style -setw -g window-status-current-format " #{window_index}: #{window_name}" -setw -g window-status-current-style fg=white,bg=colour233 - -# Inactive window status style -setw -g window-status-format " #{window_index}: #{window_name}" -setw -g window-status-style fg=colour240,bg=colour233 - -# Pane border style -set -g pane-border-style fg=colour233,bg=colour233 -set -g pane-active-border-style fg=colour235,bg=colour235 - -# Command line window list selection -set-window-option -g mode-style fg=white,bg=colour237 -set-option -g message-style fg=white,bg=colour237 +source-file ~/.config/tmux/theme.tmux