diff options
| author | JaKooLit <jimmielovejay@gmail.com> | 2023-11-30 20:03:40 +0900 |
|---|---|---|
| committer | JaKooLit <jimmielovejay@gmail.com> | 2023-11-30 20:03:40 +0900 |
| commit | 4530ed47e3096a2602f41c58c38d48cf611e9c79 (patch) | |
| tree | 1ba308d0a9906a168e8251d7ff0d327b925b5fe2 /config/hypr/scripts/PywalSwww.sh | |
| parent | 787f790ba19972699c085d8d3cfca1d9c6ed85de (diff) | |
fix for rofi and rainbow issue (I think)
Diffstat (limited to 'config/hypr/scripts/PywalSwww.sh')
| -rwxr-xr-x | config/hypr/scripts/PywalSwww.sh | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index db4d706a..d91d3f60 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -6,6 +6,9 @@ cache_dir="$HOME/.cache/swww/" # Get a list of monitor outputs monitor_outputs=($(ls "$cache_dir")) +# Initialize a flag to determine if the ln command was executed +ln_success=false + # Loop through monitor outputs for output in "${monitor_outputs[@]}"; do # Construct the full path to the cache file @@ -17,17 +20,19 @@ for output in "${monitor_outputs[@]}"; do wallpaper_path=$(cat "$cache_file") # Copy the wallpaper to the location Rofi can access - ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper" + if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then + ln_success=true # Set the flag to true upon successful execution + fi break # Exit the loop after processing the first found monitor output fi done +# Check the flag before executing further commands +if [ "$ln_success" = true ]; then + # execute pywal + # wal -i "$wallpaper_path" -# execute pywal -wal -i $wallpaper_path - -# execute pywal skipping tty and terminal -#wal -i $wallpaper_path -s -t & - -# more info regarding Pywal https://github.com/dylanaraps/pywal/wiki/Getting-Started + # execute pywal skipping tty and terminal changes + wal -i "$wallpaper_path" -s -t & +fi |
