mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-09 20:47:48 +00:00
Need to grab the last not first pid now
Not entirely sure why!
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Go from current active terminal to its child shell process and run cwd there
|
# Go from current active terminal to its child shell process and run cwd there
|
||||||
terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
|
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
|
if [[ -n $shell_pid ]]; then
|
||||||
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
|
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
|
||||||
|
|||||||
Reference in New Issue
Block a user