💾 Archived View for tilde.club › ~filip › tech › dotfiles › .tmux.conf captured on 2024-05-12 at 15:55:21.

View Raw

More Information

⬅️ Previous capture (2022-07-16)

-=-=-=-=-=-=-

######################
# MAIN CONFIGURATION #
######################

# KEY BINDINGS
# unbind default prefix and set it to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
## reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
## split window and fix path for tmux 1.9
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
## synchronize all panes in a window
bind y setw synchronize-panes
## pane movement shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
## resize pane shortcuts
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10

# MOUSE
## enable mouse support for switching panes/windows
setw -g mouse on

# COPY-PASE VIM MODE
setw -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'

# OTHER
## activity monitoring
setw -g monitor-activity off
set -g visual-activity off
## make delay shorter
set -sg escape-time 0

##################
# STYLE SETTINGS #
##################

# COLOR SCHEME
## enable 256 color mode
set -g default-terminal "screen-256color"
## nord color cheme
base00='#2e3440'
base01='#3b4252'
base02='#434c5e'
base03='#4c566a'
base04='#d8dee9'
base05='#e5e9f0'
base06='#eceff4'
base07='#8fbcbb'
base08='#88c0d0'
base09='#81a1c1'
base0A='#5e81ac'
base0B='#bf616a'
base0C='#d08770'
base0D='#ebcb8b'
base0E='#a3be8c'
base0F='#b48ead'
## previous color scheme
#base00=default   # - Default
#base01='#151515' # - Lighter Background (Used for status bars)
#base02='#202020' # - Selection Background
#base03='#909090' # - Comments, Invisibles, Line Highlighting
#base04='#505050' # - Dark Foreground (Used for status bars)
#base05='#D0D0D0' # - Default Foreground, Caret, Delimiters, Operators
#base06='#E0E0E0' # - Light Foreground (Not often used)
#base07='#F5F5F5' # - Light Background (Not often used)
#base08='#AC4142' # - Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
#base09='#D28445' # - Integers, Boolean, Constants, XML Attributes, Markup Link Url
#base0A='#F4BF75' # - Classes, Markup Bold, Search Text Background
#base0B='#90A959' # - Strings, Inherited Class, Markup Code, Diff Inserted
#base0C='#75B5AA' # - Support, Regular Expressions, Escape Characters, Markup Quotes
#base0D='#6A9FB5' # - Functions, Methods, Attribute IDs, Headings
#base0E='#AA759F' # - Keywords, Storage, Selector, Markup Italic, Diff Changed
#base0F='#8F5536' # - Deprecated, Opening/Closing Embedded Language Tags, e.g. <? php ?>

# STATUS BAR
## status bar position
set -g status-position top
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
## status content
tm_session_name="#[default,bg=$base00,fg=$base0A][#S] "
set -g status-left "$tm_session_name"
#tm_battery="#[fg=$base0F,bg=$base00] #(battery)"
tm_date="#[default,bg=$base00,fg=$base0E] %R"
tm_host="#[fg=$base0E,bg=$base00] #h "
set -g status-right "$tm_date $tm_host"
## default statusbar colors
set-option -g status-style fg=$base02,bg=$base00,default

# WINDOWS
## title all windows
unbind =
bind = select-layout titled
## index windows starting with 1
set -g base-index 1
setw -g pane-base-index 1
set-option -g set-titles on
set-option -g set-titles-string "#T - #W"
setw -g aggressive-resize on
set-window-option -g window-status-style fg=$base03,bg=$base00
set-window-option -g window-status-format " #I #W"
# active window title colors
set-window-option -g window-status-current-style fg=$base0A,bg=$base00
set-window-option -g window-status-current-format " #I #[bold]#W"

# PANES
set -g pane-border-status top
set -g pane-border-format " (#{pane_index}) #{pane_current_command} "
## pane border colors
set-window-option -g pane-active-border-style fg=$base0A
## pane border
set-window-option -g pane-border-style fg=$base03
## pane number display
set-option -g display-panes-active-colour $base08
set-option -g display-panes-colour $base01

# message text
set-option -g message-style bg=$base00,fg=$base0F

# clock
set-window-option -g clock-mode-colour $base08