treewide: move swaync to a separate file
This commit is contained in:
parent
38b8af19d5
commit
4f944b2f9c
3 changed files with 85 additions and 60 deletions
|
@ -1,46 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkForce;
|
||||
inherit (lib) mkIf;
|
||||
icon_size = 28;
|
||||
swayncStyle = pkgs.fetchurl {
|
||||
url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/macchiato.css";
|
||||
sha256 = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM=";
|
||||
};
|
||||
in {
|
||||
imports = [inputs.ironbar.homeManagerModules.default];
|
||||
home.packages = [pkgs.procps];
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
style = swayncStyle;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "application";
|
||||
control-center-margin-top = 0;
|
||||
control-center-margin-bottom = 0;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swaync = {
|
||||
Install.WantedBy = mkForce ["graphical-session.target"];
|
||||
Unit.ConditionEnvironment = mkForce "";
|
||||
Unit.PartOf = lib.mkForce ["graphical-session.target"];
|
||||
};
|
||||
|
||||
imports = [
|
||||
./swaync.nix
|
||||
inputs.ironbar.homeManagerModules.default
|
||||
];
|
||||
programs.ironbar = {
|
||||
enable = true;
|
||||
systemd = true;
|
||||
|
@ -111,34 +81,25 @@ in {
|
|||
type = "upower";
|
||||
format = "{percentage}%";
|
||||
}
|
||||
{
|
||||
type = "volume";
|
||||
format = "{icon} {percentage}%";
|
||||
max_volume = 100;
|
||||
icons = {
|
||||
volume_high = "";
|
||||
volume_medium = "";
|
||||
volume_low = "";
|
||||
muted = "";
|
||||
};
|
||||
}
|
||||
{type = "clock";}
|
||||
{
|
||||
type = "tray";
|
||||
inherit icon_size;
|
||||
}
|
||||
{
|
||||
type = "notifications";
|
||||
"show_count" = true;
|
||||
icons = {
|
||||
"closed_none" = "";
|
||||
"closed_some" = "";
|
||||
"closed_dnd" = "";
|
||||
"open_none" = "";
|
||||
"open_some" = "";
|
||||
"open_dnd" = "";
|
||||
};
|
||||
}
|
||||
(mkIf
|
||||
config.services.swaync.enable
|
||||
{
|
||||
type = "notifications";
|
||||
"show_count" = true;
|
||||
icons = {
|
||||
"closed_none" = "";
|
||||
"closed_some" = "";
|
||||
"closed_dnd" = "";
|
||||
"open_none" = "";
|
||||
"open_some" = "";
|
||||
"open_dnd" = "";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
style = ''
|
64
home/programs/swaync.nix
Normal file
64
home/programs/swaync.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkForce;
|
||||
swayncStyle = pkgs.fetchurl {
|
||||
url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/macchiato.css";
|
||||
sha256 = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM=";
|
||||
};
|
||||
in {
|
||||
home.packages = [pkgs.procps];
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
style = swayncStyle;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "application";
|
||||
control-center-margin-top = 0;
|
||||
control-center-margin-bottom = 0;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
widgets = [
|
||||
"title"
|
||||
"dnd"
|
||||
"mpris"
|
||||
"notifications"
|
||||
"volume"
|
||||
];
|
||||
widget-config = {
|
||||
title = {
|
||||
text = "Notifications";
|
||||
clear-all-button = true;
|
||||
button-text = "";
|
||||
};
|
||||
dnd = {
|
||||
text = "Do Not Disturb";
|
||||
};
|
||||
mpris = {
|
||||
blur = true;
|
||||
};
|
||||
volume = {
|
||||
label = "";
|
||||
show-per-app = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swaync = {
|
||||
Install.WantedBy = mkForce ["graphical-session.target"];
|
||||
Unit.ConditionEnvironment = mkForce "";
|
||||
Unit.PartOf = lib.mkForce ["graphical-session.target"];
|
||||
};
|
||||
}
|
|
@ -34,7 +34,7 @@ in {
|
|||
"${home}/services/udiskie.nix"
|
||||
|
||||
"${home}/programs/niri"
|
||||
"${home}/programs/ironbar"
|
||||
"${home}/programs/ironbar.nix"
|
||||
"${home}/programs/fuzzel.nix"
|
||||
"${home}/programs/swaybg.nix"
|
||||
"${home}/programs/swaylock.nix"
|
||||
|
|
Loading…
Reference in a new issue