2024-08-09 20:23:44 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.ar.home;
|
|
|
|
in {
|
|
|
|
config = lib.mkIf cfg.services.swayosd.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
swayosd
|
|
|
|
];
|
|
|
|
|
|
|
|
services.swayosd = {
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
stylePath = "${config.xdg.configHome}/swayosd/style.css";
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.user.services.swayosd = {
|
2024-12-08 22:16:10 -05:00
|
|
|
Install.WantedBy = lib.mkForce (lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target");
|
2024-08-11 23:43:48 -04:00
|
|
|
Service.Restart = lib.mkForce "no";
|
2024-12-08 22:16:10 -05:00
|
|
|
Unit.BindsTo = lib.optional (cfg.desktop.hyprland.enable) "hyprland-session.target";
|
2024-08-09 20:23:44 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile."swayosd/style.css" = {
|
|
|
|
text = ''
|
|
|
|
window#osd {
|
|
|
|
padding: 12px 20px;
|
2024-08-15 18:31:07 -04:00
|
|
|
border-radius: ${toString cfg.theme.borders.radius}px;
|
2024-08-15 18:48:42 -04:00
|
|
|
border: 4px solid alpha(${config.lib.stylix.colors.withHashtag."base0D"}, ${toString config.stylix.opacity.popups});
|
2024-08-15 15:55:39 -04:00
|
|
|
background: alpha(${config.lib.stylix.colors.withHashtag."base01"}, ${toString config.stylix.opacity.popups});
|
2024-08-09 20:23:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window#osd #container {
|
|
|
|
margin: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
window#osd image,
|
|
|
|
window#osd label {
|
2024-08-15 15:55:39 -04:00
|
|
|
color: ${config.lib.stylix.colors.withHashtag."base06"};
|
2024-08-09 20:23:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window#osd progressbar:disabled,
|
|
|
|
window#osd image:disabled {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
window#osd progressbar {
|
|
|
|
min-height: 6px;
|
|
|
|
border-radius: 999px;
|
|
|
|
background: transparent;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
window#osd trough {
|
|
|
|
min-height: inherit;
|
|
|
|
border-radius: inherit;
|
|
|
|
border: none;
|
2024-08-15 15:55:39 -04:00
|
|
|
background: alpha(${config.lib.stylix.colors.withHashtag."base06"}, 0.5);
|
2024-08-09 20:23:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window#osd progress {
|
|
|
|
min-height: inherit;
|
|
|
|
border-radius: inherit;
|
|
|
|
border: none;
|
2024-08-15 15:55:39 -04:00
|
|
|
background: ${config.lib.stylix.colors.withHashtag."base06"};
|
2024-08-09 20:23:44 -04:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
onChange = ''
|
|
|
|
${lib.getExe' pkgs.systemd "systemctl"} restart --user swayosd
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|