1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# Shared tmux configuration.
# Requires tmux 3.2+ and a font containing the Powerline separators.
# Terminal capabilities -------------------------------------------------------
# TERM inside tmux should describe tmux, not the outer terminal.
set -g default-terminal "tmux-256color"
# RGB is the official true-colour capability; Tc covers older tmux/terminfo.
set -as terminal-features ",xterm*:RGB"
set -as terminal-overrides ",xterm*:Tc"
# extended-keys and escape-time are server options.
set -s extended-keys always
set -s escape-time 0
# Prefix ----------------------------------------------------------------------
# Explicitly remove the old local override so reloading also cleans it up.
unbind C-a
set -g prefix C-b
bind C-b send-prefix
# Prefix-a returns to the last window.
bind a last-window
# General ---------------------------------------------------------------------
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
setw -g aggressive-resize on
setw -g mode-keys vi
setw -g automatic-rename on
set -g mouse on
set -g allow-passthrough on
set -g set-titles on
set -g set-titles-string "#T / #S / #W"
set -s set-clipboard off
set -g update-environment "DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS"
# Activity --------------------------------------------------------------------
setw -g monitor-activity on
set -g visual-activity on
# Theme -----------------------------------------------------------------------
# Fallback colors. A host file may override any of these before styles are set.
set -g @theme_bg '#101010'
set -g @theme_surface '#1c1c1c'
set -g @theme_border '#4c4c4c'
set -g @theme_muted '#9a9a9a'
set -g @theme_accent '#e6e6e6'
set -g @theme_active '#ffffff'
set -g @theme_fg '#d0d0d0'
set -g @theme_bright '#ffffff'
set -g @theme_alert '#ffffff'
# For example, host "charm" loads ~/.config/tmux/hosts/charm.conf.
# Missing host files are intentionally ignored.
source-file -qF '/home/rahm/.config/tmux/hosts/#{host_short}.conf'
set -g status-style 'bg=#{@theme_bg},fg=#{@theme_fg}'
set -g message-style 'bg=#{@theme_accent},fg=#{@theme_bg},bold'
set -g message-command-style 'bg=#{@theme_surface},fg=#{@theme_bright},bold'
set -g mode-style 'bg=#{@theme_accent},fg=#{@theme_bg},bold'
set -g pane-border-style 'fg=#{@theme_border}'
set -g pane-active-border-style 'fg=#{@theme_active},bold'
set -g pane-border-status off
set -g window-status-style 'fg=#{@theme_muted},bg=#{@theme_bg}'
set -g window-status-activity-style 'fg=#{@theme_bright},bg=#{@theme_border},bold'
set -g window-status-bell-style 'fg=#{@theme_bright},bg=#{@theme_alert},bold'
# Status bar ------------------------------------------------------------------
set -g status on
set -g status-position bottom
set -g status-interval 1
set -g status-justify centre
set -g status-left-length 80
set -g status-right-length 80
# Host and kernel flow from bright glass into the dark bar.
set -g status-left '#[fg=#{@theme_bg},bg=#{@theme_accent},bold] #H #[fg=#{@theme_accent},bg=#{@theme_surface},nobold]#[fg=#{@theme_fg},bg=#{@theme_surface}] #(uname -r) #[fg=#{@theme_surface},bg=#{@theme_bg}]'
# Uptime and clock flow back toward the bright glass accent.
set -g status-right '#[fg=#{@theme_surface},bg=#{@theme_bg}]#[fg=#{@theme_fg},bg=#{@theme_surface}] #(uptime -p 2>/dev/null | sed "s/^up //") #[fg=#{@theme_accent},bg=#{@theme_surface}]#[fg=#{@theme_bg},bg=#{@theme_accent},bold] %a %I:%M:%S %p │ %Y-%m-%d '
set -g window-status-separator ""
set -g window-status-format '#[fg=#{@theme_muted},bg=#{@theme_bg}] #I:#W '
set -g window-status-current-format '#[fg=#{@theme_bg},bg=#{@theme_active},bold] #I:#W #[fg=#{@theme_active},bg=#{@theme_bg},nobold]'
# Pane and window bindings ----------------------------------------------------
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Reload ----------------------------------------------------------------------
bind r source-file ~/.tmux.conf \; display-message "Config reloaded"
|