unbreak samedir
This commit is contained in:
parent
7928c52e90
commit
cb7879cd7e
1 changed files with 4 additions and 1 deletions
|
@ -2,4 +2,7 @@
|
||||||
|
|
||||||
# Open a terminal window in the same directory as the currently active window.
|
# Open a terminal window in the same directory as the currently active window.
|
||||||
|
|
||||||
setsid -f $TERMINAL >/dev/null 2>&1
|
PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3)
|
||||||
|
PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')"
|
||||||
|
cd "$(readlink /proc/"$PID"/cwd)" || return 1
|
||||||
|
"$TERMINAL"
|
||||||
|
|
Loading…
Reference in a new issue