Waybar : Fix scratchpad kill.
This commit is contained in:
parent
0ac1617f7f
commit
338b65429f
|
@ -45,7 +45,7 @@ in {
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"tooltip-format": "{app}: {title}",
|
"tooltip-format": "{app}: {title}",
|
||||||
"on-click": "swaymsg 'scratchpad show'",
|
"on-click": "swaymsg 'scratchpad show'",
|
||||||
"on-click-right": "sway_scratchpad_kill"
|
"on-click-right": "swayscript scratchpad_kill"
|
||||||
},
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
// "icon-size": 21,
|
// "icon-size": 21,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
text = ''
|
text = ''
|
||||||
# Kill all windows in Sway scratchpad.
|
# Kill all windows in Sway scratchpad.
|
||||||
function sway_scratchpad_kill() {
|
function scratchpad_kill() {
|
||||||
kill() {
|
kill() {
|
||||||
for window in $(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?) | select(.name == "__i3_scratch").floating_nodes[].id'); do
|
for window in $(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?) | select(.name == "__i3_scratch").floating_nodes[].id'); do
|
||||||
swaymsg [ con_id="$window" ] kill
|
swaymsg [ con_id="$window" ] kill
|
||||||
|
|
Loading…
Reference in a new issue