petits-scripts-persos/term
Adrian Amaglio 679a0ff8ce big update
2023-01-24 23:56:39 +01:00

5 lines
177 B
Bash
Executable File

#!/bin/bash
pid="$(xdotool getactivewindow getwindowpid)"
[ -n "$pid" ] && cd "$(readlink -f "/proc/$(pgrep -P "$pid")/cwd")" &>/dev/null || cd "$HOME"
exec st "${SHELL:-bash}"