nix/package/swayscript/script/Scratchpad.sh

11 lines
297 B
Bash
Raw Permalink Normal View History

2024-12-18 11:11:25 +03:00
# Kill all windows in Sway scratchpad.
function scratchpad_kill() {
# notify_short
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
}