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.
This commit is contained in:
parent
09ca9e57ac
commit
f03efe97d9
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue