Skip to content

Instantly share code, notes, and snippets.

@nitheeshkl
Created June 1, 2022 23:22
Show Gist options
  • Save nitheeshkl/5263c48080792b04d7769c8091e51158 to your computer and use it in GitHub Desktop.
Save nitheeshkl/5263c48080792b04d7769c8091e51158 to your computer and use it in GitHub Desktop.
Tmux config for Mac iTerm2
# ~/.tmux.conf - tmux terminal multiplexer config
#
# echo 'tmux new -d -t default' >> .xinitrc
#Then bind "urxvt -e bash -c 'tmux attach -d -t default'"
#to any keycode :-)
#
# thanks
# - Han Boetes
# - Nicholas Marriott
# - Thayer Williams
# for their config :-)
unbind C-b
#Screen-like
set -g prefix M-a
#always display status
set -g status on
set -g history-limit 5000
set -g bell-action any
#start count at 0 :-)
set -g base-index 0
set -g set-titles on
#status color
set-option -g status-bg black
set-option -g status-fg cyan
#always display time/date
#set -g status-right "%H:%M %d-%b-%y"
#monitor all windows
set -g visual-activity on
#set -g visual-content on
#usefull when starting new shell...
#set -g default-path '$PWD'
set -g default-terminal "screen-256color"
#set -g default-terminal "rxvt-unicode-256color"
#set -g default-terminal "xterm-256color"
#set -g default-terminal "tmux-256color"
#set -ga terminal-overrides ",*256*:Tc"
#set -g default-terminal "rxvt-unicode"
set-option -sa terminal-overrides ',screen-256color:RGB'
#set-option -g status-utf8 on
#set-window-option -g utf8 on
# Force utf-8
set -gq status-utf8 on
#pass keybindings throught to the terminals
set-window-option -g xterm-keys on
#set -g set-titles-string "tmux:#I #W"
set -g set-titles-string "#S:#I.#P #W"
set-option -sg escape-time 10
set-option -g window-status-current-style "fg=white,bg=red,bold"
#set-option -g window-status-current-fg white
#set-option -g window-status-current-bg red
#set-option -g window-status-current-attr bold
#default mode with current version
#setw -g utf8 on
#I always bind 2 char, Ctrl-? and ?
#
# ^ = Ctrl
#new tab
bind t new-window -c "#{pane_current_path}"
#bind ^t new-window -c "#{pane_current_path}"
bind M-t new-window -c "#{pane_current_path}"
#show/hide status bar
#bind ^b set-option status
bind M-b set-option status
bind b set-option status
#close tab
#bind ^w confirm kill-window
bind M-w confirm kill-window
bind w confirm kill-window
#close all tab
#bind ^q confirm kill-server
bind M-q confirm kill-server
bind q confirm kill-server
#detach current windows
unbind d
#unbind ^d
unbind M-d
#bind ^d detach
bind M-d detach
bind d detach
# open a man page in new window
bind / command-prompt "split-window -h 'exec man %%'"
#split current tab
bind | command-prompt "split-window -h -p %%"
bind - command-prompt "split-window -p %%"
#goto tab number
#bind "'" select-prompt
#rename tab
#bind ^r command-prompt "rename-window %%"
bind M-r command-prompt "rename-window %%"
bind r command-prompt "rename-window %%"
#display help
bind ? list-keys
#switch to next splitted tab
#bind Tab "select-pane -R"
#bind Tab 'select-pane -R'
#list tab (up/down then enter)
#bind ^l choose-window
bind M-l choose-window
bind l choose-window
#access all command
bind : command-prompt
#next tab
#bind-key -n C-right next
bind-key -n M-right next
#previous tab
#bind-key -n C-left prev
bind-key -n M-left prev
# ????
#bind BTab up-pane
bind-key a send-prefix
#bind-key C-a last-window
bind-key M-a last-window
bind < resize-pane -L 1
bind > resize-pane -R 5
bind - resize-pane -D 1
bind + resize-pane -U 5
# session initialization
#new-session -s default
#start console program
#select-window -t 90
#split-window -h -l 3 -t 90 'cat ~/.irssi/nicklistfifo'
#resize-pane -t 90 -R 10
#select-pane -L -t 90
#neww -d -nncmpc -t 91 'ncmpcpp'
#neww -nmail -d -t 10 mutt
#neww -nfacebook -d -t 90 'mcabber'
#neww -nirc -d -t 100 'ssh -fN undernet && irssi -c localhost'
#neww -nchat -d -t 89 'irssi -c localhost'
#neww -nirssi -t 91 irssi
#neww -nrss -d -t 12 'canto '
#neww -n wireless -d -t 13 'wicd-curses'
#selectw -t 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment