Skip to content

Instantly share code, notes, and snippets.

@unxmaal
Created March 15, 2026 00:17
Show Gist options
  • Select an option

  • Save unxmaal/6678f6d6a1b35cd0b279488e6a72f769 to your computer and use it in GitHub Desktop.

Select an option

Save unxmaal/6678f6d6a1b35cd0b279488e6a72f769 to your computer and use it in GitHub Desktop.
#-------- Basic Settings
set -g default-terminal "screen-256color"
set -as terminal-overrides ",xterm*:Tc" # true color support
set -g history-limit 10000 # History
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on # renumber windows on change
set -g set-titles on # filename as terminal title
set -g mouse off # enable mouse
setw -g pane-border-style fg=white # border on active pane
setw -g pane-active-border-style fg=purple
set-option -g status-justify centre # center window names
set -sg escape-time 0 # vim mode delay fix
set -g display-time 4000 # tmux messages show for 4 secs
setw -g aggressive-resize on # auto resize
#-------- Status Bar
set -g status-interval 1 # update status bar more
set -g status-bg black
set -g status-fg white
set -g status-left-length 150 # more usable status bar space
set -g status-right-length 150
# hostname on status bar
set -g status-left '#[fg=purple]#(whoami)@#(hostname)#[fg=default] |'
# current path and running program in status bar
#set-window-option -g window-status-current-format '#[fg=white] #{window_index} #[fg=green]#{pane_current_command} #[fg=blu
e]#(echo "#{pane_path}" | rev | cut -d'/' -f-3 | rev) #[fg=white]'
set-window-option -g window-status-current-format '#[fg=lightblue]#[bg=purple][#{window_index}] #[fg=lightblue]#[bg=purple]
#{window_name} '
set-window-option -g window-status-format '#[fg=black]#[bg=grey][#{window_index}] #[fg=black]#{window_name} '
set -g status-right '#[fg=purple]#{battery_icon_status}#{battery_percentage} | %a %h-%d %H:%M #{tmux_mode_indicator}'
setw -g clock-mode-colour green # Clock
setw -g clock-mode-style 24
#-------- Keybindings
# Remap Leader Key {
unbind C-b
set -g prefix ^A
bind a send-prefix
#}
# Reload Config {
bind R source-file ~/.tmux.conf
# }
# Windows {
# split windows with/without split key
unbind %
unbind '"'
bind "|" split-window -h
bind "\\" split-window -fh
bind "-" split-window -v
bind "_" split-window -fv
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# next n
unbind n
bind n next-window
# prev p
unbind p
bind p previous-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# windows ^W w
unbind w
bind w list-windows
# kill K
unbind k
bind k confirm-before "kill-window"
# }
# Panes {
# remove created panes
#bind z break-pane -t :
#bind C-z kill-pane -a
# bind-key -T copy-mode-vi 'C-h' select-pane -L
# bind-key -T copy-mode-vi 'C-j' select-pane -D
# bind-key -T copy-mode-vi 'C-k' select-pane -U
# bind-key -T copy-mode-vi 'C-l' select-pane -R
# bind-key -T copy-mode-vi 'C-/' select-pane -l
# }
# Misc {
#bind C-n switch-client -l # toggle between sessions
#set-window-option -g mode-keys vi # old vim mode
set -g mode-keys vi # vim mode
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# redisplay ^L l
unbind l
bind l refresh-client
# }
# Copy Pasting {
# copy paste with clipboard
set-option -s set-clipboard on
bind P paste-buffer
# }
#-----------
# Pane
unbind o
# Terminal emulator window title
#set -g set-titles on
#set -g set-titles-string '#S:#I.#P #W'
# set pane colors - hilight the active pane
#set-option -g pane-border-fg colour235 #base02
#set-option -g pane-active-border-fg colour240 #base01
# Escape key means start copy mode
unbind [
bind Escape copy-mode
# v to start selection
bind-key -T vi-copy 'v' send-keys -X begin-selection
# y to do the copy (yank, like in vim)
bind-key -T vi-copy 'y' send-keys -X copy-selection
# [ is paste because I keep hitting p for previous
bind [ paste-buffer
# Arrow keys to resize
bind-key -n C-Up resize-pane -U 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment