diff --git a/alacritty.toml b/alacritty.toml index 4578cc5..21c1d89 100644 --- a/alacritty.toml +++ b/alacritty.toml @@ -636,7 +636,7 @@ semantic_escape_chars = ",│`|:\"' ()[]{}<>" [window] decorations = "none" -dynamic_title = true +dynamic_title = false opacity = 0.85 [window.dimensions] diff --git a/bin/clone-terminal b/bin/clone-terminal index 6dc9b62..f2cd5aa 100755 --- a/bin/clone-terminal +++ b/bin/clone-terminal @@ -5,4 +5,6 @@ WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2) if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then alacritty -e sh -c "PARENT_TERMINAL=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)" +else + alacritty -e sh -c "PARENT_TERMINAL=$WM_NAME exec $SHELL" fi diff --git a/zsh/preserve-cwd-ssh.zsh b/zsh/preserve-cwd-ssh.zsh index d3012bf..d8cd39f 100644 --- a/zsh/preserve-cwd-ssh.zsh +++ b/zsh/preserve-cwd-ssh.zsh @@ -1,9 +1,7 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then - if [ -z $TERMINAL_UUID ]; then - export TERMINAL_UUID=$(uuidgen) - fi - echo -en "\e]2;$TERMINAL_UUID\a" - + WINDOW_ID=$(xdotool getactivewindow) + WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2) + export TERMINAL_UUID=$WM_NAME mkdir -p $HOME/.config/terminalscwd/ cd() { builtin cd $1