Ensure btop and other alacritty-without-bash-subshell commands work with cwd
This commit is contained in:
1 parent
95336e730f
commit
05a5bfc9b4
1 file changed
+1
-1
@@ -5,7 +5,7 @@ terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
|
||||
shell_pid=$(pgrep -P "$terminal_pid" | head -n1)
|
||||
|
||||
if [[ -n $shell_pid ]]; then
|
||||
readlink -f "/proc/$shell_pid/cwd" 2>/dev/null
|
||||
readlink -f "/proc/$shell_pid/cwd" 2>/dev/null || echo "$HOME"
|
||||
else
|
||||
echo "$HOME"
|
||||
fi
|
||||
Reference in new issue
Block a user