This commit is contained in:
@@ -94,6 +94,7 @@ in {
|
||||
libnotify
|
||||
playerctl
|
||||
wl-clipboard-rs # wl-clipboard in rust
|
||||
xfce.xfconf
|
||||
];
|
||||
|
||||
xdg = {
|
||||
@@ -161,6 +162,9 @@ in {
|
||||
Service.TimeoutStopSec = mkForce "1";
|
||||
Service.Restart = mkForce "always";
|
||||
};
|
||||
xfce4-notifyd = mkGraphicalService {
|
||||
Service.ExecStart = pkgs.xfce.xfce4-notifyd + "/lib/xfce4/notifyd/xfce4-notifyd";
|
||||
};
|
||||
# xwayland-satellite = mkGraphicalService {
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
|
||||
@@ -173,11 +173,34 @@ in {
|
||||
dnd-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
exec =
|
||||
pkgs.writeShellApplication {
|
||||
name = "xfce-notifyd-waybar";
|
||||
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;
|
||||
signal = 1;
|
||||
};
|
||||
"privacy" = {
|
||||
icon-spacing = 0;
|
||||
|
||||
@@ -14,7 +14,7 @@ lib.attrsets.recursiveUpdate {
|
||||
kanshi = import ./kanshi;
|
||||
network-manager-applet.enable = true;
|
||||
playerctld.enable = true;
|
||||
swaync = import ./swaync;
|
||||
# swaync = import ./swaync;
|
||||
swayosd.enable = true;
|
||||
udiskie.enable = true;
|
||||
wpaperd.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user