Skip to content

Instantly share code, notes, and snippets.

@sverrejoh
Last active March 9, 2026 08:55
Show Gist options
  • Select an option

  • Save sverrejoh/42742b2522c9ce07900ac7e5a7a5f1ac to your computer and use it in GitHub Desktop.

Select an option

Save sverrejoh/42742b2522c9ce07900ac7e5a7a5f1ac to your computer and use it in GitHub Desktop.
tmux.conf — Tokyo Night theme, top status bar, Emacs copy mode, fzf session switcher

tmux.conf

My tmux config. Tokyo Night color scheme, top status bar with system stats, Emacs-style copy mode, and fzf session switching.

tmux status bar preview

Prerequisites

  • tmux 3.3+
  • TPM (Tmux Plugin Manager)
  • fzf (for session switcher popup)
  • A Nerd Font (for status bar icons)

Install

# Install TPM
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm

# Copy config and scripts
mkdir -p ~/.config/tmux
cp tmux.conf ~/.config/tmux/tmux.conf
cp *.sh ~/.config/tmux/
chmod +x ~/.config/tmux/*.sh

# Start tmux and install plugins
tmux
# Press C-s I (capital I) to install plugins via TPM

Features

  • Tokyo Night color scheme with rounded pill-shaped status tabs
  • Rainbow window tabs — each window index gets a unique color
  • Top status bar with CPU, RAM, disk usage, hostname, and clock
  • fzf session/window tree (C-s s) — expand/collapse sessions, fuzzy filter, Alt+0-9/a-z jump keys
  • Emacs copy mode with C-space to select, Enter to copy
  • Mouse toggle (C-s M) for text selection on iPad/mobile

Helper scripts

All scripts go in ~/.config/tmux/ and need chmod +x:

Script Purpose
session-tree.sh fzf session/window tree picker
mouse-indicator.sh Shows ON/OFF mouse mode in status bar
ram-usage.sh Displays RAM usage (used/total)
disk-usage.sh Displays disk usage for root partition
session-prev.sh Cycle to previous session by creation order
session-next.sh Cycle to next session by creation order
toggle-status.sh Toggle between full and minimal status bar

The tmux-cpu plugin handles CPU percentage automatically.

Key bindings

Key Action
C-s Prefix (replaces default C-b)
C-s C-s Send literal C-s to terminal
C-s r Reload config
C-s h/j/k/l Navigate panes (vim-style)
C-s | Split horizontally
C-s - Split vertically
C-s n/p Next/previous window (repeatable)
C-s (/) Previous/next session (repeatable)
C-s s fzf session/window tree picker
C-s S Built-in choose-tree
C-s B Toggle status bar
C-s M Toggle mouse mode
C-s [ Enter copy mode (Emacs keys)
#!/bin/bash
# Get disk space for root: used/total in TB
df -BG / | awk 'NR==2 {gsub("G","",$2); gsub("G","",$3); printf "%.1fTB/%.1fTB", $3/1024, $2/1024}'
#!/bin/sh
# Called by tmux status-left via #() - outputs mouse state icon
mouse=$(tmux show -gv mouse)
if [ "$mouse" = "on" ]; then
printf '\U000f037d'
else
printf '\U000f037e'
fi
#!/bin/bash
# Get memory in GB: used/total
read -r total used <<< $(free -g | awk '/^Mem:/ {print $2, $3}')
printf "%dGB/%dGB" "$used" "$total"
#!/bin/bash
sessions=($(tmux list-sessions -F '#{session_created}:#{session_name}' | sort -n | cut -d: -f2))
current=$(tmux display-message -p '#{session_name}')
count=${#sessions[@]}
for i in "${!sessions[@]}"; do
if [[ "${sessions[$i]}" == "$current" ]]; then
next=$(( (i + 1) % count ))
tmux switch-client -t "${sessions[$next]}"
exit
fi
done
#!/bin/bash
sessions=($(tmux list-sessions -F '#{session_created}:#{session_name}' | sort -n | cut -d: -f2))
current=$(tmux display-message -p '#{session_name}')
count=${#sessions[@]}
for i in "${!sessions[@]}"; do
if [[ "${sessions[$i]}" == "$current" ]]; then
prev=$(( (i - 1 + count) % count ))
tmux switch-client -t "${sessions[$prev]}"
exit
fi
done
#!/usr/bin/env bash
# fzf-based session/window tree with expand/collapse
# Tab: expand/collapse, Enter: switch, Alt+0-9/a-z: jump to item
STATE="/tmp/tmux-tree-state"
SELF="$HOME/.config/tmux/session-tree.sh"
IC=$'\uf07b'
IE=$'\uf07c'
LABELS=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z)
JUMPS='alt-0:pos(1)+accept,alt-1:pos(2)+accept,alt-2:pos(3)+accept,alt-3:pos(4)+accept,alt-4:pos(5)+accept,alt-5:pos(6)+accept,alt-6:pos(7)+accept,alt-7:pos(8)+accept,alt-8:pos(9)+accept,alt-9:pos(10)+accept,alt-a:pos(11)+accept,alt-b:pos(12)+accept,alt-c:pos(13)+accept,alt-d:pos(14)+accept,alt-e:pos(15)+accept,alt-f:pos(16)+accept,alt-g:pos(17)+accept,alt-h:pos(18)+accept,alt-i:pos(19)+accept,alt-j:pos(20)+accept,alt-k:pos(21)+accept,alt-l:pos(22)+accept,alt-m:pos(23)+accept,alt-n:pos(24)+accept,alt-o:pos(25)+accept,alt-p:pos(26)+accept,alt-q:pos(27)+accept,alt-r:pos(28)+accept,alt-s:pos(29)+accept,alt-t:pos(30)+accept,alt-u:pos(31)+accept,alt-v:pos(32)+accept,alt-w:pos(33)+accept,alt-x:pos(34)+accept,alt-y:pos(35)+accept,alt-z:pos(36)+accept'
gen_list() {
local query="$1" cur="$2" idx=0
local exp=""
[[ -s "$STATE" ]] && exp=$'\n'$(<"$STATE")$'\n'
local prev="" show=false is_exp=false
while IFS='|' read -r _ sname wcount widx wname wflag; do
if [[ "$sname" != "$prev" ]]; then
prev="$sname"
show=true
if [[ -n "$query" ]]; then
local lower="${sname,,}"
for word in $query; do
[[ "$lower" == *"${word,,}"* ]] || { show=false; break; }
done
fi
is_exp=false
[[ "$exp" == *$'\n'"$sname"$'\n'* ]] && is_exp=true
if $show; then
local icon lbl="${LABELS[$idx]:- }" style='' rstyle='' star=''
$is_exp && icon="$IE" || icon="$IC"
if [[ "$sname" = "$cur" ]]; then
style=$'\033[1;34m' rstyle=$'\033[0m' star=' *'
fi
printf '%s\t\033[2m%s\033[0m %s%s %s (%d windows)%s%s\n' \
"$sname" "$lbl" "$style" "$icon" "$sname" "$wcount" "$star" "$rstyle"
idx=$((idx + 1))
fi
fi
if $show && $is_exp; then
printf '%s:%s\t\033[2m%s\033[0m %s: %s %s\n' \
"$sname" "$widx" "${LABELS[$idx]:- }" "$widx" "$wname" "$wflag"
idx=$((idx + 1))
fi
done < <(tmux list-windows -a \
-F '#{session_id}|#S|#{session_windows}|#{window_index}|#{window_name}|#{?window_active,*,}' \
| sort -t'$' -k2 -n)
}
case "${1:-}" in
toggle)
session="${2%%:*}"
if [[ -s "$STATE" ]]; then
found=false new=""
while IFS= read -r line; do
if [[ "$line" = "$session" ]]; then
found=true
else
new+="$line"$'\n'
fi
done < "$STATE"
if $found; then
printf '%s' "$new" > "$STATE"
else
echo "$session" >> "$STATE"
fi
else
echo "$session" > "$STATE"
fi
gen_list "$3" "$4"
;;
list)
gen_list "$2" "$3"
;;
*)
current=$(tmux display-message -p '#S')
: > "$STATE"
current_pos=$(tmux list-sessions -F '#{session_id}|#S' | \
sort -t'$' -k2 -n | \
awk -F'|' -v cur="$current" '{if ($2 == cur) {print NR; exit}}')
result=$(gen_list "" "$current" | fzf --reverse --ansi --disabled \
--cycle --no-separator --no-scrollbar \
--delimiter=$'\t' --with-nth=2 \
--header='tab: expand/collapse | alt+0-9/a-z: jump' \
--bind "load:pos(${current_pos:-1})+unbind(load)" \
--bind "change:reload($SELF list {q} $current)" \
--bind "tab:reload($SELF toggle {1} {q} $current)" \
--bind "$JUMPS")
[[ -n "$result" ]] && tmux switch-client -t "${result%%$'\t'*}"
rm -f "$STATE"
;;
esac
Display the source blob
Display the rendered blob
Raw
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 520" font-family="'JetBrains Mono','Fira Code','SF Mono','Cascadia Code',monospace">
<defs>
<style>
.dim { fill: #565f89; }
.fg { fill: #a9b1d6; }
.bright { fill: #c0caf5; }
.green { fill: #9ece6a; }
.purple { fill: #bb9af7; }
.orange { fill: #ff9e64; }
.blue { fill: #7aa2f7; }
.cyan { fill: #73daca; }
.red { fill: #f7768e; }
.yellow { fill: #e0af68; }
.dark { fill: #1a1b26; }
.bold { font-weight: bold; }
.s13 { font-size: 13px; }
.s14 { font-size: 14px; }
</style>
<!-- Icon: home (nf-fa-home) -->
<g id="icon-home">
<path d="M0,6 L5,1 L10,6 L10,11 L6.5,11 L6.5,7.5 L3.5,7.5 L3.5,11 L0,11 Z" fill="currentColor"/>
</g>
<!-- Icon: cpu chip (nf-md-chip) -->
<g id="icon-cpu">
<rect x="2" y="2" width="8" height="8" rx="1" fill="none" stroke="currentColor" stroke-width="1.2"/>
<rect x="4" y="4" width="4" height="4" rx="0.5" fill="currentColor"/>
<line x1="5" y1="0" x2="5" y2="2" stroke="currentColor" stroke-width="1"/>
<line x1="7" y1="0" x2="7" y2="2" stroke="currentColor" stroke-width="1"/>
<line x1="5" y1="10" x2="5" y2="12" stroke="currentColor" stroke-width="1"/>
<line x1="7" y1="10" x2="7" y2="12" stroke="currentColor" stroke-width="1"/>
<line x1="0" y1="5" x2="2" y2="5" stroke="currentColor" stroke-width="1"/>
<line x1="0" y1="7" x2="2" y2="7" stroke="currentColor" stroke-width="1"/>
<line x1="10" y1="5" x2="12" y2="5" stroke="currentColor" stroke-width="1"/>
<line x1="10" y1="7" x2="12" y2="7" stroke="currentColor" stroke-width="1"/>
</g>
<!-- Icon: memory (nf-md-memory) -->
<g id="icon-ram">
<rect x="1" y="2" width="10" height="7" rx="1" fill="none" stroke="currentColor" stroke-width="1.2"/>
<rect x="3" y="4" width="2" height="3" fill="currentColor"/>
<rect x="7" y="4" width="2" height="3" fill="currentColor"/>
<line x1="3" y1="9" x2="3" y2="11" stroke="currentColor" stroke-width="1"/>
<line x1="5" y1="9" x2="5" y2="11" stroke="currentColor" stroke-width="1"/>
<line x1="7" y1="9" x2="7" y2="11" stroke="currentColor" stroke-width="1"/>
<line x1="9" y1="9" x2="9" y2="11" stroke="currentColor" stroke-width="1"/>
</g>
<!-- Icon: hard disk (nf-md-harddisk) -->
<g id="icon-disk">
<rect x="1" y="2" width="10" height="8" rx="2" fill="none" stroke="currentColor" stroke-width="1.2"/>
<circle cx="6" cy="6" r="2.5" fill="none" stroke="currentColor" stroke-width="1"/>
<circle cx="6" cy="6" r="0.8" fill="currentColor"/>
</g>
<!-- Icon: server/host (nf-md-monitor) -->
<g id="icon-host">
<rect x="1" y="1" width="10" height="7" rx="1" fill="none" stroke="currentColor" stroke-width="1.2"/>
<line x1="4" y1="9" x2="8" y2="9" stroke="currentColor" stroke-width="1.2"/>
<line x1="6" y1="8" x2="6" y2="9" stroke="currentColor" stroke-width="1.2"/>
</g>
<!-- Icon: clock (nf-md-clock_outline) -->
<g id="icon-clock">
<circle cx="6" cy="6" r="5" fill="none" stroke="currentColor" stroke-width="1.2"/>
<line x1="6" y1="3" x2="6" y2="6" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
<line x1="6" y1="6" x2="8.5" y2="7.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
</g>
<!-- Icon: numbered boxes for window indices -->
<g id="icon-w0">
<rect x="0" y="0" width="12" height="12" rx="2" fill="currentColor"/>
<text x="6" y="9.5" text-anchor="middle" font-size="9" font-weight="bold" font-family="'JetBrains Mono',monospace" fill="#1a1b26">0</text>
</g>
<g id="icon-w1">
<rect x="0" y="0" width="12" height="12" rx="2" fill="currentColor"/>
<text x="6" y="9.5" text-anchor="middle" font-size="9" font-weight="bold" font-family="'JetBrains Mono',monospace" fill="#1a1b26">1</text>
</g>
<g id="icon-w2">
<rect x="0" y="0" width="12" height="12" rx="2" fill="currentColor"/>
<text x="6" y="9.5" text-anchor="middle" font-size="9" font-weight="bold" font-family="'JetBrains Mono',monospace" fill="#1a1b26">2</text>
</g>
</defs>
<!-- Terminal window frame -->
<rect width="960" height="520" rx="10" fill="#1a1b26"/>
<!-- macOS-style title bar -->
<rect width="960" height="36" rx="10" fill="#16161e"/>
<rect y="26" width="960" height="10" fill="#16161e"/>
<circle cx="22" cy="18" r="6.5" fill="#ff5f56" opacity="0.85"/>
<circle cx="44" cy="18" r="6.5" fill="#ffbd2e" opacity="0.85"/>
<circle cx="66" cy="18" r="6.5" fill="#27c93f" opacity="0.85"/>
<text x="480" y="22" text-anchor="middle" class="dim s13">dotfiles — tmux</text>
<!-- Tmux status bar background -->
<rect y="36" width="960" height="26" fill="#1a1b26"/>
<!-- Status left: session pill (flat left edge, rounded right via Powerline separator) -->
<path d="M 0,38 H 119 A 11,11 0 0,1 119,60 H 0 Z" fill="#7aa2f7"/>
<use href="#icon-home" x="10" y="43" color="#1a1b26"/>
<text x="26" y="53" class="dark bold s13">dotfiles</text>
<!-- Window tabs -->
<!-- Window 0: fish (active, blue — fully rounded pill via Powerline separators) -->
<rect x="136" y="38" width="78" height="22" rx="11" fill="#7aa2f7"/>
<use href="#icon-w0" x="144" y="43" color="#7aa2f7"/>
<text x="160" y="53" class="dark bold s13">fish</text>
<!-- Window 1: nvim (inactive — fully rounded pill) -->
<rect x="222" y="38" width="80" height="22" rx="11" fill="#3b4261"/>
<use href="#icon-w1" x="230" y="43" color="#565f89"/>
<text x="246" y="53" class="dim s13">nvim</text>
<!-- Window 2: htop (inactive — fully rounded pill) -->
<rect x="310" y="38" width="80" height="22" rx="11" fill="#3b4261"/>
<use href="#icon-w2" x="318" y="43" color="#565f89"/>
<text x="334" y="53" class="dim s13">htop</text>
<!-- Status right: system stats (plain colored text, no background) -->
<!-- CPU -->
<use href="#icon-cpu" x="564" y="43" color="#9ece6a"/>
<text x="580" y="53" class="green s13">5%</text>
<!-- RAM -->
<use href="#icon-ram" x="608" y="43" color="#bb9af7"/>
<text x="624" y="53" class="purple s13">8GB/32GB</text>
<!-- Disk -->
<use href="#icon-disk" x="710" y="43" color="#ff9e64"/>
<text x="726" y="53" class="orange s13">0.4TB/1.0TB</text>
<!-- Host -->
<use href="#icon-host" x="826" y="43" color="#c0caf5"/>
<text x="842" y="53" class="bright s13">arch</text>
<!-- Time pill (rounded left via Powerline separator, flat right edge) -->
<path d="M 889,38 H 960 V 60 H 889 A 11,11 0 0,1 889,38 Z" fill="#7aa2f7"/>
<use href="#icon-clock" x="896" y="43" color="#1a1b26"/>
<text x="912" y="53" class="dark bold s13">15:30</text>
<!-- Thin separator line -->
<rect y="62" width="960" height="1" fill="#292e42"/>
<!-- Terminal content area -->
<!-- Prompt line 1 -->
<text x="16" y="90" class="s14">
<tspan class="cyan">~/dotfiles</tspan>
<tspan class="purple"> main</tspan>
</text>
<text x="16" y="114" class="s14">
<tspan class="green">&#x276f;</tspan>
<tspan class="bright"> git log --oneline -5</tspan>
</text>
<!-- Git log output -->
<text x="16" y="138" class="s14">
<tspan class="yellow">673b539</tspan>
<tspan class="fg"> Add wrap-around navigation to session tree picker</tspan>
</text>
<text x="16" y="162" class="s14">
<tspan class="yellow">9caba95</tspan>
<tspan class="fg"> Simplify session-tree: merge printf, pure bash toggle</tspan>
</text>
<text x="16" y="186" class="s14">
<tspan class="yellow">62b0d6a</tspan>
<tspan class="fg"> Fix session tree picker: cursor jump on toggle</tspan>
</text>
<text x="16" y="210" class="s14">
<tspan class="yellow">d505473</tspan>
<tspan class="fg"> Compact window tab pills: remove inner padding</tspan>
</text>
<text x="16" y="234" class="s14">
<tspan class="yellow">48f15a4</tspan>
<tspan class="fg"> Restyle tmux status bar: rounded pills, rainbow colors</tspan>
</text>
<!-- Prompt line 2 -->
<text x="16" y="270" class="s14">
<tspan class="cyan">~/dotfiles</tspan>
<tspan class="purple"> main</tspan>
</text>
<text x="16" y="294" class="s14">
<tspan class="green">&#x276f;</tspan>
<tspan class="bright"> tmux list-sessions</tspan>
</text>
<!-- tmux list-sessions output -->
<text x="16" y="318" class="fg s14">dotfiles: 3 windows (created Sat Mar 7 09:19:00 2026)</text>
<text x="16" y="342" class="fg s14">main: 2 windows (created Fri Mar 7 10:46:00 2026)</text>
<text x="16" y="366" class="fg s14">notes: 1 windows (created Thu Mar 6 15:30:00 2026)</text>
<!-- Prompt line 3 with cursor -->
<text x="16" y="402" class="s14">
<tspan class="cyan">~/dotfiles</tspan>
<tspan class="purple"> main</tspan>
</text>
<text x="16" y="426" class="s14">
<tspan class="green">&#x276f;</tspan>
</text>
<!-- Block cursor -->
<rect x="28" y="414" width="9" height="17" fill="#c0caf5" opacity="0.8"/>
</svg>
unbind r
bind r source-file ~/.config/tmux/tmux.conf
set -g prefix C-s
set -g prefix2 None
unbind C-b
set -g mouse on
set -gq allow-passthrough on
set -g bell-action any
set -g monitor-bell on
set -g default-terminal "tmux-256color"
set -as terminal-features ',*:RGB'
set -g history-limit 100000
set -sg escape-time 0
set -g focus-events on
set -g set-clipboard on
set -g display-time 2000
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Easier splits (preserves working directory)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
set-option -g status-position top
set -g base-index 0
setw -g pane-base-index 0
set -g renumber-windows on
# Emacs-style copy mode
set -g mode-keys emacs
bind -T copy-mode Enter send -X copy-selection-and-cancel
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @plugin 'tmux-plugins/tmux-cpu'
# Minimal theme
set -g status-style bg='#1a1b26',fg='#565f89'
set -g status-interval 2
set -g status-left-length 50
set -g status-right-length 400
# Status left/right
set -g status-left '#[fg=#1a1b26,bg=#7aa2f7,bold]  #S #[fg=#7aa2f7,bg=default,nobold] #(~/.config/tmux/mouse-indicator.sh) '
set -g status-right '#[fg=#9ece6a]󰻠 #{cpu_percentage} #[fg=#bb9af7]󰘚 #(~/.config/tmux/ram-usage.sh) #[fg=#ff9e64]󰋊 #(~/.config/tmux/disk-usage.sh) #[fg=#c0caf5]󰌢 #H #[fg=#7aa2f7]#[fg=#1a1b26,bg=#7aa2f7,bold] 󰥔 %H:%M '
# Window list
set -g window-status-format '#[fg=#3b4261]#[bg=default]#[fg=#565f89]#[bg=#3b4261]#{?#{==:#I,0},󰼎,}#{?#{==:#I,1},󰼏,}#{?#{==:#I,2},󰼐,}#{?#{==:#I,3},󰼑,}#{?#{==:#I,4},󰼒,}#{?#{==:#I,5},󰼓,}#{?#{==:#I,6},󰼔,}#{?#{==:#I,7},󰼕,}#{?#{==:#I,8},󰼖,}#{?#{==:#I,9},󰼗,} #W#[fg=#3b4261]#[bg=default]'
set -g window-status-current-format '#[fg=#7aa2f7]#{?#{==:#I,0},#[fg=#7aa2f7],}#{?#{==:#I,1},#[fg=#9ece6a],}#{?#{==:#I,2},#[fg=#bb9af7],}#{?#{==:#I,3},#[fg=#ff9e64],}#{?#{==:#I,4},#[fg=#73daca],}#{?#{==:#I,5},#[fg=#f7768e],}#{?#{==:#I,6},#[fg=#2ac3de],}#{?#{==:#I,7},#[fg=#e0af68],}#{?#{==:#I,8},#[fg=#a9b1d6],}#{?#{==:#I,9},#[fg=#d4bfff],}#[bg=default]#[fg=#1a1b26]#[bg=#7aa2f7]#{?#{==:#I,0},#[bg=#7aa2f7],}#{?#{==:#I,1},#[bg=#9ece6a],}#{?#{==:#I,2},#[bg=#bb9af7],}#{?#{==:#I,3},#[bg=#ff9e64],}#{?#{==:#I,4},#[bg=#73daca],}#{?#{==:#I,5},#[bg=#f7768e],}#{?#{==:#I,6},#[bg=#2ac3de],}#{?#{==:#I,7},#[bg=#e0af68],}#{?#{==:#I,8},#[bg=#a9b1d6],}#{?#{==:#I,9},#[bg=#d4bfff],}#[bold]#{?#{==:#I,0},󰼎,}#{?#{==:#I,1},󰼏,}#{?#{==:#I,2},󰼐,}#{?#{==:#I,3},󰼑,}#{?#{==:#I,4},󰼒,}#{?#{==:#I,5},󰼓,}#{?#{==:#I,6},󰼔,}#{?#{==:#I,7},󰼕,}#{?#{==:#I,8},󰼖,}#{?#{==:#I,9},󰼗,} #W#[nobold]#[fg=#7aa2f7]#{?#{==:#I,0},#[fg=#7aa2f7],}#{?#{==:#I,1},#[fg=#9ece6a],}#{?#{==:#I,2},#[fg=#bb9af7],}#{?#{==:#I,3},#[fg=#ff9e64],}#{?#{==:#I,4},#[fg=#73daca],}#{?#{==:#I,5},#[fg=#f7768e],}#{?#{==:#I,6},#[fg=#2ac3de],}#{?#{==:#I,7},#[fg=#e0af68],}#{?#{==:#I,8},#[fg=#a9b1d6],}#{?#{==:#I,9},#[fg=#d4bfff],}#[bg=default]'
set -g window-status-separator ' '
# Pane borders
set -g pane-border-style fg='#3b4261'
set -g pane-active-border-style fg='#7aa2f7'
# Message style
set -g message-style bg='#7aa2f7',fg='#1a1b26'
set -g message-command-style bg='#292e42',fg='#7aa2f7'
# Tree/choose mode styling
run '~/.config/tmux/plugins/tpm/tpm'
bind-key -T root MouseDown1StatusLeft choose-tree -Zs
# Repeatable session cycling (C-s ( ( ( or C-s ) ) ))
# Longer repeat time for key sequences
set -g repeat-time 1000
# Repeatable window cycling (C-s n n n or C-s p p p)
bind-key -r n next-window
bind-key -r p previous-window
# Session cycling by creation order
bind-key -r '(' run-shell "~/.config/tmux/session-prev.sh"
bind-key -r ')' run-shell "~/.config/tmux/session-next.sh"
# Toggle status bar (C-s B for "bar")
bind-key B run-shell "~/.config/tmux/toggle-status.sh"
# Session/window tree picker popup (C-s s) — like choose-tree but with fzf
bind-key s display-popup -w 90% -h 75% -E "~/.config/tmux/session-tree.sh"
# Built-in choose-tree (C-s S)
bind-key S choose-tree -Zs
# Toggle mouse mode (C-s M) - turn off to select/copy text on iPad
bind M set -g mouse
# Agent dashboard (C-s D) — split pane at top
bind-key D split-window -vb -l 40% \
"~/.claude/scripts/agent-dashboard.sh"
# Kill session and switch away (C-s X)
bind-key X confirm-before -p "Kill session #S? (y/n)" \
"run-shell '~/.config/tmux/kill-session.sh #S'"
# C-s C-s sends C-s to terminal (override plugin bindings)
bind C-s send-prefix
#!/bin/bash
# Toggle between full and minimal status bar
FULL='#[fg=#9ece6a]󰻠 #(~/.config/tmux/plugins/tmux-cpu/scripts/cpu_percentage.sh) #[fg=#bb9af7]󰘚 #(~/.config/tmux/ram-usage.sh) #[fg=#ff9e64]󰋊 #(~/.config/tmux/disk-usage.sh) #[fg=#c0caf5]󰌢 #H #[fg=#7aa2f7]󰥔 %H:%M '
MINI='#[fg=#565f89]󰁌 '
current=$(tmux show-option -gqv @status-mode)
if [ "$current" = "mini" ]; then
tmux set -g status-right "$FULL"
tmux set -g @status-mode "full"
else
tmux set -g status-right "$MINI"
tmux set -g @status-mode "mini"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment