Unverified Commit b455c634 authored by Carlos Ortega's avatar Carlos Ortega Committed by GitHub

Issue #141: Waybar subscription missed opportunity (#142)

* add notifications number in text field * include a mention about this in the README * fix the linting issue... hopefully * print the count as a uint directly
parent 440ca813
......@@ -215,6 +215,15 @@ Waybar css file
}
```
Alternatively, the number of notifications can be shown by adding `{}` anywhere in the `format` field in the Waybar config
```json
"custom/notification": {
"format": "{} {icon}",
...
},
```
## Screenshots
![Screenshot of desktop notification](./assets/desktop.png)
......
......@@ -88,8 +88,8 @@ private void on_subscribe_waybar (uint count, bool dnd, bool cc_open) {
}
print (
"{\"text\": \"\", \"alt\": \"%s\", \"tooltip\": \"%s\", \"class\": %s}\n",
state, tooltip, _class);
"{\"text\": \"%u\", \"alt\": \"%s\", \"tooltip\": \"%s\", \"class\": %s}\n",
count, state, tooltip, _class);
}
private void print_subscribe_waybar () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment