Last active
January 20, 2025 20:35
-
-
Save anistark/1f686bab54e93d1941f9 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
# Tmux Config | |
tm() { tmux new -s "$1" ;} | |
ta() { tmux attach -t "$1"; } | |
tl() { tmux list-sessions; } | |
tn() { tmux new-window; } |
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
Setting up tmux directly | |
``` | |
wget -O ~/.tmux.conf https://gist.githubusercontent.com/anistark/1f686bab54e93d1941f9/raw/8962c23f8d897510cce6b9f722a720d53210dcf7/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
set-window-option -g xterm-keys on | |
# Change key-bindings for moving control between panes | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# Alt-n for new window | |
bind -n M-n new-window | |
# Alt-r for renaming window | |
bind -n M-r command-prompt "rename-window %%" | |
# Ctrl-tab Switching between windows | |
bind-key C-T last-window | |
# Use window switching using Shift + Left / Right arrow | |
bind -n S-left prev | |
bind -n S-right next | |
# Swap window with left/right | |
bind -n S-Up swap-window -t -1 | |
bind -n S-Down swap-window -t +1 | |
# Enable pane-switching using mouse | |
# set-option -g mouse-select-pane on | |
# set-option -g mouse on | |
# Monitor events happening on other windows | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# Start window numbering from 1 instead of 0 | |
set -g base-index 1 | |
# Agressive resize | |
setw -g aggressive-resize on | |
# Change the default coloring and display | |
set -g status-bg black | |
set -g status-fg white | |
set-window-option -g window-status-current-bg red | |
set -g status-left "" | |
set -g status-right '#[fg=green,bold]#S:#H #[fg=white,bold]#(cut -d " " -f 1-2 /proc/loadavg)#[default] #[fg=cyan,bold]%Y-%m-%d#[default]' | |
# Sane scrolling | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment