From b358f7e5bbc20ccc99cd14b3cf72043aba5eca34 Mon Sep 17 00:00:00 2001 From: thek4n Date: Thu, 28 Mar 2024 15:24:26 +0300 Subject: [PATCH] remote tmux features --- home/user/.config/bash/functions | 6 ++++++ home/user/.config/tmux/mappings.conf | 3 +++ 2 files changed, 9 insertions(+) diff --git a/home/user/.config/bash/functions b/home/user/.config/bash/functions index 9df76b3..fbbc369 100644 --- a/home/user/.config/bash/functions +++ b/home/user/.config/bash/functions @@ -227,4 +227,10 @@ most-often-commands() { # Enable X11Forwarding and disable mux session sshx() { ssh -X -o ControlMaster=no -o ControlPath=none $@ +} + +# Open remote tmux +ssht() { + REMOTE="$1"; shift + ssh -t "$REMOTE" tmux -u "$@" } \ No newline at end of file diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index f39cc41..a4c9953 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -2,6 +2,9 @@ set -g prefix C-b +# Ctrl+a to send prefix to remote tmux +bind-key -n C-a send-prefix + # Zoom pane bind -n M-f resize-pane -Z