sway: add DND toggle in sway and waybar

This commit is contained in:
Fabio Scotto di Santolo
2026-05-17 21:58:50 +02:00
parent 0aafd5d727
commit 6bb1895201
3 changed files with 24 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
"modules-left": ["sway/workspaces"],
"modules-center": [],
"modules-right": ["cpu", "memory", "disk", "temperature", "backlight", "network", "pulseaudio", "battery", "tray", "clock", "custom/power"],
"modules-right": ["cpu", "memory", "disk", "temperature", "backlight", "network", "pulseaudio", "battery", "tray", "clock", "custom/dnd", "custom/power"],
"sway/workspaces": {
"disable-scroll": true,
@@ -99,6 +99,14 @@
"spacing": 6
},
"custom/dnd": {
"exec": "dunstctl is-paused | grep -q true && echo '{\"text\":\"󰂛\",\"class\":\"paused\"}' || echo '{\"text\":\"󰂚\",\"class\":\"\"}'",
"return-type": "json",
"interval": 2,
"on-click": "dunstctl set-paused toggle",
"tooltip": false
},
"custom/power": {
"format": "⏻",
"tooltip": false,