dotfiles/dotfiles/tmux.conf

169 lines
4.2 KiB
Plaintext

# Options
# Set Prefix to Ctrl+a (screen like)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
## Default is 'screen'
set -sg default-terminal 'xterm-256color'
set-option -a terminal-overrides ",*256col*:RGB"
set -sg escape-time 1
set -sg set-clipboard on
set -g history-limit 100000
setw -g alternate-screen on
set -g renumber-windows on
set -g base-index 1
setw -g pane-base-index 1
set -g status on
set -g status-position bottom
set -g status-justify left
set -g status-interval 1
set -g status-left-length 20
set -g status-right-length 30
set -g set-titles on
set -g set-titles-string '#T'
setw -g allow-rename off
setw -g automatic-rename on
setw -g automatic-rename-format '#T'
set -g bell-action current
#set -g bell-on-alert off
setw -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
set -g mouse on
## Keyboard keybindings
bind -n 'S-Down' resize-pane -D 1
bind -n 'S-Up' resize-pane -U 1
bind -n 'S-Left' resize-pane -L 1
bind -n 'S-Right' resize-pane -R 1
#bind -n End send-key C-e
#bind -n Home send-key C-a
# Splitscreen mit Alt+Arrow wechseln
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind 'c' new-window
bind 'n' next
bind 'p' prev
bind 'b' swap-window -t -1
#urxvt tab like window switching (-n: no prior escape seq)
bind -n S-down new-window
bind -n S-left prev
bind -n S-right next
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1
## Splitting panes
bind 'h' split-window -v
bind 'v' split-window -h
## Mouse toggling
bind m \
set -g mouse on \;\
display 'Mouse: ON'
bind k \
set -g mouse off \;\
display 'Mouse: OFF'
set-window-option -g xterm-keys on
## TPM
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'ofirgall/tmux-window-name'
#set -g @plugin 'wfxr/tmux-power'
#set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
#set -g @plugin "janoamaral/tokyo-night-tmux"
#set -g @tmux_power_theme 'forest'
#set -g @tmux_power_theme '#483D8B'
#
# Tokyonight theme
#
# Status update interval
set -g status-interval 1
#
# Colors
#
tmux_status_bg=#232433
tmux_status_fg=colour7
#first set of side status
tmux_status_bg_1=colour8
tmux_status_fg_1=colour4
#second set of side status
tmux_status_bg_2=colour4
tmux_status_fg_2=colour0
tmux_accent=colour1
tmux_current_title_fg=colour2
tmux_activity_color=colour3
# Basic status bar colors
set -g status-style bg=$tmux_status_bg
# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 40
set -g status-left ""
# Right side of status bar
set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 150
# Left Window Status
set -g window-status-format "#[fg=$tmux_status_bg_1,bg=default]#[fg=$tmux_status_fg_1,bg=$tmux_status_bg_1] #I #[fg=default,bg=default] #W #[default]"
set -g window-status-current-format "#[fg=$tmux_status_bg_1,bg=default]#[fg=$tmux_accent,bg=$tmux_status_bg_1]  #[fg=$tmux_current_title_fg,bold] #W #[fg=$tmux_status_bg_1,bg=default]"
# Right Window Status
set-option -g status-right "#[fg=$tmux_status_bg_1,bg=default]#[fg=$tmux_status_fg_1,bg=$tmux_status_bg_1] %H:%M:%S #[fg=$tmux_status_bg_1,bg=default]"
set-option -ag status-right "#[fg=$tmux_status_bg_1,bg=default]#[fg=$tmux_status_fg_1,bg=$tmux_status_bg_1] %a %d.%m.%Y #[fg=$tmux_status_bg_1,bg=default]"
# Current window status
set -g window-status-current-style none
# Window with activity status
set -g window-status-activity-style bg="$tmux_status_bg",fg="$tmux_activity_color"
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify left
# Pane border
set -g pane-border-style bg=default,fg="$tmux_status_bg"
# Active pane border
set -g pane-active-border-style bg=default,fg="$tmux_status_bg_2"
# Pane number indicator
set -g display-panes-colour "$tmux_status_bg_2"
set -g display-panes-active-colour "$tmux_accent"
# Clock mode
set -g clock-mode-colour "$tmux_status_bg_2"
set -g clock-mode-style 24
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'