nix/package/swayscript/script/Util.nix

16 lines
305 B
Nix
Raw Normal View History

{ ... }: {
text = ''
# Find currently active SWAYSOCK paths.
function _sway_find_sockets() {
2024-08-22 11:45:10 +03:00
ls /run/user/''${UID}/sway-ipc.''${UID}.*.sock
}
function _sway_iterate_sockets() {
local IFS=$'\n'
for socket in $(_sway_find_sockets); do
SWAYSOCK="''${socket}" ''${1}
done
}
'';
}