2022-02-06 07:15:14 +00:00
|
|
|
# don't use escape key
|
|
|
|
set -sg escape-time 0
|
2023-09-05 16:40:47 +00:00
|
|
|
|
|
|
|
# don't use 'repeat" keys
|
|
|
|
# (causes delay annoyances with '~/.wryn/scwrypts/ssh/omni/tmux.conf')
|
|
|
|
set -sg repeat-time 0
|
|
|
|
|
2023-06-28 00:30:02 +00:00
|
|
|
set-option -g default-shell /bin/zsh
|
2022-02-06 07:15:14 +00:00
|
|
|
|
|
|
|
# quick reload
|
|
|
|
bind-key r source-file ~/.tmux.conf\; display "TMUX CONFIG RELOADED"
|
|
|
|
|
|
|
|
# force color
|
|
|
|
set -g default-terminal "tmux-256color"
|
|
|
|
|
|
|
|
# force utf-8
|
|
|
|
setw -gq utf8 on
|
2023-01-09 18:39:00 +00:00
|
|
|
set-option -gw xterm-keys on
|
2022-02-06 07:15:14 +00:00
|
|
|
|
|
|
|
# force vi
|
|
|
|
set-window-option -g mode-keys vi
|
|
|
|
set-window-option -g status-keys vi
|
|
|
|
|
|
|
|
# disable mouse-mode
|
|
|
|
set -g mouse off
|
|
|
|
|
|
|
|
# window options / color config
|
|
|
|
set -g status-style fg=brightmagenta,bg=black
|
|
|
|
set -g window-status-current-style fg=black,bg=brightmagenta
|
|
|
|
|
2023-06-24 13:50:14 +00:00
|
|
|
set -g status-right "#(cat /sys/class/power_supply/BAT0/capacity)% | #[fg=magneta]%d %b %R | #(ip address 2>&1 | grep wlp0 | sed -n 's/^.*\\(192.[^/]*\\)\\/.*$/\\1/p') "
|
2022-02-06 07:15:14 +00:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
2019-12-31 21:26:32 +00:00
|
|
|
# pane switch with vim-like controls
|
2023-01-17 19:18:58 +00:00
|
|
|
bind -n M-h select-pane -L
|
|
|
|
bind -n M-H send-keys C-b Left
|
|
|
|
bind -n M-j select-pane -D
|
|
|
|
bind -n M-J send-keys C-b Down
|
|
|
|
bind -n M-k select-pane -U
|
|
|
|
bind -n M-K send-keys C-b Up
|
|
|
|
bind -n M-l select-pane -R
|
|
|
|
bind -n M-L send-keys C-b Right
|
|
|
|
|
|
|
|
bind -n M-Left resize-pane -L 2
|
|
|
|
bind -n M-S-Left send-keys C-b C-Left
|
|
|
|
bind -n M-Down resize-pane -D 2
|
|
|
|
bind -n M-S-Down send-keys C-b C-Down
|
|
|
|
bind -n M-Up resize-pane -U 2
|
|
|
|
bind -n M-S-Up send-keys C-b C-Up
|
|
|
|
bind -n M-Right resize-pane -R 2
|
|
|
|
bind -n M-S-Right send-keys C-b C-Right
|
2019-12-31 21:26:32 +00:00
|
|
|
|
|
|
|
# alt tab for window shift
|
2023-01-09 18:39:00 +00:00
|
|
|
bind-key -n M-Tab next-window
|
|
|
|
bind-key -n M-n send-keys C-b n
|
2019-12-31 21:26:32 +00:00
|
|
|
bind-key -n M-BTab previous-window
|
2023-01-09 18:39:00 +00:00
|
|
|
bind-key -n M-p send-keys C-b p
|
2019-12-31 21:26:32 +00:00
|
|
|
|
|
|
|
# alt number for switch
|
|
|
|
bind-key -n M-1 select-window -t 0
|
|
|
|
bind-key -n M-2 select-window -t 1
|
|
|
|
bind-key -n M-3 select-window -t 2
|
|
|
|
bind-key -n M-4 select-window -t 3
|
|
|
|
bind-key -n M-5 select-window -t 4
|
|
|
|
bind-key -n M-6 select-window -t 5
|
|
|
|
bind-key -n M-7 select-window -t 6
|
|
|
|
bind-key -n M-8 select-window -t 7
|
|
|
|
bind-key -n M-9 select-window -t 8
|
|
|
|
|
|
|
|
# new window and split pane quickly
|
2020-09-30 21:58:38 +00:00
|
|
|
bind-key -n M-Enter new-window
|
2023-01-09 18:39:00 +00:00
|
|
|
bind-key -n M-c send-keys C-b c
|
2023-01-17 19:18:58 +00:00
|
|
|
|
|
|
|
bind-key -n M-v split-window -v
|
|
|
|
bind-key -n M-V send-keys M-v
|
|
|
|
bind-key -n M-b split-window -h
|
|
|
|
bind-key -n M-B send-keys M-b
|
|
|
|
bind-key -n M-q killp
|
|
|
|
bind-key -n M-Q send-keys M-q
|
|
|
|
bind-key -n M-z resize-pane -Z
|
|
|
|
bind-key -n M-Z send-keys M-z
|
2020-01-02 18:58:59 +00:00
|
|
|
|
2020-01-10 16:02:51 +00:00
|
|
|
# nested session with meta-a
|
|
|
|
bind-key -n M-a send-prefix
|
2020-10-20 01:29:57 +00:00
|
|
|
|
|
|
|
# rena[M]e session
|
|
|
|
bind-key -n M-m command-prompt -I "#S" "rename-session '%%'"
|
2023-01-17 19:18:58 +00:00
|
|
|
bind-key -n M-M send-keys M-m
|
2020-10-29 23:29:37 +00:00
|
|
|
|
2021-05-03 21:24:09 +00:00
|
|
|
# rename [w]indow
|
2023-01-17 19:18:58 +00:00
|
|
|
bind-key -n M-w command-prompt -I "#W" "rename-window '%%'"
|
2023-01-09 18:39:00 +00:00
|
|
|
bind-key -n C-M-w send-keys M-w
|
2021-05-03 21:24:09 +00:00
|
|
|
|
2024-02-21 07:54:47 +00:00
|
|
|
# toggle [r]eadonly session
|
2023-01-09 18:39:00 +00:00
|
|
|
bind-key -n M-r switch-client -r
|
|
|
|
bind-key -n C-M-r send-keys M-r
|
2022-02-06 07:15:14 +00:00
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip'
|
|
|
|
|
|
|
|
#####################################################################
|