feat(desktop): make icon theme configurable

This commit is contained in:
Yorick Barbanneau 2025-09-01 01:18:27 +02:00
parent 0fc804a42d
commit ed79106342
Signed by: ephase
GPG key ID: 246042E52B41FFCF
2 changed files with 25 additions and 5 deletions

View file

@ -46,6 +46,24 @@ in
}; };
}; };
iconTheme = mkOption {
type = types.package;
default = pkgs.papirus-icon-theme;
description = ''Icon theme package to use'';
};
iconThemeName = mkOption {
type = types.str;
default = "Papirus Dark";
description = ''Icon theme variant to use'';
};
iconThemePathname = mkOption {
type = types.str;
default = "Papirus-Dark";
description = ''Icon theme variant to use'';
};
waybar = { waybar = {
laptop = mkOption { laptop = mkOption {
type = types.bool; type = types.bool;
@ -136,8 +154,8 @@ in
package = pkgs.arc-theme; package = pkgs.arc-theme;
}; };
iconTheme = { iconTheme = {
name = "Papirus Dark"; name = cfg.iconThemeName;
package = pkgs.papirus-icon-theme; package = cfg.iconTheme;
}; };
font = { font = {
name = "Deja Vu Sans"; name = "Deja Vu Sans";

View file

@ -1,5 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib; with lib;
let
cfg = config.modules.desktop.sway;
in
{ {
config = mkIf config.modules.desktop.sway.enable { config = mkIf config.modules.desktop.sway.enable {
systemd.user.services.mako = { systemd.user.services.mako = {
@ -24,12 +27,11 @@ with lib;
border-radius = 0; border-radius = 0;
border-size = 2; border-size = 2;
icons = true; icons = true;
icon-path = "${cfg.iconTheme}/share/icons/${cfg.iconThemePathname}";
max-icon-size = 64; max-icon-size = 64;
layer = "overlay"; layer = "overlay";
anchor = "top-right"; anchor = "top-right";
format = '' format = ''<span font_scale='small-caps'>%a</span>\n<b>%s</b>\n%b'';
<span font_scale='small-caps'>%a</span>\n<b>%s</b>\n%b
'';
"urgency=high" = { "urgency=high" = {
border-color = "#F268b3"; border-color = "#F268b3";
}; };