mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-09-11 15:56:04 +03:00
* 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
This commit is contained in:
parent
440ca813c7
commit
b455c63479
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user