@@ 16,6 16,7 @@
"modules-center": [
],
"modules-right": [
+ "custom/dnd",
"idle_inhibitor",
"pulseaudio",
"network",
@@ 51,6 52,18 @@
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
+ "custom/dnd": {
+ "exec": "if makoctl mode | grep -qx do-not-disturb; then echo '{\"alt\":\"on\",\"class\":\"on\",\"tooltip\":\"Do not disturb: on\"}'; else echo '{\"alt\":\"off\",\"class\":\"off\",\"tooltip\":\"Do not disturb: off\"}'; fi",
+ "return-type": "json",
+ "format": "{icon}",
+ "format-icons": {
+ "on": "",
+ "off": ""
+ },
+ "on-click": "makoctl mode -t do-not-disturb; pkill -RTMIN+8 waybar",
+ "signal": 8,
+ "interval": 60
+ },
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
@@ 155,6 168,7 @@
"modules-center": [
],
"modules-right": [
+ "custom/dnd",
"idle_inhibitor",
"pulseaudio",
"network",
@@ 191,6 205,18 @@
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
+ "custom/dnd": {
+ "exec": "if makoctl mode | grep -qx do-not-disturb; then echo '{\"alt\":\"on\",\"class\":\"on\",\"tooltip\":\"Do not disturb: on\"}'; else echo '{\"alt\":\"off\",\"class\":\"off\",\"tooltip\":\"Do not disturb: off\"}'; fi",
+ "return-type": "json",
+ "format": "{icon}",
+ "format-icons": {
+ "on": "",
+ "off": ""
+ },
+ "on-click": "makoctl mode -t do-not-disturb; pkill -RTMIN+8 waybar",
+ "signal": 8,
+ "interval": 60
+ },
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
@@ 84,6 84,7 @@ button:hover {
#custom-media,
#tray,
#mode,
+#custom-dnd,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
@@ 135,6 136,10 @@ button:hover {
padding-right: 15px;
}
+#custom-dnd.on {
+ color: #f53c3c;
+}
+
label:focus {
background-color: #000000;
}