diff options
| author | Rokosun <79040025+futureisfoss@users.noreply.github.com> | 2022-10-15 01:25:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-15 01:25:19 +0000 |
| commit | cc7ac4619a698459da2af57bea098f646a2f3d62 (patch) | |
| tree | b5198c5489a4175a3877a667e6910e716c8e062a /.local/bin | |
| parent | 44d740bd44cff63ab74ca44a4b2fb9453d9adb59 (diff) | |
| download | eibhear-cc7ac4619a698459da2af57bea098f646a2f3d62.tar.gz eibhear-cc7ac4619a698459da2af57bea098f646a2f3d62.tar.zst eibhear-cc7ac4619a698459da2af57bea098f646a2f3d62.zip | |
Make sd script work with lf file manager too (#1212)
Now sd script can open a terminal window in the same directory as the currently active lf file manager window
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/sd | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.local/bin/sd b/.local/bin/sd index 371ec64..7e09bf6 100755 --- a/.local/bin/sd +++ b/.local/bin/sd @@ -5,6 +5,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##*"${SHELL##*/}"(}" +PID="${PID#*lf(}" PID="${PID%%)*}" cd "$(readlink /proc/"$PID"/cwd)" || return 1 "$TERMINAL" |
