aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-12-17 12:24:05 +0900
committerGitHub <noreply@github.com>2023-12-17 12:24:05 +0900
commit948d1db075ec815983628ebf467d0d49bbe1b5e4 (patch)
tree4b2b701c472940680d305d12d508f7eb64843159
parenta9d868a61549b1a8d1e3f4f8b1e7cc13441fddea (diff)
parent1ddbdc34f9544d9d54c1a9c1717955573484eac2 (diff)
Merge pull request #77 from JaKooLit/Development
updated automatic wallpaper change
-rwxr-xr-xconfig/hypr/scripts/PywalSwww.sh4
-rwxr-xr-xconfig/hypr/scripts/RefreshNoWaybar.sh29
-rwxr-xr-xconfig/hypr/scripts/WallpaperRandom.sh6
3 files changed, 33 insertions, 6 deletions
diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh
index fc7b5d3f..d91d3f60 100755
--- a/config/hypr/scripts/PywalSwww.sh
+++ b/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
diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh
new file mode 100755
index 00000000..f177438d
--- /dev/null
+++ b/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 \ No newline at end of file
diff --git a/config/hypr/scripts/WallpaperRandom.sh b/config/hypr/scripts/WallpaperRandom.sh
index b5205723..13bd2995 100755
--- a/config/hypr/scripts/WallpaperRandom.sh
+++ b/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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage