summaryrefslogtreecommitdiff
path: root/home/config/sway/scripts.d/scratchpads.sh
diff options
context:
space:
mode:
Diffstat (limited to 'home/config/sway/scripts.d/scratchpads.sh')
-rwxr-xr-xhome/config/sway/scripts.d/scratchpads.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/home/config/sway/scripts.d/scratchpads.sh b/home/config/sway/scripts.d/scratchpads.sh
new file mode 100755
index 0000000..bb8e361
--- /dev/null
+++ b/home/config/sway/scripts.d/scratchpads.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+( swaymsg -t get_tree | /bin/grep '"app_id": "'$1'"' ) || ( ( $TERMINAL --class=$1 -e $2 & ) && sleep 0.2 )
+swaymsg "[app_id=\"$1\"]" scratchpad show