colorize wallpaper

This commit is contained in:
Sean Kovacs 2026-02-22 12:17:46 -05:00
commit 81b2f9228c
Signed by: sckova
GPG key ID: 00F325187C68651A

View file

@ -1,5 +1,6 @@
{
pkgs,
config,
...
}:
{
@ -7,7 +8,7 @@
Unit.Description = "Wallpaper service using wbg (daemon)";
Service.ExecStart = ''
${pkgs.wbg}/bin/wbg -s \
%h/.local/share/wallpaper/daily.jpg
%h/.local/share/wallpaper/daily-colored.jpg
'';
Install.WantedBy = [ "niri.service" ];
};
@ -45,7 +46,7 @@
'';
}
);
Service.ExecStartPost = "${pkgs.systemd}/bin/systemctl --user restart wbg-daemon.service";
Service.ExecStartPost = "${pkgs.systemd}/bin/systemctl --user start gowall-convert.service";
Install.WantedBy = [ "niri.service" ];
};
@ -55,4 +56,52 @@
Timer.Persistent = true;
Install.WantedBy = [ "timers.target" ];
};
systemd.user.services.gowall-convert = {
Unit.Description = "Convert a wallpaper to the system color scheme";
Unit.StartLimitBurst = 6;
Unit.StartLimitIntervalSec = "10m";
Service.Restart = "on-failure";
Service.RestartSec = "10s";
Service.Type = "oneshot";
Service.ExecStart = ''
${pkgs.gowall}/bin/gowall convert \
%h/.local/share/wallpaper/daily.jpg \
--output %h/.local/share/wallpaper/daily-colored.jpg \
-t nix
'';
Service.ExecStartPost = "${pkgs.systemd}/bin/systemctl --user restart wbg-daemon.service";
};
home.file.".config/gowall/config.yml".text = with config.scheme.withHashtag; ''
themes:
- name: "nix"
colors:
- "${base06}"
- "${base0F}"
- "${base17}"
- "${base0E}"
- "${base08}"
- "${base12}"
- "${base09}"
- "${base0A}"
- "${base0B}"
- "${base0C}"
- "${base15}"
- "${base16}"
- "${base0D}"
- "${base07}"
- "${base05}"
- "${base07}"
- "${base0D}"
- "${base0D}"
- "${base04}"
- "${base04}"
- "${base04}"
- "${base03}"
- "${base02}"
- "${base00}"
- "${base01}"
- "${base11}"
'';
}