tmux comfy mappings

This commit is contained in:
thek4n 2024-03-23 01:22:29 +03:00
parent be4bbf5123
commit 58c489c3e9
2 changed files with 24 additions and 17 deletions

View File

@ -8,23 +8,23 @@ bind | split-window -h -c "#{pane_current_path}"
bind \\ split-window -v -c "#{pane_current_path}" bind \\ split-window -v -c "#{pane_current_path}"
bind -n M-Enter split-window -h -c "#{pane_current_path}" bind -n M-Enter split-window -h -c "#{pane_current_path}"
bind -n M-t new-window
bind -n M-h select-pane -L bind -n M-h select-pane -L
bind -n M-l select-pane -R bind -n M-l select-pane -R
bind -n M-j select-pane -D bind -n M-j select-pane -D
bind -n M-k select-pane -U bind -n M-k select-pane -U
bind -n C-M-h next-window bind -n C-M-h previous-window
bind -n C-M-l previous-window bind -n C-M-l next-window
bind -n M-1 select-window -t 1 bind -n M-1 new-window -n 1 -S
bind -n M-2 select-window -t 2 bind -n M-2 new-window -n 2 -S
bind -n M-3 select-window -t 3 bind -n M-3 new-window -n 3 -S
bind -n M-5 select-window -t 5 bind -n M-4 new-window -n 4 -S
bind -n M-6 select-window -t 6 bind -n M-5 new-window -n 5 -S
bind -n M-7 select-window -t 7 bind -n M-6 new-window -n 6 -S
bind -n M-8 select-window -t 8 bind -n M-7 new-window -n 7 -S
bind -n M-9 select-window -t 9 bind -n M-8 new-window -n 8 -S
bind -n M-0 select-window -t 10 bind -n M-9 new-window -n 9 -S
bind -n M-0 new-window -n 10 -S
set-option -ga terminal-overrides ",xterm-256color:Tc" set-option -ga terminal-overrides ",xterm-256color:Tc"
@ -36,6 +36,9 @@ set -g status-right '%d.%m.%Y %H:%M'
set -g status-style 'bg=default,fg=white' set -g status-style 'bg=default,fg=white'
set -g window-status-style 'bg=default' set -g window-status-style 'bg=default'
set -g window-status-current-style 'bg=white,fg=black bold' set -g window-status-current-style 'bg=white,fg=black bold'
set -g window-status-format '#W#{?window_flags,#{window_flags}, }'
set -g window-status-current-format '#W#{?window_flags,#{window_flags}, }'
set -g message-style 'fg=black bg=white bold' set -g message-style 'fg=black bg=white bold'
set-option -g bell-action none set-option -g bell-action none
@ -46,15 +49,15 @@ set-option -g repeat-time 0
set -ga update-environment 'DISPLAY' # Maybe fix DISPLAY? set -ga update-environment 'DISPLAY' # Maybe fix DISPLAY?
set -g base-index 1 ## Window numbering starts at 1 set -g base-index 1 ## Window numbering starts at 1
set -g pane-base-index 1 ## Pane numbering starts at 1 set -g pane-base-index 1 ## Pane numbering starts at 1
setw -g automatic-rename on ## Auto set window title
setw -g aggressive-resize on ## Aggressive windows: For screen size, of diff connections, on diff windows setw -g aggressive-resize on ## Aggressive windows: For screen size, of diff connections, on diff windows
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
set -g history-limit 10000 ## Scroll back history set -g history-limit 10000 ## Scroll back history
set -g display-panes-time 4000 ## Increase show pane time set -g display-panes-time 4000 ## Increase show pane time
set -g renumber-windows on ## Make windows auto renumber set -g renumber-windows on ## Make windows auto renumber
set -g lock-command vlock set -g lock-command vlock
set -g default-command 'tmux rename-window -t 1 1; $SHELL'
bind C-r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..." bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
## Lock screen ## Lock screen
bind-key -T prefix C-x confirm-before -p "lock tmux? (y/n)" lock-session bind-key -T prefix C-x confirm-before -p "lock tmux? (y/n)" lock-session
@ -73,9 +76,13 @@ set -g set-titles-string '#S:#I.#P #W'
setw -g clock-mode-colour green setw -g clock-mode-colour green
setw -g clock-mode-style 24 setw -g clock-mode-style 24
bind 1 source-file ~/.tmux/01.conf bind 1 source-file ~/.tmux/01.conf
bind 2 source-file ~/.tmux/02.conf bind 2 source-file ~/.tmux/02.conf
bind 3 source-file ~/.tmux/03.conf bind 3 source-file ~/.tmux/03.conf
bind 4 source-file ~/.tmux/04.conf bind 4 source-file ~/.tmux/04.conf
bind 5 source-file ~/.tmux/05.conf bind 5 source-file ~/.tmux/05.conf
bind 6 source-file ~/.tmux/06.conf
bind 7 source-file ~/.tmux/07.conf
bind 8 source-file ~/.tmux/08.conf
bind 9 source-file ~/.tmux/09.conf
bind 0 source-file ~/.tmux/10.conf

View File

@ -2,5 +2,5 @@
SESSION=s01 SESSION=s01
MAINW=1 MAINW=1
new-session -s ${SESSION} -A -n ${MAINW} -c "$WORKING_PROJECT" "$EDITOR" new-session -s ${SESSION} -A -n ${MAINW} -c "$WORKING_PROJECT" "$EDITOR"
send-keys -t ${SESSION}:${MAINW} M-1 send-keys -t ${SESSION}:${MAINW} , 1
splitw -t ${SESSION}:${MAINW} -d -h -l 40% -c '#{pane_current_path}' splitw -t ${SESSION}:${MAINW} -d -h -l 40% -c '#{pane_current_path}'