summaryrefslogtreecommitdiff
path: root/home/config/sway/scripts.d/scratchpads.sh
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-06-21 22:52:21 -0400
committerFreya Murphy <freya@freyacat.org>2024-06-21 22:52:21 -0400
commitcf5d8d92f1904511006a89970349dbf723ae1732 (patch)
tree2deb7af8e9031a502b6b7f1c263198e4d6b93f9f /home/config/sway/scripts.d/scratchpads.sh
parentupdate guixstrap (diff)
downloaddotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.tar.gz
dotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.tar.bz2
dotfiles-guix-cf5d8d92f1904511006a89970349dbf723ae1732.zip
update things
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