mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-29 05:29:17 -05:00
Aly Raffauf
aea06d5eda
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
* waybar: increase to proper height 34px * sway: restart sway-session-target at launch * home/services: bind desktop services to sway and hyprland
76 lines
1.8 KiB
Nix
76 lines
1.8 KiB
Nix
{
|
|
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 = {
|
|
Install.WantedBy = lib.mkForce ["hyprland-session.target" "sway-session.target"];
|
|
Service.Restart = lib.mkForce "no";
|
|
Unit.BindsTo = ["hyprland-session.target" "sway-session.target"];
|
|
};
|
|
|
|
xdg.configFile."swayosd/style.css" = {
|
|
text = ''
|
|
window#osd {
|
|
padding: 12px 20px;
|
|
border-radius: ${toString cfg.theme.borderRadius}px;
|
|
border: 4px solid alpha(${cfg.theme.colors.primary}, 0.8);
|
|
background: alpha(${cfg.theme.colors.background}, 0.8);
|
|
}
|
|
|
|
window#osd #container {
|
|
margin: 16px;
|
|
}
|
|
|
|
window#osd image,
|
|
window#osd label {
|
|
color: ${cfg.theme.colors.secondary};
|
|
}
|
|
|
|
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;
|
|
background: alpha(${cfg.theme.colors.secondary}, 0.5);
|
|
}
|
|
|
|
window#osd progress {
|
|
min-height: inherit;
|
|
border-radius: inherit;
|
|
border: none;
|
|
background: ${cfg.theme.colors.secondary};
|
|
}
|
|
'';
|
|
|
|
onChange = ''
|
|
${lib.getExe' pkgs.systemd "systemctl"} restart --user swayosd
|
|
'';
|
|
};
|
|
};
|
|
}
|