Converted swaync to a home module
This commit is contained in:
parent
4b83423f1c
commit
013c907a95
|
@ -26,5 +26,9 @@
|
|||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
swaync.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
26
modules/home/services/swaync/default.nix
Normal file
26
modules/home/services/swaync/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.services.swaync;
|
||||
in {
|
||||
options.${namespace}.services.swaync = {
|
||||
enable = mkEnableOption "sway notification center";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [pkgs.libnotify];
|
||||
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
widgets = ["title" "dnd" "notifications" "mpris"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.aa.desktop.addons.swaync;
|
||||
in {
|
||||
options.aa.desktop.addons.swaync = {
|
||||
enable = lib.mkEnableOption "sway notification center";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [libnotify];
|
||||
|
||||
aa.home.extraOptions = {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
widgets = ["title" "dnd" "notifications" "mpris"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -141,25 +141,25 @@ in {
|
|||
tooltip-format = "{essid} {signalStrength}%";
|
||||
};
|
||||
|
||||
"custom/notification" = mkIf config.aa.desktop.addons.swaync.enable {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
|
||||
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
||||
on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
# "custom/notification" = mkIf config.aa.desktop.addons.swaync.enable {
|
||||
# tooltip = false;
|
||||
# format = "{icon} {}";
|
||||
# format-icons = {
|
||||
# notification = "<span foreground='red'><sup></sup></span>";
|
||||
# none = "";
|
||||
# dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
# dnd-none = "";
|
||||
# inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
# inhibited-none = "";
|
||||
# dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
# dnd-inhibited-none = "";
|
||||
# };
|
||||
# return-type = "json";
|
||||
# exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
|
||||
# on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
||||
# on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
||||
# escape = true;
|
||||
# };
|
||||
|
||||
tray = {
|
||||
spacing = 10;
|
||||
|
|
|
@ -42,7 +42,6 @@ in {
|
|||
rofi.enable = true;
|
||||
swayidle.enable = true;
|
||||
swaylock.enable = true;
|
||||
swaync.enable = true;
|
||||
waybar.enable = true;
|
||||
|
||||
# TODO
|
||||
|
|
Loading…
Reference in a new issue