Browse Source

fix for rofi and rainbow issue (I think)

pull/46/head
JaKooLit 2 years ago
parent
commit
4530ed47e3
  1. 21
      config/hypr/scripts/PywalSwww.sh
  2. 4
      config/hypr/scripts/WallpaperRandom.sh

21
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

4
config/hypr/scripts/WallpaperRandom.sh

@ -29,7 +29,9 @@ while true; do
done \
| sort -n | cut -d':' -f2- \
| while read -r img; do
swww img "$img" && $pywal_script & $pywal_refresh
swww img "$img"
$pywal_script
$pywal_refresh
sleep $INTERVAL
done

Loading…
Cancel
Save