diff --git a/bin/omarchy-cmd-terminal-cwd b/bin/omarchy-cmd-terminal-cwd index cda3991a..062c35fa 100755 --- a/bin/omarchy-cmd-terminal-cwd +++ b/bin/omarchy-cmd-terminal-cwd @@ -2,7 +2,7 @@ # Go from current active terminal to its child shell process and run cwd there terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}') -shell_pid=$(pgrep -P "$terminal_pid" | head -n1) +shell_pid=$(pgrep -P "$terminal_pid" | tail -n1) if [[ -n $shell_pid ]]; then cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)