mirror of
https://github.com/kmein/niveum
synced 2026-03-21 04:11:07 +01:00
dunst: add command to list recent notifications
This commit is contained in:
@@ -4,7 +4,18 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (import ../lib) defaultApplications theme;
|
inherit (import ../lib) defaultApplications theme;
|
||||||
|
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||||
in {
|
in {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writers.writeDashBin "notifications" ''
|
||||||
|
${pkgs.dunst}/bin/dunstctl history \
|
||||||
|
| ${pkgs.jq}/bin/jq -r '
|
||||||
|
.data[]
|
||||||
|
| map("${sgr "90" ''\(.appname.data)''} ${sgr "1" ''\(.summary.data)''} ${sgr "31" ''\(.body.data | gsub("\n"; " | "))''}")
|
||||||
|
| join("\n")'
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.me.services.dunst = {
|
home-manager.users.me.services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = (theme pkgs).icon;
|
iconTheme = (theme pkgs).icon;
|
||||||
|
|||||||
Reference in New Issue
Block a user