diff --git a/sh/tmux.sh b/sh/tmux.sh index a12cbae..e822004 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -7,39 +7,39 @@ rwx_tmux_setup() { file="${HOME}/.tmux.conf" rwx_file_write "${file}" "\ # display duration -set -g display-time 1536 +set-option -g display-time 1536 # reload configuration -bind r source-file ${file} \\; display 'Source: ${file}' +bind-key r source-file ${file} \\; display-message 'Source: ${file}' # toggle mouse -bind t set -g mouse \\; display 'Mouse: #{mouse}' +bind-key t set-option -g mouse \\; display-message 'Mouse: #{mouse}' # select sessions with Alt & ↑ | ↓ -bind -n M-Down switch-client -n -bind -n M-Up switch-client -p +bind-key -n M-Down switch-client -n +bind-key -n M-Up switch-client -p # empty name for windows -set -g automatic-rename on -set -g automatic-rename-format '' +set-option -g automatic-rename on +set-option -g automatic-rename-format '' # enable mouse actions -set -g mouse on +set-option -g mouse on # renumber windows after closing one -set -g renumber-windows on +set-option -g renumber-windows on # enable title -set -g set-titles on +set-option -g set-titles on # set title to working directory -set -g set-titles-string '#(pwd)' +set-option -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' +set-option -g status-bg black +set-option -g status-fg gray +set-option -g status-interval 1 +set-option -g status-left '' +set-option -g status-position top +set-option -g status-right '| #{session_name} | %Y-%m-%d %H:%M:%S' # windows separator -set -g window-status-separator ' | ' +set-option -g window-status-separator ' | ' # style for messages set-option -g message-style bg=red,fg=white @@ -52,38 +52,38 @@ set-option -g prefix C-b set-option -g prefix2 F12 # enable activity monitoring -setw -g monitor-activity on +set-window-option -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 monitor-silence 0 # windows style 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 F6 detach-client # swap window with next or previous -bind M-Left swap-window -t -1 -bind M-Right swap-window -t +1 +bind-key M-Left swap-window -t -1 +bind-key M-Right swap-window -t +1 # create new window with F2 -bind -n F2 new-window +bind-key -n F2 new-window # previous or next window with Alt & ← | → -bind -n M-Left previous-window -bind -n M-Right next-window +bind-key -n M-Left previous-window +bind-key -n M-Right next-window # select panes with Ctrl & Shift & ←↑↓→ -bind -n C-S-Down select-pane -D -bind -n C-S-Left select-pane -L -bind -n C-S-Right select-pane -R -bind -n C-S-Up select-pane -U +bind-key -n C-S-Down select-pane -D +bind-key -n C-S-Left select-pane -L +bind-key -n C-S-Right select-pane -R +bind-key -n C-S-Up select-pane -U # horizontal split with H -bind h split-window -h +bind-key h split-window -h # vertical split with V -bind v split-window -v +bind-key v split-window -v " }