tmux/long

This commit is contained in:
Marc Beninca 2025-01-18 00:37:58 +01:00
parent 2eb9e5388f
commit fa9405e29f
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

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