Waybar : Fix scratchpad kill.

This commit is contained in:
Dmitry Voronin 2024-05-08 23:54:06 +03:00
parent 0ac1617f7f
commit 338b65429f
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ in {
"tooltip": true,
"tooltip-format": "{app}: {title}",
"on-click": "swaymsg 'scratchpad show'",
"on-click-right": "sway_scratchpad_kill"
"on-click-right": "swayscript scratchpad_kill"
},
"tray": {
// "icon-size": 21,

View file

@ -1,7 +1,7 @@
{ ... }: {
text = ''
# Kill all windows in Sway scratchpad.
function sway_scratchpad_kill() {
function scratchpad_kill() {
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