rwx/sh/tmux.sh

71 lines
1.8 KiB
Bash

# ╭──────┬───────╮
# │ tmux │ setup │
# ╰──────┴───────╯
rwx_tmux_setup() {
rwx_file_write "${HOME}/.tmux.conf" "\
# reload configuration
bind-key r source-file ~/.tmux.conf \\; display-message '↑ .tmux.conf'
#set -g automatic-rename on
#set -g automatic-rename-format ''
# enable mouse actions
set -g mouse on
# renumber windows after closing one
set -g renumber-windows on
#set -g set-titles on
#set -g set-titles-string '#(pwd)'
# status bar
set -g status-bg black
set -g status-fg gray
set -g status-interval 1
set -g status-left ''
set -g status-position top
set -g status-right '| #{session_name} | %Y/%m/%d %H:%M:%S'
# windows separator
set -g window-status-separator ' | '
# style for messages
set-option -g message-style bg=red,fg=white
# style for pane borders
set-option -g pane-active-border-style bg=black,fg=green
set-option -g pane-border-style bg=black,fg=gray
# prefix with ^B or F12
set-option -g prefix C-b
set-option -g prefix2 F12
# enable activity monitoring
setw -g monitor-activity on
# activity style
set -g window-status-activity-style bg=black,fg=red
# disable silence monitoring
setw -g monitor-silence 0
#set-window-option -g window-status-current-style bg=black,fg=green
#set-window-option -g window-status-style bg=black,fg=gray
# bind key to detach client
bind -n F6 detach-client
#bind-key -n C-S-Left swap-window -t -1
#bind-key -n C-S-Right swap-window -t +1
# create new window with F2
bind -n F2 new-window
# previous or next window with Alt & ← | →
bind -n M-Left previous-window
bind -n M-Right next-window
#bind -n S-Down select-pane -D
#bind -n S-Left select-pane -L
#bind -n S-Right select-pane -R
#bind -n S-Up select-pane -U
#bind-key h split-window -h
#bind-key v split-window -v
"
}