diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-11-05 14:02:06 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-11-05 14:02:06 +0900 |
| commit | a153022b7d457466db9140c62dc5564f9de7a3af (patch) | |
| tree | f3eeb3a6d892373678f7d86b3b095583d82aeb96 /config/hypr/scripts/PywalSwww.sh | |
| parent | 3fa5c6a5973d0cec5801f5b46da87e8ff2b7ee90 (diff) | |
changes for new Hyprland-Dots
Diffstat (limited to 'config/hypr/scripts/PywalSwww.sh')
| -rwxr-xr-x | config/hypr/scripts/PywalSwww.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh new file mode 100755 index 00000000..1532878a --- /dev/null +++ b/config/hypr/scripts/PywalSwww.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Define the path to the swww cache directory +cache_dir="$HOME/.cache/swww/" + +# Get a list of monitor outputs +monitor_outputs=($(ls "$cache_dir")) + +# Loop through monitor outputs +for output in "${monitor_outputs[@]}"; do + # Construct the full path to the cache file + cache_file="$cache_dir$output" + + # Check if the cache file exists for the current monitor output + if [ -f "$cache_file" ]; then + # Get the wallpaper path from the cache file + wallpaper_path=$(cat "$cache_file") + + # Copy the wallpaper to the location Rofi can access + cp "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper" + + break # Exit the loop after processing the first found monitor output + fi +done + + +# execute pywal + +wal -i $wallpaper_path
\ No newline at end of file |
