Files
daniel fusser beeefb13a7 initial commit
2026-06-21 15:35:58 +02:00

177 lines
5.5 KiB
Bash

# .tmuxrc
# set-option -g default-shell /bin/mksh
set-option -g focus-events on
set -s escape-time 0
set -g detach-on-destroy off
set -g destroy-unattached off
# set -g default-terminal "screen-256color"
set -g default-terminal "tmux-256color"
set -g history-limit 50000
set -g bell-action any
set -g base-index 0
set -g set-titles on
set -g set-titles-string "#W #T"
set -g display-time 8000
set -g status-interval 2
# set -g set-remain-on-exit off
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g window-size latest
set-option -sa terminal-overrides ',screen-256color:RGB'
set-option -sa terminal-overrides ',st-256color:RGB'
set -g renumber-windows on
# set-window-option -g aggressive-resize on
set-window-option -g xterm-keys on
set-option -g focus-events
set-option -sa terminal-overrides ',foot:RGB'
# foot
set-option -sa terminal-overrides ',foot:RGB'
# keybinds
unbind-key -a
set -g default-terminal "xterm-256color"
# set-option -ga terminal-overrides ',xterm-256color:Tc
set-option -sa terminal-features ',xterm-256color:RGB'
# Undercurl
set-option -g default-terminal "tmux-256color"
set-option -ga terminal-features ",xterm-256color:usstyle"
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# set -g prefix ^A
# bind b send-prefix
bind b set-option status
bind B set-option status
bind-key : command-prompt
bind -n C-PPage copy-mode -u
# bind -t vi-copy -n C-PPage page-up
# bind -t vi-copy -n C-NPage page-down
bind p paste-buffer
bind P choose-buffer
bind V copy-mode
bind -n C-F11 switch-client -p
bind -n C-F12 switch-client -n
unbind Tab
bind Tab select-pane -D
unbind BTab
bind BTab select-pane -U
bind S choose-window "join-pane -v -s "%%""
bind '"' choose-window
bind -n C-t new-window -c "#{pane_current_path}"
bind t new-window
bind T new-window -c "#{pane_current_path}"
# bind -n C-t new-window -c "#{pane_current_path}"
bind | split-window -h
bind & split-window
bind s split-window -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind -n S-left swap-window -t -1
bind -n S-right swap-window -t +1
bind -n F11 prev
bind -n F12 next
bind ^C new-window
bind c new-window
bind C command-prompt "new-window -n %%"
bind V command-prompt "new-session -s %%"
bind l choose-window
bind ^P previous-window
bind p previous-window
bind ^N next-window
bind n next-window
bind " " last-window
bind b set-option status
bind / command-prompt -p "find" "find-window %%"
bind h new-window 'exec htop'
bind H split-window 'exec htop'
# mouse
set -g mouse on
# bind -T root MouseDrag1Border resize-pane -M # default
# bind -T root MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= "#{pane_in_mode}" "copy-mode -M" "send-keys -M"' 'copy-mode -M' # default
# bind -T root MouseDown1Pane select-pane -t=\; send-keys -M # default
# bind -T root MouseDown3Pane select-pane -t= -m # default
# bind -T root MouseDown3Pane if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t= -m'
# unbind -T root WheelUpPane
# unbind -T root WheelDownPane
# bind -T root MouseDown1Status select-window -t= # default
# bind -T root MouseDown2Status kill-window
# theme
set -g status-fg white
set -g status-bg default
set -g status-style bg=default
set -g status-left ''
set -g status-right ' #[fg=black]> #[fg=black]#H'
set -g status-justify right
setw -g window-status-format ' #[fg=black]#W'
setw -g window-status-current-format '#[fg=black]>#[fg=yellow]#W'
# fix ncurses crash
set -as terminal-overrides ',st*:Ss@'
set-option -sa terminal-overrides ",xterm*:Tc"
# Undercurl
# set -g default-terminal '${TERM}'
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
set -as terminal-features ",foot*:RGB"
# Move statusbar to the top
set-option -g status "on"
set-option -g status-position top
# Use current directory as window title but allow manual renaming
set-option -g allow-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Monitoring
setw -g monitor-activity off
set -g visual-activity off
setw -g monitor-silence 0
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
set-option -g renumber-windows on
# frappe colors
COL_FG="#838ba7"
COL_BG_MEDIUM="#303446"
COL_BG_DARK="#292c3c"
COL_BG_VERY_DARK="#232634"
# new
COL_FG=color240
COL_BG_MEDIUM=default
COL_BG_DARK=default
COL_BG_VERY_DARK=default
set -g status-left-style "none"
set -g message-command-style "fg=$COL_FG,bg=$COL_BG_DARK"
set -g status-right-style "none"
set -g status-style "none,bg=$COL_BG_VERY_DARK"
set -g message-style "fg=$COL_FG,bg=$COL_BG_DARK"
set-option -g status-style "none,fg=$COL_FG,bg=$COL_BG_VERY_DARK"
set-option -g status-justify "left"
# window-status-activity-attr is reverse by default, which means bg and fg are switched
set-window-option -g window-status-activity-style none
set-window-option -g window-status-separator ''
set -g status-left "#[fg=$COL_FG,bg=$COL_BG_DARK] #S #[fg=$COL_BG_DARK,bg=$COL_BG_VERY_DARK] "
set -g status-right "#[fg=color230] #h "
activity_color="#{?window_activity_flag,colour1,$COL_FG}"
status_color="#{?window_silence_flag,colour3,${activity_color}}"
set-window-option -g window-status-current-format "#[fg=$COL_BG_DARK] #{window_index} #[fg=color230]#{window_name} #[fg=$COL_BG_MEDIUM]"
set-window-option -g window-status-format "#[fg=$COL_BG_DARK,bg=$COL_BG_VERY_DARK]#[fg=${status_color},bg=$COL_BG_DARK] #{window_index} #{window_name} #[fg=$COL_BG_DARK,bg=$COL_BG_VERY_DARK]"
set -g pane-active-border-style bg=default,fg=color240
set -g pane-border-style fg=color240