Last active
December 10, 2025 06:33
-
-
Save kwmiebach/b0d03afde427a33acf62f994c8f960fa to your computer and use it in GitHub Desktop.
.tmux.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # V2 | |
| # This file versioned as gist:https://gist.github.com/kwmiebach/b0d03afde427a33acf62f994c8f960fa | |
| # For the latest version go to above link, then click `raw`, then copy paste from the browser. | |
| # Deep linking it does not work. | |
| # Install from gist as tmux conf file if none exists yet (this could probably fetch an old version): | |
| # [ ! -f ~/.tmux.conf ] && curl https://gist.githubusercontent.com/kwmiebach/b0d03afde427a33acf62f994c8f960fa/raw/.tmux.conf > ~/.tmux.conf | |
| # Reload: tmux source-file ~/.tmux.conf | |
| unbind-key C-b | |
| # use ctrl-a as prefix which conflicts with: | |
| # - vim to increase a number in the text | |
| # - fish to go to beginning of line | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| bind-key -n PageUp copy-mode | |
| bind k kill-window | |
| set -g automatic-rename on | |
| bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
| bind-key -n F2 new-window -c "#{pane_current_path}" \; rename-window "-" | |
| bind-key -n F3 previous-window | |
| bind-key -n F4 next-window | |
| # join the right pane into the current with a vertical divider | |
| bind-key -n C-l join-pane -h -s :+1 | |
| # and break it again: | |
| bind-key -n M-l break-pane -t :+1 \; previous-window | |
| # join the left pane into the current with a vertical divider | |
| # -b = before | |
| bind-key -n C-h join-pane -h -b -s :-1 | |
| # and break it again: | |
| bind-key -n M-h break-pane -t :1 \; next-window | |
| # move window left or right with ctrl-shift-F3/4 and select it | |
| # standard implementation | |
| # display-message "including tmux conf alt. 1" | |
| bind-key -n C-S-F3 swap-window -t :-1 \; previous-window | |
| bind-key -n C-S-F4 swap-window -t :+1 \; next-window | |
| # scrollback mode | |
| bind-key -n F7 copy-mode | |
| # rename window F8 or session Ctrl-F8 | |
| bind-key -n F8 command-prompt -p "(rename-window) " "rename-window '%%'" | |
| bind-key -n C-F8 command-prompt -p "(rename-session) " "rename-session '%%'" | |
| # color status bar | |
| set -g status-bg black | |
| set -g status-fg '#7FFF00' | |
| # status bar colors and pipe, does not work on some machines, works on debian 11? | |
| setw -g window-status-current-format '#[bg=green,fg=black]#W' | |
| setw -g window-status-format '#W' | |
| setw -g window-status-separator '|' | |
| # Invert colors for the current window: | |
| set-window-option -g window-status-current-style fg=black,bg='#7FFF00' | |
| # remove the asterisk indicating current window: | |
| set-window-option -g window-status-current-format ' #W ' | |
| # remove numbering and the colon: | |
| set-window-option -g window-status-format ' #W ' | |
| set -g default-terminal "screen-256color" | |
| set -ga terminal-overrides ",xterm-256color:Tc" | |
| # Disable fancy Unicode characters | |
| set -g pane-border-format ' ' | |
| set -g pane-border-indicators off | |
| # Remove byobu icons and logo | |
| set -g status-left '#S - ' | |
| set -g status-right '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment