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,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkForce;
|
inherit (lib) mkIf;
|
||||||
icon_size = 28;
|
icon_size = 28;
|
||||||
swayncStyle = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/macchiato.css";
|
|
||||||
sha256 = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM=";
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
imports = [inputs.ironbar.homeManagerModules.default];
|
imports = [
|
||||||
home.packages = [pkgs.procps];
|
./swaync.nix
|
||||||
services.swaync = {
|
inputs.ironbar.homeManagerModules.default
|
||||||
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"];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ironbar = {
|
programs.ironbar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = true;
|
systemd = true;
|
||||||
|
@ -111,34 +81,25 @@ in {
|
||||||
type = "upower";
|
type = "upower";
|
||||||
format = "{percentage}%";
|
format = "{percentage}%";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
type = "volume";
|
|
||||||
format = "{icon} {percentage}%";
|
|
||||||
max_volume = 100;
|
|
||||||
icons = {
|
|
||||||
volume_high = "";
|
|
||||||
volume_medium = "";
|
|
||||||
volume_low = "";
|
|
||||||
muted = "";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{type = "clock";}
|
{type = "clock";}
|
||||||
{
|
{
|
||||||
type = "tray";
|
type = "tray";
|
||||||
inherit icon_size;
|
inherit icon_size;
|
||||||
}
|
}
|
||||||
{
|
(mkIf
|
||||||
type = "notifications";
|
config.services.swaync.enable
|
||||||
"show_count" = true;
|
{
|
||||||
icons = {
|
type = "notifications";
|
||||||
"closed_none" = "";
|
"show_count" = true;
|
||||||
"closed_some" = "";
|
icons = {
|
||||||
"closed_dnd" = "";
|
"closed_none" = "";
|
||||||
"open_none" = "";
|
"closed_some" = "";
|
||||||
"open_some" = "";
|
"closed_dnd" = "";
|
||||||
"open_dnd" = "";
|
"open_none" = "";
|
||||||
};
|
"open_some" = "";
|
||||||
}
|
"open_dnd" = "";
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
style = ''
|
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}/services/udiskie.nix"
|
||||||
|
|
||||||
"${home}/programs/niri"
|
"${home}/programs/niri"
|
||||||
"${home}/programs/ironbar"
|
"${home}/programs/ironbar.nix"
|
||||||
"${home}/programs/fuzzel.nix"
|
"${home}/programs/fuzzel.nix"
|
||||||
"${home}/programs/swaybg.nix"
|
"${home}/programs/swaybg.nix"
|
||||||
"${home}/programs/swaylock.nix"
|
"${home}/programs/swaylock.nix"
|
||||||
|
|
Loading…
Reference in a new issue