blob: 7a329812508dd840d2fc91ad117b3276db428f3b (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/sh
# Opens a terminal from another terminal's working directory
# we look for the cwd of it's child process
cd $(pwdx $(pstree -p $(xdotool getwindowpid $(xdotool getwindowfocus)) \
| head -1 \
| cut -f3 -d'(' \
| cut -f1 -d')') \
| awk '{print $2}')
setsid ${TERMINAL:-st}
|