petits-scripts-persos/term

4 lines
158 B
Bash
Executable File

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