aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMiran Bastaja <mbastaja@sorre.xyz>2025-07-04 15:55:45 +0200
committerMiran Bastaja <mbastaja@sorre.xyz>2025-07-04 15:56:48 +0200
commit2cc0d08c0468e678fb7a942abf23fc2a1eec010f (patch)
tree8bcd5d78f49e15f0ba749e29aa68b3a15779a1e3 /share
parent935f6fcaf608866410454f0801645a2b8223618f (diff)
niri: configure wallpaper switching
Diffstat (limited to 'share')
-rw-r--r--share/home/niri.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/share/home/niri.nix b/share/home/niri.nix
index 450a3e4..eb5822d 100644
--- a/share/home/niri.nix
+++ b/share/home/niri.nix
@@ -2,8 +2,14 @@
pkgs,
config,
inputs,
+ lib,
...
}:
+let
+ cfg = config.programs.niri;
+ tomlFormat = pkgs.formats.toml { };
+ inherit (lib) mkIf;
+in
{
imports = [
inputs.niri-flake.homeModules.niri
@@ -11,6 +17,9 @@
programs.waybar.enable = true;
programs.tofi.enable = true;
programs.kitty.enable = true;
+ home.packages = [
+ pkgs.wpaperd # for wpaperctl
+ ];
programs.niri.settings = {
input = {
@@ -64,6 +73,7 @@
spawn-at-startup = [
{ command = [ "${pkgs.xwayland-satellite}/bin/xwayland-satellite" ]; }
{ command = [ "${pkgs.mako}/bin/mako" ]; }
+ { command = [ "${pkgs.wpaperd}/bin/wpaperd" ]; }
];
environment = {
@@ -233,4 +243,19 @@
"Ctrl+Alt+Delete".action = quit;
};
};
+
+ # wpaperd manual config
+ #
+ # Can't use the HM module since it doesn't expose the service target as a
+ # config option. If I enabled it, wpaperd would be started for every DE, which
+ # I don't want.
+ xdg.configFile."wpaperd/wallpaper.toml" = {
+ source = tomlFormat.generate "wpaperd-wallpaper" {
+ default = {
+ path = "${config.xdg.userDirs.pictures}/Wallpapers";
+ duration = "10m";
+ sorting = "random";
+ };
+ };
+ };
}