diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2024-07-07 06:34:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-07 06:34:41 +0900 |
| commit | 1d425834fe4c759ca0c2361dd24cd807b518c216 (patch) | |
| tree | 38d448de0737c496c215440d89cc7c574e41d470 /config/hypr/UserScripts/WallpaperSelect.sh | |
| parent | ce9b8df597095e68c3d5878a931a0f7619f8eaf5 (diff) | |
| parent | e9babc040992e94195d3a6f48b7eaa25e425c505 (diff) | |
Merge pull request #366 from JaKooLit/main
main to ags-dev
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 06859112..d2ca7c28 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -33,8 +33,8 @@ rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" # Sorting Wallpapers menu() { sorted_options=($(printf '%s\n' "${PICS[@]}" | sort)) - # Place ". random" at the beginning - printf "%s\n" "$RANDOM_PIC_NAME" + # Place ". random" at the beginning with the random picture as an icon + printf "%s\x00icon\x1f%s\n" "$RANDOM_PIC_NAME" "$RANDOM_PIC" for pic_path in "${sorted_options[@]}"; do pic_name=$(basename "$pic_path") # Displaying .gif to indicate animated images @@ -59,7 +59,6 @@ main() { # Random choice case if [ "$choice" = "$RANDOM_PIC_NAME" ]; then - RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" swww img -o $focused_monitor "${RANDOM_PIC}" $SWWW_PARAMS exit 0 fi |
