This commit is contained in:
@@ -94,6 +94,7 @@ in {
|
|||||||
libnotify
|
libnotify
|
||||||
playerctl
|
playerctl
|
||||||
wl-clipboard-rs # wl-clipboard in rust
|
wl-clipboard-rs # wl-clipboard in rust
|
||||||
|
xfce.xfconf
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
@@ -161,6 +162,9 @@ in {
|
|||||||
Service.TimeoutStopSec = mkForce "1";
|
Service.TimeoutStopSec = mkForce "1";
|
||||||
Service.Restart = mkForce "always";
|
Service.Restart = mkForce "always";
|
||||||
};
|
};
|
||||||
|
xfce4-notifyd = mkGraphicalService {
|
||||||
|
Service.ExecStart = pkgs.xfce.xfce4-notifyd + "/lib/xfce4/notifyd/xfce4-notifyd";
|
||||||
|
};
|
||||||
# xwayland-satellite = mkGraphicalService {
|
# xwayland-satellite = mkGraphicalService {
|
||||||
# Service = {
|
# Service = {
|
||||||
# Type = "simple";
|
# Type = "simple";
|
||||||
|
|||||||
@@ -173,11 +173,34 @@ in {
|
|||||||
dnd-none = "";
|
dnd-none = "";
|
||||||
};
|
};
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec-if = "which swaync-client";
|
exec =
|
||||||
exec = "swaync-client -swb";
|
pkgs.writeShellApplication {
|
||||||
on-click = "swaync-client -t -sw";
|
name = "xfce-notifyd-waybar";
|
||||||
on-click-right = "swaync-client -d -sw";
|
runtimeInputs = with pkgs; [sqlite xfce.xfconf coreutils];
|
||||||
|
text =
|
||||||
|
# bash
|
||||||
|
''
|
||||||
|
is_dnd=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)
|
||||||
|
notifications_count=$(sqlite3 ~/.cache/xfce4/notifyd/log.sqlite "SELECT count(*) FROM notifications WHERE NOT is_read")
|
||||||
|
|
||||||
|
if [[ "$notifications_count" -ne 0 ]]; then
|
||||||
|
icon="notification"
|
||||||
|
else
|
||||||
|
icon="none"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$is_dnd" == "true" ]]; then
|
||||||
|
icon="dnd-$icon"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf '{"text": "%s", "alt": "%s"}' "$notifications_count" "$icon"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
+ "/bin/xfce-notifyd-waybar";
|
||||||
|
on-click = "xfconf-query -c xfce4-notifyd -p /do-not-disturb -T";
|
||||||
|
on-click-right = lib.getExe pkgs.xfce.xfce4-notifyd;
|
||||||
escape = true;
|
escape = true;
|
||||||
|
signal = 1;
|
||||||
};
|
};
|
||||||
"privacy" = {
|
"privacy" = {
|
||||||
icon-spacing = 0;
|
icon-spacing = 0;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ lib.attrsets.recursiveUpdate {
|
|||||||
kanshi = import ./kanshi;
|
kanshi = import ./kanshi;
|
||||||
network-manager-applet.enable = true;
|
network-manager-applet.enable = true;
|
||||||
playerctld.enable = true;
|
playerctld.enable = true;
|
||||||
swaync = import ./swaync;
|
# swaync = import ./swaync;
|
||||||
swayosd.enable = true;
|
swayosd.enable = true;
|
||||||
udiskie.enable = true;
|
udiskie.enable = true;
|
||||||
wpaperd.enable = true;
|
wpaperd.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user