summaryrefslogtreecommitdiff
path: root/home-config/sway/scripts.d/scratchpads.sh
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-09-29 10:36:21 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-09-29 10:36:21 -0400
commit2cb639b95fc4d7834a092adf37c9ebec90fe7193 (patch)
tree71785091dbd341919dda5832a2ccceb0601185b6 /home-config/sway/scripts.d/scratchpads.sh
parentupdate configs and virt packages (diff)
downloaddotfiles-guix-2cb639b95fc4d7834a092adf37c9ebec90fe7193.tar.gz
dotfiles-guix-2cb639b95fc4d7834a092adf37c9ebec90fe7193.tar.bz2
dotfiles-guix-2cb639b95fc4d7834a092adf37c9ebec90fe7193.zip
update sway and waybar configuration, hanve around guix packages
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