Preserve ssh

This commit is contained in:
2024-06-21 17:28:36 +02:00
parent 74152e04fc
commit e2559a9f85
5 changed files with 38 additions and 3 deletions

9
bin/clone-terminal Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
WINDOW_ID=$(xdotool getactivewindow)
WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2)
if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then
echo $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh) > ~/toto.txt
alacritty -e sh -c "TERMINAL_UUID=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)"
fi