summaryrefslogtreecommitdiff
path: root/awesome/helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'awesome/helper.sh')
-rwxr-xr-xawesome/helper.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/awesome/helper.sh b/awesome/helper.sh
new file mode 100755
index 0000000..d51fbab
--- /dev/null
+++ b/awesome/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
+}
+
+$@