Add random wallpaper

This commit is contained in:
muon 2025-12-26 13:21:08 +00:00
parent fc14a394aa
commit b1fdab737c
4 changed files with 46 additions and 23 deletions

View file

@ -21,6 +21,7 @@ in {
mods.desktop.development.enable = true;
mods.desktop.productivity.enable = false;
mods.zen.enable = true;
mods.theme.slideshow.enable = true;
home.packages = with pkgs; [
pulseaudio
@ -35,9 +36,6 @@ in {
enable = true;
hooks.postswitch = {
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
"set-wallpaper" = ''
${lib.getExe pkgs.feh} --bg-fill --nofehbg ${./wallpaper.png}
'';
};
};

View file

@ -14,6 +14,7 @@ in {
./productivity.nix
./media.nix
./zen.nix
./theme.nix
];
mods.hyprland.enable = lib.mkIf cfg.wayland.enable true;

View file

@ -0,0 +1,24 @@
{
lib,
config,
...
}: let
cfg = config.mods.theme.slideshow;
in {
options.mods.theme.slideshow = {
enable = lib.mkEnableOption "enables slideshow wallpaper";
folder = lib.mkOption {
default = "%h/misc/pictures/wallpapers";
description = "slideshow wallpaper folder";
};
};
config = lib.mkIf cfg.enable {
services.random-background = lib.mkIf cfg.enable {
enable = true;
imageDirectory = cfg.folder;
enableXinerama = true;
interval = "1s";
};
};
}

View file

@ -20,18 +20,17 @@ in {
};
config = lib.mkIf cfg.enable {
stylix.enable = true;
stylix.autoEnable = true;
stylix.base16Scheme = cfg.scheme;
stylix.image = cfg.wallpaper;
stylix.cursor = {
stylix = {
enable = true;
autoEnable = true;
base16Scheme = cfg.scheme;
image = cfg.wallpaper;
cursor = {
name = "phinger-cursors-light";
package = pkgs.phinger-cursors;
size = 16;
};
stylix.fonts = {
fonts = {
monospace = {
package = pkgs.nerd-fonts.commit-mono;
name = "CommitMono Nerd Font";
@ -43,6 +42,7 @@ in {
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
};
};
fonts.packages = with pkgs; [
openmoji-color