aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJopStro <[email protected]>2021-02-03 13:51:48 +0000
committerJopStro <[email protected]>2021-02-03 13:51:48 +0000
commitc9e4dfd85a82a4fbe7118a05806ec2b6a7465584 (patch)
treed04f10d768d4b34a916e4d79db4a38570f3bc8e1
parent149d722639644d2c2f24e1b301189c7b28b72148 (diff)
Modify check_swallowing_process to allow for a workaround with terminal file managers
-rwxr-xr-xbspswallow5
1 files changed, 4 insertions, 1 deletions
diff --git a/bspswallow b/bspswallow
index 3d98596..0a2e21b 100755
--- a/bspswallow
+++ b/bspswallow
@@ -21,7 +21,10 @@ get_ppid() {
}
check_swallowing_process() {
- [ -z $(get_pid $1) ] && return 0
+ pid=$(get_pid $1)
+ [ -z $pid ] && return 0
+ gppid=$(get_ppid $(get_ppid $pid))
+ grep -i "^$(ps -o cmd= -p $gppid | awk '{print $1}')$" ~/.config/bspwm/terminals && return 0
[ "$(get_ppid "$(get_ppid "$(get_pid "$1")")")" = "$(get_pid "$2")" ] && return 0 || return 1
}