dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

commit 37404dc1b2f9de8187082b3f1ab8c64d144ef637
parent ab3ba388246dbf21ddf3a0878b5a12702a96f4ba
Author: Jake Koroman <jakekoroman@gmail.com>
Date:   Fri, 22 Mar 2024 11:39:30 -0400

script for execing through sways socket. useful for cronjobs

Diffstat:
Ascripts/swaymsg_exec.sh | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/swaymsg_exec.sh b/scripts/swaymsg_exec.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# In cron +# * * * * * $HOME/scripts/swaymsg_exec.sh /bin/notify-send 'hello' + +set -xeu + +uid="$(id -u)" + +for sock in /run/user/"${uid}"/sway-ipc.*.*.sock +do + [ -S "${sock}" ] || continue + swaymsg -s "${sock}" exec -- "$@" +done