gui(niri): Use waypaper to play wallpaper instead of swaybg
This commit is contained in:
parent
2688e918d9
commit
9e7124071b
4 changed files with 47 additions and 3 deletions
43
home/modules/programs/waypaper.nix
Normal file
43
home/modules/programs/waypaper.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.waypaper;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.waypaper = {
|
||||
enable = lib.mkEnableOption "waypaper";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [waypaper socat mpvpaper];
|
||||
systemd.user = {
|
||||
timers."waypaper" = {
|
||||
Unit = {
|
||||
Description = "Set a random wallpaper every 10 minutes";
|
||||
};
|
||||
Timer = {
|
||||
Persistent = true;
|
||||
OnCalendar = "*:0/10";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
};
|
||||
services."waypaper" = {
|
||||
Unit = {
|
||||
Description = "Set a random wallpaper with waypaper";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = lib.escapeShellArgs [
|
||||
(lib.getExe pkgs.waypaper)
|
||||
"--random"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue