init
This commit is contained in:
35
home/waypaper.nix
Normal file
35
home/waypaper.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.waypaper ];
|
||||
|
||||
home.activation.configureWaypaper = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
CONFIG_FILE="${config.home.homeDirectory}/.config/waypaper/config.ini"
|
||||
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
echo "Erstelle Standard-Waypaper-Konfiguration..."
|
||||
mkdir -p "$(dirname "$CONFIG_FILE")"
|
||||
|
||||
cat > "$CONFIG_FILE" <<EOF
|
||||
[Settings]
|
||||
language = en
|
||||
folder = ${config.home.homeDirectory}/nixos/wallpaper
|
||||
wallpaper = ${config.home.homeDirectory}/nixos/wallpaper/current_wallpaper
|
||||
backend = swww
|
||||
monitors = All
|
||||
fill = fill
|
||||
sort = name
|
||||
color = #ffffff
|
||||
subfolders = False
|
||||
show_hidden = False
|
||||
show_gifs_only = False
|
||||
post_command = cp "\$wallpaper" "${config.home.homeDirectory}/nixos/wallpaper/current_wallpaper" && matugen image "\$wallpaper" --type scheme-vibrant && sleep 0.5 && pkill -USR2 waybar && systemctl --user restart swaync
|
||||
number_of_columns = 3
|
||||
swww_transition_type = fade
|
||||
swww_transition_step = 90
|
||||
swww_transition_angle = 0
|
||||
swww_transition_duration = 2
|
||||
EOF
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user