diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-11-07 13:49:12 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-07 13:49:12 +0900 |
| commit | fd4c2c3f7566b46eb22c693ea97f25baadf292e2 (patch) | |
| tree | 13f6698c9430bf4ea3ad9ba8d33e09f7f9c7512c /config/hypr/scripts/PywalSwww.sh | |
| parent | 3fa5c6a5973d0cec5801f5b46da87e8ff2b7ee90 (diff) | |
| parent | 56f61f9d90095eb5464bd6f38f606e03f8fd9c33 (diff) | |
Merge pull request #10 from JaKooLit/Beta-v0.4
Hyprland-Dots V2
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 |
