Browse Source

Merge pull request #77 from JaKooLit/Development

updated automatic wallpaper change
pull/78/head^2
Ja.KooLit 2 years ago committed by GitHub
parent
commit
948d1db075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      config/hypr/scripts/PywalSwww.sh
  2. 29
      config/hypr/scripts/RefreshNoWaybar.sh
  3. 6
      config/hypr/scripts/WallpaperRandom.sh

4
config/hypr/scripts/PywalSwww.sh

@ -31,8 +31,8 @@ done
# Check the flag before executing further commands
if [ "$ln_success" = true ]; then
# execute pywal
wal -i "$wallpaper_path"
# wal -i "$wallpaper_path"
# execute pywal skipping tty and terminal changes
# wal -i "$wallpaper_path" -s -t &
wal -i "$wallpaper_path" -s -t &
fi

29
config/hypr/scripts/RefreshNoWaybar.sh

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Modified version of Refresh but no waybar refresh
# Used by automatic wallpaper change
# Modified inorder to refresh rofi background, Pywal
SCRIPTSDIR=$HOME/.config/hypr/scripts
# Kill already running processes
_ps=(rofi)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
sleep 0.1
# Relaunch dunst with pywal-borders
${SCRIPTSDIR}/PywalDunst.sh &
# Pywal refresh
${SCRIPTSDIR}/PywalSwww.sh &
# Relaunching rainbow borders
sleep 1
${SCRIPTSDIR}/RainbowBorders.sh &
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true

6
config/hypr/scripts/WallpaperRandom.sh

@ -5,8 +5,7 @@
#
# NOTE: this script uses bash (not POSIX shell) for the RANDOM variable
pywal_script=$HOME/.config/hypr/scripts/PywalSwww.sh
pywal_refresh=$HOME/.config/hypr/scripts/Refresh.sh
pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh
if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then
echo "Usage:
@ -29,8 +28,7 @@ while true; do
| sort -n | cut -d':' -f2- \
| while read -r img; do
swww img "$img"
$pywal_script
$pywal_refresh
$pywal_refresh
sleep $INTERVAL
done

Loading…
Cancel
Save