nix/package/swayscript/script/Scratchpad.nix

15 lines
344 B
Nix
Raw Normal View History

2024-11-04 04:37:29 +03:00
{ ... }: {
text = ''
# Kill all windows in Sway scratchpad.
function scratchpad_kill() {
2024-11-22 18:44:10 +03:00
notify_short
2024-11-04 04:37:29 +03:00
kill() {
for window in $(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?) | select(.name == "__i3_scratch").floating_nodes[].id'); do
swaymsg [ con_id="$window" ] kill
done
}
_sway_iterate_sockets kill
}
'';
}