summaryrefslogtreecommitdiff
path: root/helper.sh
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2021-12-25 14:47:55 -0600
committerzachir <zachir@librem.one>2021-12-25 14:47:55 -0600
commit9c4de3e4a9eb8da6eba7c4863d44b2f13f66732d (patch)
tree9400a011eed2abb76e8f21b36d245c544349f2cf /helper.sh
parent6adae30b6339c7ce135a1827e1b45770361032b0 (diff)
add window swallowing (a la dwm)
Diffstat (limited to 'helper.sh')
-rwxr-xr-xhelper.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/helper.sh b/helper.sh
new file mode 100755
index 0000000..d51fbab
--- /dev/null
+++ b/helper.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+ppid() {
+ printf "$(ps -o ppid= -p $1)" | xargs
+}
+
+gppid() {
+ PARENT=$(ps -o ppid= -p $1)
+ GRANDPARENT=$(ps -o ppid= -p $PARENT)
+ printf "$GRANDPARENT" | xargs
+}
+
+$@