From 315dd9e220fa4b63c713d12c8f08f01289a4aa68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Engstr=C3=B6m?= Date: Wed, 22 Apr 2020 23:10:40 +0200 Subject: [PATCH] Updated .tmux.conf to a modified private version. --- .tmux.conf | 163 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 144 insertions(+), 19 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 0088074..1a05897 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,26 +1,151 @@ -set-option -g prefix C-d -unbind-key C-a -bind-key C-g send-prefix -set -g base-index 1 -bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." +# set Zsh as your default Tmux shell +set-option -g default-shell /bin/zsh -setw -g mode-keys vi -setw -g mouse on +# UTF is great, let us use that +setw -gq utf8 on +set -gq status-utf8 on -set-option -g default-terminal screen-256color +# Tmux should be pretty, we need 256 color for that +set -g default-terminal "screen-256color" +# Tmux uses a 'control key', let's set it to 'Ctrl-d' +# Reason: 'Ctrl-d' is easier to reach than 'Ctrl-b' +set -g prefix C-d +unbind C-b + +# Use vi key bindings +set -g mode-keys vi +bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "wl-copy" +bind-key -T copy-mode-vi 'v' send -X begin-selection + +# command delay? We don't want that, make it short +set -sg escape-time 0 +set-option -g repeat-time 0 + +# Set the numbering of windows to go from 1 instead +# of 0 - silly programmers :| +set-option -g base-index 1 +setw -g pane-base-index 1 + +# Allow us to reload our Tmux configuration while +# using Tmux +bind r source-file ~/.tmux.conf \; display "Reloaded!" + +# We do our own naming +set-option -g allow-rename off + +# Bind keys for splitting bind-key v split-window -h -c "#{pane_current_path}" bind-key s split-window -v -c "#{pane_current_path}" -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R -bind-key H resize-pane -L 10 -bind-key J resize-pane -D 10 -bind-key K resize-pane -U 10 -bind-key L resize-pane -R 10 +# Move panes vim-style +bind-key -r -T prefix h select-pane -L +bind-key -r -T prefix j select-pane -D +bind-key -r -T prefix k select-pane -U +bind-key -r -T prefix l select-pane -R -setw -g monitor-activity on -set -g visual-activity on -set -g focus-events on +# Swap panes using shift +bind-key -r -T prefix H swap-pane -L +bind-key -r -T prefix J swap-pane -D +bind-key -r -T prefix K swap-pane -U +bind-key -r -T prefix L swap-pane -R + +# Resize by holding ctrl +bind-key -r -T prefix C-h resize-pane -L 10 +bind-key -r -T prefix C-j resize-pane -D 10 +bind-key -r -T prefix C-k resize-pane -U 10 +bind-key -r -T prefix C-l resize-pane -R 10 + +# Resize by holding META for more effect +bind-key -r -T prefix M-h resize-pane -L 30 +bind-key -r -T prefix M-j resize-pane -D 30 +bind-key -r -T prefix M-k resize-pane -U 30 +bind-key -r -T prefix M-l resize-pane -R 30 + +# Remove arrows, LEARN RIGHT! +unbind Up +unbind Down +unbind Left +unbind Right + +# History limit +set -g history-limit 10000 + +# turn on mouse mode +setw -g mouse on +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'" +bind -n WheelDownPane select-pane -t= \; send-keys -M + +###################### +#### DESIGN CHANGES ### +####################### + +# panes +set -g pane-border-style fg=black +set -g pane-active-border-style fg=brightred + +## Status bar design +# status line +set -g status-justify left +set -g status-style bg=default,fg=colour21 +set -g status-interval 2 + +# messaging +set -g message-style fg=black,bg=yellow +set -g message-command-style fg=blue,bg=black + +#window mode +setw -g mode-style bg=colour6,fg=colour0 + +# window status +setw -g window-status-format " #F#I:#W#F " +setw -g window-status-current-format " #F#I:#W#F " +setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " +setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " +setw -g window-status-current-style bg=colour0,fg=colour11,dim +setw -g window-status-style bg=green,fg=black,reverse + +# Info on left (I don't have a session display for now) +set -g status-left '' + +# loud or quiet? +set-option -g visual-activity off +set-option -g visual-bell off +set-option -g visual-silence off +set-window-option -g monitor-activity off +set-option -g bell-action none + +# The modes { +setw -g clock-mode-colour colour135 +setw -g mode-style fg=colour196,bg=colour238,bold + +# } +# The panes { + +set -g pane-border-style bg=colour235,fg=colour238 +set -g pane-active-border-style bg=colour236,fg=colour51 + +# } +# The statusbar { + +set -g status-position bottom +set -g status-style bg=colour234,fg=colour137,dim +set -g status-left '' +set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' +set -g status-right-length 50 +set -g status-left-length 20 + +setw -g window-status-current-style fg=colour81,bg=colour238,bold +setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' + +setw -g window-status-style fg=colour138,bg=colour235,none +setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' + +setw -g window-status-bell-style fg=colour255,bg=colour1,bold + +# } +# The messages { + +set -g message-style fg=colour232,bg=colour166,bold + +# }