From 661df0ed203b4dd355a9aba361a4c1e4cf30d610 Mon Sep 17 00:00:00 2001 From: thek4n Date: Sun, 12 May 2024 20:08:25 +0300 Subject: [PATCH] feat(tmux): mappings --- home/user/.config/tmux/mappings.conf | 11 +++++++++++ home/user/.config/tmux/options.conf | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 4db28fe..da2dee0 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -33,6 +33,10 @@ bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill bind k confirm-before -p "kill current pane? (y/n)" "kill-pane" +# Kill other windows +bind C-x confirm-before -p "kill other windows? (y/n)" "kill-window -a" + + # Kill last session bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\"" @@ -49,6 +53,13 @@ bind ';' command-prompt bind -n M-f resize-pane -Z +# Link window +bind L command-prompt -p "Link window from (session:window):" "link-window -s %% -a" + +# Link pane +bind C-l command-prompt -p "Join pane from (session:window.pane):" "join-pane -s %%" + + # Lock screen bind l confirm-before -p "lock tmux? (y/n)" lock-session diff --git a/home/user/.config/tmux/options.conf b/home/user/.config/tmux/options.conf index d81f404..13588e1 100644 --- a/home/user/.config/tmux/options.conf +++ b/home/user/.config/tmux/options.conf @@ -25,6 +25,14 @@ set -ga terminal-overrides ",xterm-256color:Tc" set -g default-command 'tmux rename-window -t 1 1; $SHELL' set -ga update-environment 'DISPLAY' +set -ga update-environment 'WINDOWID' +set -ga update-environment 'XAUTHORITY' set -ga update-environment 'SSH_CLIENT' +set -ga update-environment 'SSH_ASKPASS' +set -ga update-environment 'SSH_AUTH_SOCK' +set -ga update-environment 'SSH_AGENT_PID' +set -ga update-environment 'SSH_CONNECTION' +set -ga update-environment 'SSH_TTY' + tmux_conf_copy_to_os_clipboard=true \ No newline at end of file