Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

by logic working script sometimes work #196

Open
littleblack111 opened this issue Aug 31, 2024 · 0 comments
Open

by logic working script sometimes work #196

littleblack111 opened this issue Aug 31, 2024 · 0 comments

Comments

@littleblack111
Copy link

this is the script:

#!/bin/bash
XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}"
WALLPAPERS="$XDG_PICTURES_DIR/wallpapers/"
wallpappath=$(find "$WALLPAPERS" | shuf -n 1)
# make it wallpaper the already preloaded one and preload for next time
hyprctl hyprpaper wallpaper ", $(hyprctl hyprpaper listloaded)"
hyprctl hyprpaper unload $(hyprctl hyprpaper listloaded)

hyprctl hyprpaper preload $wallpappath

by logic. it loads the preloaded script. then unload all prev preloaded script and preload the next script so it can load it next time. sounds flawless. but in testing. it will just stop working sometimes. this is log when it stopped working:

[LOG] Welcome to hyprpaper!
built from commit  ()
[LOG] Cleaned old hyprpaper preloads (1), removing 14.7MB
[WARN] Monitor DP-1 does not have a target! A wallpaper will not be created.
[LOG] hyprpaper socket started at /run/user/1000/hypr/9a09eac79b85c846e3a865a9078a3f8ff65a9259_1725094491_554406650/.hyprpaper.sock (fd: 4)
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 0
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: wallpaper , no wallpapers loaded
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 0
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload no wallpapers loaded
[LOG] Cannot unload a target that was not loaded!
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/system/Pictures/wallpapers/0302.jpg
[LOG] Preloaded target /home/system/Pictures/wallpapers/0302.jpg in 25.87ms -> Pixel size: [1680, 1050]
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0302.jpg, Shared Memory usage: 132.7MB
[LOG] Total SM usage for all buffers: 132.7MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: wallpaper , /home/system/Pictures/wallpapers/0302.jpg
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0302.jpg, Shared Memory usage: 33.2MB
[LOG] Total SM usage for all buffers: 165.9MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload /home/system/Pictures/wallpapers/0302.jpg
[LOG] Unloading target /home/system/Pictures/wallpapers/0302.jpg, preload path /run/user/1000/.hyprpaper_d6iw8x
[LOG] Unloading target /home/system/Pictures/wallpapers/0302.jpg, preload path /run/user/1000/.hyprpaper_s3Dl6P
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/system/Pictures/wallpapers/0212.jpg
[LOG] Preloaded target /home/system/Pictures/wallpapers/0212.jpg in 23.16ms -> Pixel size: [2160, 1440]
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0212.jpg, Shared Memory usage: 33.2MB
[LOG] Total SM usage for all buffers: 33.2MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] configure for DP-1
[LOG] handlePreferredScale: 1.00 for 75f564001840
[LOG] configure for DP-1
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0212.jpg, Shared Memory usage: 14.7MB
[LOG] Total SM usage for all buffers: 47.9MB
[LOG] Image data for DP-1: /home/system/Pictures/wallpapers/0212.jpg at [0.00, -112.50], scale: 1.19 (original image size: [2160, 1440])
[LOG] Rendering splash: h
[LOG] Splash color: 55ffffff
[LOG] Splash font size: 15, pos: 1076.80, 1178.89
[LOG] Submitting viewport dest size 2560x1440 for 64001840
[LOG] handlePreferredScale: 1.50 for 75f564001840
[LOG] Image data for DP-1: /home/system/Pictures/wallpapers/0212.jpg at [0.00, -112.50], scale: 1.78 (original image size: [2160, 1440])
[LOG] Rendering splash: h
[LOG] Splash color: 55ffffff
[LOG] Splash font size: 15, pos: 1077.94, 1178.89
[LOG] Submitting viewport dest size 2560x1440 for 64001840
[LOG] handlePreferredScale: 1.50 for 75f564001840
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: wallpaper , /home/system/Pictures/wallpapers/0212.jpg
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0212.jpg, Shared Memory usage: 59.0MB
[LOG] Total SM usage for all buffers: 106.9MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload /home/system/Pictures/wallpapers/0212.jpg
[LOG] Unloading target /home/system/Pictures/wallpapers/0212.jpg, preload path /run/user/1000/.hyprpaper_ROBK9t
[LOG] Unloading target /home/system/Pictures/wallpapers/0212.jpg, preload path /run/user/1000/.hyprpaper_hmbxRL
[LOG] Unloading target /home/system/Pictures/wallpapers/0212.jpg, preload path /run/user/1000/.hyprpaper_lDeljV
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/system/Pictures/wallpapers/0217.jpg
[LOG] Preloaded target /home/system/Pictures/wallpapers/0217.jpg in 12.75ms -> Pixel size: [1920, 1080]
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0217.jpg, Shared Memory usage: 14.7MB
[LOG] Total SM usage for all buffers: 14.7MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] configure for DP-1
[LOG] handlePreferredScale: 1.00 for 75f564001940
[LOG] configure for DP-1
[LOG] Image data for DP-1: /home/system/Pictures/wallpapers/0217.jpg at [-0.00, 0.00], scale: 1.33 (original image size: [1920, 1080])
[LOG] Rendering splash: h
[LOG] Splash color: 55ffffff
[LOG] Splash font size: 14, pos: 957.19, 1047.90
[LOG] Submitting viewport dest size 2560x1440 for 64001940
[LOG] handlePreferredScale: 1.50 for 75f564001940
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0217.jpg, Shared Memory usage: 33.2MB
[LOG] Total SM usage for all buffers: 47.9MB
[LOG] Image data for DP-1: /home/system/Pictures/wallpapers/0217.jpg at [-0.00, 0.00], scale: 2.00 (original image size: [1920, 1080])
[LOG] Rendering splash: h
[LOG] Splash color: 55ffffff
[LOG] Splash font size: 14, pos: 958.25, 1047.40
[LOG] Submitting viewport dest size 2560x1440 for 64001940
[LOG] handlePreferredScale: 1.50 for 75f564001940
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: wallpaper , /home/system/Pictures/wallpapers/0217.jpg
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0217.jpg, Shared Memory usage: 59.0MB
[LOG] Total SM usage for all buffers: 106.9MB
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: listloaded
[LOG] numWallpapersLoaded: 1
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: unload /home/system/Pictures/wallpapers/0217.jpg
[LOG] Unloading target /home/system/Pictures/wallpapers/0217.jpg, preload path /run/user/1000/.hyprpaper_BS2Cnr
[LOG] Unloading target /home/system/Pictures/wallpapers/0217.jpg, preload path /run/user/1000/.hyprpaper_FtREXh
[LOG] Unloading target /home/system/Pictures/wallpapers/0217.jpg, preload path /run/user/1000/.hyprpaper_O3r7xJ
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Received a request: preload /home/system/Pictures/wallpapers/0178.jpg
[LOG] configure for DP-1
[LOG] handlePreferredScale: 1.00 for 75f564001880
[LOG] configure for DP-1
[LOG] Preloaded target /home/system/Pictures/wallpapers/0178.jpg in 28.94ms -> Pixel size: [1920, 1080]
[LOG] Buffer created for target /home/system/Pictures/wallpapers/0178.jpg, Shared Memory usage: 14.7MB
[LOG] Total SM usage for all buffers: 14.7MB
[LOG] Pool buffer missing for available target??
[LOG] Pool buffer failed #2. Ignoring WP.
[LOG] Accepted incoming socket connection request on fd 5
[LOG] Closing Accepted Connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant