new wallpaperthingie
This commit is contained in:
+14
-7
@@ -781,6 +781,7 @@ You can edit assets/copy_2_root/wallpaperstuff/wallpaper.conf to change settings
|
|||||||
Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings.
|
Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings.
|
||||||
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, config, pkgs, flakeRoot, ... }:
|
{ lib, config, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Define source and destination paths
|
# Define source and destination paths
|
||||||
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||||
@@ -795,13 +796,18 @@ in {
|
|||||||
# Ensure the destination directory exists
|
# Ensure the destination directory exists
|
||||||
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
|
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
|
||||||
|
|
||||||
# Copy all files from source to destination
|
# Use a script to copy all files from source to destination
|
||||||
home-manager.users.${config.home.username}.home.file."${destination_path}".source = lib.genAttrs (builtins.attrNames (builtins.readDir source_path)) (name: {
|
home-manager.users.${config.home.username}.home.file."${destination_path}/copy-wallpapers.sh".text = ''
|
||||||
source = "${source_path}/${name}";
|
#!${pkgs.bash}/bin/bash
|
||||||
target = "${destination_path}/${name}";
|
mkdir -p "${destination_path}"
|
||||||
recursive = true;
|
cp -r "${source_path}"/* "${destination_path}/"
|
||||||
onChange = "copy";
|
'';
|
||||||
});
|
home-manager.users.${config.home.username}.home.file."${destination_path}/copy-wallpapers.sh".executable = true;
|
||||||
|
|
||||||
|
# Run the script on activation
|
||||||
|
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
||||||
|
"${destination_path}/copy-wallpapers.sh"
|
||||||
|
'';
|
||||||
|
|
||||||
# Install wpaperd
|
# Install wpaperd
|
||||||
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
||||||
@@ -810,6 +816,7 @@ in {
|
|||||||
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =generated/hyprland/notifications/top.nix=
|
** =generated/hyprland/notifications/top.nix=
|
||||||
|
|||||||
Reference in New Issue
Block a user