dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | #!/usr/bin/env python3 |
| 2 | """Prints dunst's most recent notifications as a JSON list for the Eww notifications panel. |
| 3 | |
| 4 | Reads `dunstctl history` (newest first) and keeps the last LIMIT entries. Dunst only |
| 5 | moves a notification into its history once it has left the screen. |
| 6 | """ |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | = 10 |
| 14 | = 160 |
| 15 | |
| 16 | |
| 17 | |
| 18 | """Dunst bodies may carry Pango/HTML markup; show them as plain text.""" |
| 19 | = |
| 20 | return |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | = . |
| 26 | = |
| 27 | |
| 28 | = |
| 29 | |
| 30 | # Dunst timestamps are microseconds on the monotonic clock, not wall-clock time. |
| 31 | = - |
| 32 | = |
| 33 | |
| 34 | |
| 35 | return |
| 36 | |
| 37 | = |
| 38 | |
| 39 | = + |
| 40 | |
| 41 | = |
| 42 | |
| 43 | = |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |