aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperEffects.sh
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2025-02-16 11:09:08 +0900
committerGitHub <noreply@github.com>2025-02-16 11:09:08 +0900
commit8acfbb16d5ef45960a13cb9768517d3c418771a6 (patch)
tree7b618f6cca7942c3d2876740fca3963092b2da21 /config/hypr/UserScripts/WallpaperEffects.sh
parent349f564bf307ad1ed99c87d028fccdecf7c1bdeb (diff)
parent0c53ef536ca2f028672004e909daac5473e6110f (diff)
Merge pull request #556 from JaKooLit/development
Development to main feat. Rofi Themes
Diffstat (limited to 'config/hypr/UserScripts/WallpaperEffects.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperEffects.sh15
1 files changed, 6 insertions, 9 deletions
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh
index 215fdf6f..2573f5e0 100755
--- a/config/hypr/UserScripts/WallpaperEffects.sh
+++ b/config/hypr/UserScripts/WallpaperEffects.sh
@@ -8,6 +8,7 @@ wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
+rofi_theme="~/.config/rofi/config-wallpaper-effect.rasi"
# Directory for swaync
iDIR="$HOME/.config/swaync/images"
@@ -45,9 +46,7 @@ declare -A effects=(
# Function to apply no effects
no-effects() {
swww img -o "$focused_monitor" "$wallpaper_current" $SWWW_PARAMS &&
- # Wait for swww command to complete
wait $!
- # Run other commands after swww
wallust run "$wallpaper_current" -s &&
wait $!
# Refresh rofi, waybar, wallust palettes
@@ -67,7 +66,7 @@ main() {
[[ "$effect" != "No Effects" ]] && options+=("$effect")
done
- choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config ~/.config/rofi/config-wallpaper-effect.rasi)
+ choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config $rofi_theme)
# Process user choice
if [[ -n "$choice" ]]; then
@@ -77,16 +76,14 @@ main() {
# Apply selected effect
notify-send -u normal -i "$iDIR/ja.png" "Applying:" "$choice effects"
eval "${effects[$choice]}"
- # Wait for effects to be applied
+
sleep 1
- # Execute swww command after image conversion
swww img -o "$focused_monitor" "$wallpaper_output" $SWWW_PARAMS &
- # Wait for swww command to complete
+
sleep 2
- # Wait for other commands to finish
+
wallust run "$wallpaper_output" -s &
- # Wait for other commands to finish
- sleep 0.5
+ sleep 1
# Refresh rofi, waybar, wallust palettes
"${SCRIPTSDIR}/Refresh.sh"
notify-send -u low -i "$iDIR/ja.png" "$choice" "effects applied"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage