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

Default wallpaper #1098

Open
end-4 opened this issue Feb 8, 2025 · 7 comments
Open

Default wallpaper #1098

end-4 opened this issue Feb 8, 2025 · 7 comments
Labels
FEATURE Feature advice/request

Comments

@end-4
Copy link
Owner

end-4 commented Feb 8, 2025

What would you like to be added?
Default wallpaper, following @clsty's suggestion, fixes many newcomers' problems
I want to use hyprland's wallpaper at /usr/share/hypr/wall0.png (on arch, no clue if this will work on all distros)

Extra info
Problem is I'm not entirely sure how to set it so I would like some input

  • swww img command doesn't work when swww isn't running, and swww just won't run without a wayland compositor already running (can be the case when running the install script), so I'm not sure if we can do it in the install script
  • I see ~/.cache/swww is generated when we run swww, so do we always run a script on hyprland startup to check if that folder is there and run the wallpaper switcher script if it isn't?
@end-4
Copy link
Owner Author

end-4 commented Feb 8, 2025

in that linked thread i said maybe use another wallpaper, but the solution to #606 made it possible to use wall0.png

@os-guy
Copy link

os-guy commented Feb 8, 2025

Is this alright?

Image

I just found on the internet

@end-4
Copy link
Owner Author

end-4 commented Feb 8, 2025

I don't want to ship anything that isn't code myself. This increases repo size and I don't wanna deal with potential copyright problems, so I'll just use Hyprland's wallpaper
The real question here is how to set default wallpaper, not what to use for default wallpaper

@os-guy
Copy link

os-guy commented Feb 8, 2025

I don't want to ship anything that isn't code myself. This increases repo size and I don't wanna deal with potential copyright problems, so I'll just use Hyprland's wallpaper The real question here is how to set default wallpaper, not what to use for default wallpaper

Yes I know.
It just looks very cool on my computer.

@os-guy
Copy link

os-guy commented Feb 8, 2025

What about creating a .profile file and adding it to the Hyprland config as a source?

.profile file

export XDG_RUNTIME_DIR=/run/user/$(id -u)
swww init
sleep 1
swww img /path/to/image

And in hyprland config:
source = /path/to/.profile

I don't know how this config work but I'm just trying to help.

@clsty
Copy link
Collaborator

clsty commented Feb 9, 2025

I think we can make use of /home/archer/.local/state/ags/user/firstrun.txt. When this file does not exist, we may assume that the wallpaper is not set and then set a default wallpaper. @end-4

(Optional) It will be even better if we use the wallpaper from the output of swww query (be careful not affect users who do not use swww, or have an empty swww cache).

@clsty
Copy link
Collaborator

clsty commented Feb 9, 2025

I want to use hyprland's wallpaper at /usr/share/hypr/wall0.png (on arch, no clue if this will work on all distros)

Yeah this can be a problem and I suggest we test its existence first, and if it fails, we use a fallback.

The fallback may be a mono-color (gray?) background wallpaper, which may be very small in some image format and is also supported both by swww and color generators. (svg? png? jpeg?)
And it can be very small in terms of resolution, like 100x100 or even 1x1, because it only contains one color and does not have blurring problem at all.

See also the comment which suggest using imagemagick.

I've tested the command magick convert -size 1x1 xc:#808080 wallpaper.png and it gives a single-pixel "picture" (lol) which size is only 294 Bytes, about which I think is suitable to ship within this repo, and is also supported both for swww and color generators.

@clsty clsty added the FEATURE Feature advice/request label Feb 9, 2025
@clsty clsty changed the title [Feature] Default wallpaper Default wallpaper Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE Feature advice/request
Projects
None yet
Development

No branches or pull requests

3 participants