145 lines
3.6 KiB
Nix
145 lines
3.6 KiB
Nix
{
|
|
lib,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
inherit (lib) mkForce;
|
|
icon_size = 28;
|
|
in {
|
|
imports = [inputs.ironbar.homeManagerModules.default];
|
|
home.packages = [pkgs.procps];
|
|
services.swaync = {
|
|
enable = true;
|
|
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 = {
|
|
enable = true;
|
|
systemd = true;
|
|
config = {
|
|
position = "top";
|
|
anchor_to_edges = true;
|
|
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";
|
|
}
|
|
];
|
|
center = [
|
|
{
|
|
inherit icon_size;
|
|
type = "focused";
|
|
show_icon = true;
|
|
show_title = true;
|
|
truncate = "end";
|
|
}
|
|
];
|
|
end = [
|
|
{
|
|
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" = "";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
style = ''
|
|
.tray .item {
|
|
min-width: 40px;
|
|
}
|
|
'';
|
|
};
|
|
}
|