2024-11-16 22:00:45 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) mkForce;
|
|
|
|
icon_size = 28;
|
2024-11-16 22:58:58 +00:00
|
|
|
swayncStyle = pkgs.fetchurl {
|
|
|
|
url = "https://github.com/catppuccin/swaync/releases/download/v0.2.3/macchiato.css";
|
|
|
|
sha256 = "sha256-LMm6nWn1JPPgj5YpppwFG3lXTtXem5atlIvqrDxd0bM=";
|
|
|
|
};
|
2024-11-16 22:00:45 +00:00
|
|
|
in {
|
2024-11-13 22:19:57 +00:00
|
|
|
imports = [inputs.ironbar.homeManagerModules.default];
|
2024-11-16 22:00:45 +00:00
|
|
|
home.packages = [pkgs.procps];
|
|
|
|
services.swaync = {
|
|
|
|
enable = true;
|
2024-11-16 22:58:58 +00:00
|
|
|
style = swayncStyle;
|
2024-11-16 22:00:45 +00:00
|
|
|
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"];
|
|
|
|
};
|
|
|
|
|
2024-11-13 22:19:57 +00:00
|
|
|
programs.ironbar = {
|
|
|
|
enable = true;
|
|
|
|
systemd = true;
|
|
|
|
config = {
|
|
|
|
position = "top";
|
|
|
|
anchor_to_edges = true;
|
2024-11-16 22:00:45 +00:00
|
|
|
start = [
|
|
|
|
{
|
|
|
|
bar = [
|
|
|
|
{
|
|
|
|
label = "";
|
|
|
|
name = "power-btn";
|
|
|
|
on_click = "popup:toggle";
|
|
|
|
type = "button";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
class = "power-menu";
|
|
|
|
popup = [
|
|
|
|
{
|
|
|
|
orientation = "vertical";
|
|
|
|
type = "box";
|
|
|
|
widgets = [
|
|
|
|
{
|
|
|
|
label = "Power menu";
|
|
|
|
name = "header";
|
|
|
|
type = "label";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "box";
|
|
|
|
widgets = [
|
|
|
|
{
|
|
|
|
class = "power-btn";
|
|
|
|
label = "<span font-size='40pt'></span>";
|
|
|
|
on_click = "!shutdown now";
|
|
|
|
type = "button";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
class = "power-btn";
|
|
|
|
label = "<span font-size='40pt'></span>";
|
|
|
|
on_click = "!reboot";
|
|
|
|
type = "button";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
label = "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}";
|
|
|
|
name = "uptime";
|
|
|
|
type = "label";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
tooltip = "Up: {{30000:uptime -p | cut -d ' ' -f2-}}";
|
|
|
|
type = "custom";
|
|
|
|
}
|
|
|
|
];
|
2024-11-13 22:19:57 +00:00
|
|
|
center = [
|
|
|
|
{
|
2024-11-16 22:00:45 +00:00
|
|
|
inherit icon_size;
|
2024-11-13 22:19:57 +00:00
|
|
|
type = "focused";
|
|
|
|
show_icon = true;
|
|
|
|
show_title = true;
|
|
|
|
truncate = "end";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
end = [
|
2024-11-16 22:00:45 +00:00
|
|
|
{
|
|
|
|
type = "upower";
|
|
|
|
format = "{percentage}%";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "volume";
|
|
|
|
format = "{icon} {percentage}%";
|
|
|
|
max_volume = 100;
|
|
|
|
icons = {
|
|
|
|
volume_high = "";
|
|
|
|
volume_medium = "";
|
|
|
|
volume_low = "";
|
|
|
|
muted = "";
|
|
|
|
};
|
|
|
|
}
|
2024-11-13 22:19:57 +00:00
|
|
|
{type = "clock";}
|
2024-11-16 22:00:45 +00:00
|
|
|
{
|
|
|
|
type = "tray";
|
|
|
|
inherit icon_size;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
type = "notifications";
|
|
|
|
"show_count" = true;
|
|
|
|
icons = {
|
|
|
|
"closed_none" = "";
|
|
|
|
"closed_some" = "";
|
|
|
|
"closed_dnd" = "";
|
|
|
|
"open_none" = "";
|
|
|
|
"open_some" = "";
|
|
|
|
"open_dnd" = "";
|
|
|
|
};
|
|
|
|
}
|
2024-11-13 22:19:57 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
style = ''
|
|
|
|
.tray .item {
|
2024-11-16 22:00:45 +00:00
|
|
|
min-width: 40px;
|
|
|
|
}
|
2024-11-13 22:19:57 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|