diff --git a/modules/home-manager/scripts/hyprland/start_services.sh b/modules/home-manager/scripts/hyprland/start_services.sh index e0e509f..59c3a09 100755 --- a/modules/home-manager/scripts/hyprland/start_services.sh +++ b/modules/home-manager/scripts/hyprland/start_services.sh @@ -15,25 +15,11 @@ waybar & # xwaylandvideobridge & + # -## Start wallpaper daemon and set one. +# Start wallpaper daemon # -OUTPUT_1="DP-2" -IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-vqlvm8.jpg" - -OUTPUT_2="DP-3" -IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-2yl6px.jpg" - -function load_wallpapers() { - swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; - swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_2 $IMAGE_2 -} - -if ! swww query; then - swww-daemon & -fi - -load_wallpapers & +~/.local/share/scripts/wallpaper.sh & # # Start notification daemon. diff --git a/specific/desktop/home-manager.nix b/specific/desktop/home-manager.nix index 729719b..c86fa5c 100644 --- a/specific/desktop/home-manager.nix +++ b/specific/desktop/home-manager.nix @@ -29,6 +29,35 @@ EDITOR = "nvim"; }; + home.file = { + # Create wallpaper script to be read by the start_services.sh script. + ".local/share/scripts/wallpaper.sh" = { + executable = true; + text = # sh + '' + # + ## Start wallpaper daemon and set one. + # + OUTPUT_1="DP-2" + IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-vqlvm8.jpg" + + OUTPUT_2="DP-3" + IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-2yl6px.jpg" + + function load_wallpapers() { + swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; + swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_2 $IMAGE_2 + } + + if ! swww query; then + swww-daemon & + fi + + load_wallpapers & + ''; + }; + }; + # Add monitor configuration to hyprland modules.hyprland.extraConfig = # hyprlang '' diff --git a/specific/laptop/home-manager.nix b/specific/laptop/home-manager.nix index ef4839c..9f00157 100644 --- a/specific/laptop/home-manager.nix +++ b/specific/laptop/home-manager.nix @@ -28,6 +28,31 @@ EDITOR = "nvim"; }; + home.file = { + # Create wallpaper script to be read by the start_services.sh script. + ".local/share/scripts/wallpaper.sh" = { + executable = true; + text = # sh + '' + # + ## Start wallpaper daemon and set one. + # + OUTPUT_1="eDP-1" + IMAGE_1="/home/wizardlink/Pictures/wallhaven-x6p3y3.jpg" + + function load_wallpapers() { + swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; + } + + if ! swww query; then + swww-daemon & + fi + + load_wallpapers & + ''; + }; + }; + # Add monitor configuration to hyprland modules.hyprland.extraConfig = # hyprlang ''