swaymsg_exec.sh (244B)
1 #!/bin/sh 2 3 # In cron 4 # * * * * * $HOME/scripts/swaymsg_exec.sh /bin/notify-send 'hello' 5 6 set -xeu 7 8 uid="$(id -u)" 9 10 for sock in /run/user/"${uid}"/sway-ipc.*.*.sock 11 do 12 [ -S "${sock}" ] || continue 13 swaymsg -s "${sock}" exec -- "$@" 14 done