Laptop #2

Closed
thomasave wants to merge 119 commits from laptop into master
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 1094608c76 - Show all commits

View File

@ -10,7 +10,7 @@ then
if [ $PROCESS == "ssh" ]
then
PORT=$(ss -tnpa | grep ssh | grep "pid=$GRAND_CHILD_PID" | awk '{ print $4 }' | grep -o '[0-9]*$')
alacritty -e $COMMAND -t "cd \$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd); zsh --login"
alacritty -e $COMMAND -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login"
exit 0
fi
fi

View File

@ -167,6 +167,11 @@ function o () {
xdg-open "$1" &!
}
if [ "$SSH_CLIENT" ]
then
source_port=$(echo $SSH_CLIENT | awk '{ print $2 }')
echo $$ > /tmp/ssh_session_$source_port
fi
if [[ "$TERM" == (Eterm*|alacritty*|aterm*|gnome*|konsole*|kterm*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
add-zsh-hook -Uz precmd xterm_title_precmd