summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorRokosun <79040025+futureisfoss@users.noreply.github.com>2022-06-24 03:35:02 +0000
committerGitHub <noreply@github.com>2022-06-24 03:35:02 +0000
commitf03efe97d9d01407691a940d8d6703ab82547bc6 (patch)
treed7d448ac3fd139c0c563ba04adb414388aab046f /.local/bin
parent09ca9e57acf3cbc568842b542379ec57a1184b2e (diff)
downloadeibhear-f03efe97d9d01407691a940d8d6703ab82547bc6.tar.gz
eibhear-f03efe97d9d01407691a940d8d6703ab82547bc6.tar.zst
eibhear-f03efe97d9d01407691a940d8d6703ab82547bc6.zip
fix bug in samedir script (#1127)
samedir didn't work properly when the shell was opened inside lf using the w keybinding, now its fixed.
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/samedir4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/samedir b/.local/bin/samedir
index 0a19707..371ec64 100755
--- a/.local/bin/samedir
+++ b/.local/bin/samedir
@@ -4,7 +4,7 @@
PID=$(xprop -id "$(xprop -root | xprop -root | sed -n "/_NET_ACTIVE_WINDOW/ s/^.*# // p")" | sed -n "/PID/ s/^.*= // p")
PID="$(pstree -lpA "$PID")"
-PID="${PID##*(}"
-PID="${PID%)}"
+PID="${PID##*"${SHELL##*/}"(}"
+PID="${PID%%)*}"
cd "$(readlink /proc/"$PID"/cwd)" || return 1
"$TERMINAL"