# Configured by claw0ry # change default meta key unbind C-b unbind C-a set -g prefix C-b # use a different prefix for nested bind-key -n C-y send-prefix # allow mouse set -g mouse on bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" # tmux-sessioniser bind-key -r f run-shell "tmux neww ~/.local/scripts/tmux-sessionizer" # escape time set-option -sg escape-time 10 # focus-events set-option -g focus-events on # avoid cursor movement messing with resize set -g repeat-time 200 set -g base-index 1 setw -g pane-base-index 1 # true-color (24bit) set -g default-terminal "tmux-256color" set -sg terminal-overrides ",*:RGB" set-window-option -g mode-keys vi bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel # add double-tap meta key to toggle last window bind-key C-b last-window # create more intuitive split key combos (same as modern screen) unbind "'" bind "'" split-window -h -c "#{pane_current_path}" bind '\' split-window -h -c "#{pane_current_path}" bind 'C-\' split-window -h -c "#{pane_current_path}" unbind - bind - split-window -v -c "#{pane_current_path}" unbind _ bind _ split-window -v -c "#{pane_current_path}" # vi for copy mode setw -g mode-keys vi # vi for command status set -g status-keys vi # vi keys to resize bind -r C-k resize-pane -U 5 bind -r C-j resize-pane -D 5 bind -r C-h resize-pane -L 5 bind -r C-l resize-pane -R 5 # vi keys to navigate panes bind -r k select-pane -U bind -r j select-pane -D bind -r h select-pane -L bind -r l select-pane -R # reload configuration bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" # Reorder windows bind R move-window -r; # Fix Home/End keys bind-key -n Home send Escape "OH" bind-key -n End send Escape "OF" # very unique Mac bug if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'" # === STATUSBAR set-option -g status-justify left set-option -g status-left-length 20 setw -g automatic-rename on set -g base-index 1 # -- Gruber Darker set -g status-bg "#181818" set -g status-fg "#f4f4ff" set -g status-style "bg=#181818,none,align=left" set -g message-style "fg=#aeafb0,bg=#181818" set -g message-command-style "fg=#aeafb0,bg=#181818" set -g pane-border-style "fg=#57575e,bg=#181818" set -g pane-active-border-style "fg=#57575e,bg=#181818" set -g pane-border-status bottom set -g pane-border-format '─' set -g mode-style "fg=#dfdfe5,bg=#2f0e82" set -g window-style "bg=#181818" set -g window-active-style "bg=#181818" setw -g window-status-style "fg=#aeafb0,bg=black,none" setw -g window-status-activity-style "fg=magenta,bg=#181818,none" setw -g window-status-separator "" set-window-option -g window-status-format ' #[fg=white,dim]#I:#W#F ' set-window-option -g window-status-current-format ' #[bg=#ffdd33,fg=black] #I#[bg=#ffdd33,fg=black]:#[fg=black]#W#[fg=dim]#F ' set -g status-left-style "none" set -g status-right-style "none" set -g status-left-length "100" set -g status-right-length "100" set-option -g status-left ' #[fg=blue]•#[fg=green]•#[fg=yellow]•#[fg=red]•#[fg=#57575e]' set -g status-right '[%d-%m-%Y %H:%M]'