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.
|
||||
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Define source and destination paths
|
||||
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||
@@ -795,13 +796,18 @@ in {
|
||||
# Ensure the destination directory exists
|
||||
home-manager.users.${config.home.username}.home.file."${destination_path}".createDir = true;
|
||||
|
||||
# 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: {
|
||||
source = "${source_path}/${name}";
|
||||
target = "${destination_path}/${name}";
|
||||
recursive = true;
|
||||
onChange = "copy";
|
||||
});
|
||||
# Use a script to copy all files from source to destination
|
||||
home-manager.users.${config.home.username}.home.file."${destination_path}/copy-wallpapers.sh".text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
mkdir -p "${destination_path}"
|
||||
cp -r "${source_path}"/* "${destination_path}/"
|
||||
'';
|
||||
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
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
#+END_SRC
|
||||
|
||||
** =generated/hyprland/notifications/top.nix=
|
||||
|
||||
Reference in New Issue
Block a user