I haven’t been able to set my own background in Manjaro Sway. It always keeps the default background. I’ve got the image file at /usr/share/backgrounds/peakpx.png and I’ve made a file at ~/.config/sway/definitions.d/01-background.conf with this content:
set $background /usr/share/backgrounds/peakpx.png
but it’s not working.
Interestingly, in emacs there’s a command to set the currently viewed image as the desktop background and it just works™ (I don’t know what this does behind the scene to achieve this), however after logout and login it’s gone back to the default background.
running swaymsg 'output * bg $background fill' works to set the background to the image I want, so that shows that $background is being set correctly.
I’ve tried adding exec_always output * bg $background fill as the last line in ~/.config/sway/config and I’ve also tried adding swaymsg 'output * bg $background fill' to the end of .profile but neither works (after I log in then run source .profile manually the background gets set correctly)
perhaps .profile runs before the config files set the $background variable
I’m considering putting a button on my waybar just to run the command that sets the background, but it seems crazy that I can’t figure out how to make it set automatically on login.
I thought I had, but I never noticed the set $apply_background part. I must have been looking at outdated documentation. Adding that line to the config file makes it work.
Also I didn’t think that setting this variable would be necessary since it gets set to this exact value already in /etc/sway/autostart which is included in /etc/sway/definitions/ which itself is included in ~/.config/sway/config