diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-03-08 20:01:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-08 20:01:00 +0900 |
| commit | 58ff6d436f2180c1bb3ea967636d0715258542a4 (patch) | |
| tree | e0c130bf8479dcfedc79059202a9c4449bc54048 /config/hypr/UserScripts/WallpaperSelect.sh | |
| parent | 8ead68af4e161693f82e5dcd37118d7a2dac24d5 (diff) | |
| parent | a5530ba1c81a482aa8e77db9bf37aa5894d1fa86 (diff) | |
Merge pull request #605 from JaKooLit/development
Development to main
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 88b06dd6..cf677f9c 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -12,6 +12,12 @@ wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" iDIR="$HOME/.config/swaync/images" iDIRi="$HOME/.config/swaync/icons" +# Check if package bc exists +if ! command -v bc &>/dev/null; then +notify-send -i "$iDIR/ja.png" "bc missing" "Install package bc first" +exit 1 +fi + # variables rofi_theme="$HOME/.config/rofi/config-wallpaper.rasi" focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') @@ -28,7 +34,6 @@ adjusted_icon_size=$(echo "$icon_size" | awk '{if ($1 < 15) $1 = 20; if ($1 > 25 # Setting the rofi override with the adjusted icon size rofi_override="element-icon{size:${adjusted_icon_size}%;}" - # swww transition config FPS=60 TYPE="any" @@ -133,10 +138,16 @@ sleep 1 if [[ -n "$choice" ]]; then sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then + + # Check if yad is running to avoid multiple yad notification + if pidof yad > /dev/null; then + killall yad + fi + if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SEQUOIA SDDM Theme" \ --text-align=left \ --title="SDDM Background" \ - --timeout=10 \ + --timeout=5 \ --timeout-indicator=right \ --button="yad-yes:0" \ --button="yad-no:1" \ |
