You are not logged in.

#1 2024-05-19 02:05:09

Rumia
Member
Registered: 2024-05-18
Posts: 12

[SOLVED] How do I set dwm wallpaper on startup?

Heya! I'm Ayame, or "Rumia" by my personal list of forum names. I'm an avid osu!player, Japanese learner, Touhou pro, and artist. I'm also a young, energetic otaku girl that loves nostalgia, anime, and some coding on the side. I hope I can make my stay here enjoyable and energetic for everyone involved!


Issue:

I recently made the switch to Arch and have set up dwm (by suckless). I am starting using "startx" and am trying to use feh to auto-set the wallpaper from the ".xinitrc" file.

Here are the contents of xinitrc:

exec dwm 
exec feh --bg-scale Wallpapers/wallpaper.jpg

For context, "Wallpapers" is my personal wallpaper folder, and "wallpaper.jpg" is just a placeholder for the actual .jpg file. When starting with said "startx", no wallpaper is applied.

All help is appreciated!
バイバイ!

Last edited by Rumia (2024-05-19 17:27:14)

Offline

#2 2024-05-19 02:17:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] How do I set dwm wallpaper on startup?

The "exec" command replaces the currently running script.  So nothing after "exec dwm" could ever run.  Run feh first and not via "exec":

feh --bg-scale Wallpapers/wallpaper.jpg &
exec dwm

Last edited by Trilby (2024-05-19 02:18:10)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-05-19 02:26:14

Rumia
Member
Registered: 2024-05-18
Posts: 12

Re: [SOLVED] How do I set dwm wallpaper on startup?

Worked perfectly! Thank you, Trilby!

Offline

#4 2024-05-19 06:58:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,989

Re: [SOLVED] How do I set dwm wallpaper on startup?

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Adding a sllight caveat to forking feh ("&"): ifff anything started into that (dwm) reads the background pixmap into some local cache (fake transparency, compositor) you might end up w/ a race condition where it fetches the previous non-wallpaper black background and misses the event for the change.
But unless you see some unexpected black backgrounds, it's fine and will slightly speed up the session start.

Offline

#5 2024-05-19 08:50:14

Rumia
Member
Registered: 2024-05-18
Posts: 12

Re: [SOLVED] How do I set dwm wallpaper on startup?

Noted!

Silly question; How do I edit the subject?

Offline

#6 2024-05-19 10:52:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,989

Re: [SOLVED] How do I set dwm wallpaper on startup?

There's an edit link in the lower right corner of all of your posts, https://bbs.archlinux.org/edit.php?id=2172226

Offline

#7 2024-05-19 17:27:37

Rumia
Member
Registered: 2024-05-18
Posts: 12

Re: [SOLVED] How do I set dwm wallpaper on startup?

Found it, thanks!

Offline

Board footer

Powered by FluxBB