# wallpaper changer #####################
# currently using nitrogen (manually change)
feh --randomize --bg-fill $HOME/.wallpapers/active-wallpapers/* # inital wallpaper load
And I use a keybind to nitrogen when I feel like changing my wallpaper when logged in... But since I log in & out 'too much', I need not worry (very often) about such a huge manual effort. I do the same with other functions...
]]>As for the ampersands, I was following the Arch man page for Openbox
In this case the man page is incorrect — adding ampersands where they are not needed can precipitate race conditions. An ampersand is only needed if the command does not return the prompt after it is run in a terminal.
]]>On log in, openbox will run
the ~/.config/openbox/autostart.sh script if it exists,
and will run the system-wide script /etc/xdg/open‐
box/autostart.sh otherwise. You may place anything you
want to run automatically in those files, for example:xsetroot -solid grey &
gnome-settings-daemon &Make sure that each line is followed by a "&" or else
the script will stop there and further commands will
not be executed.
I am experimenting with starting some of the services with XDG Autostart. Plank seems to consistently work better with that. I am not sure what other services I could use, as I want them limited to Openbox. I also have LXQt installed where I do not want plank, picom or others opening, as with LXQt I am using kwin for compositing, and LXQt's own panel and desktop slideshow feature. XDG Autostart gives me the option to limit autostart to Openbox.
I wonder if it would be an improvement to start them all with XDG? It would mean creating a bunch of autostart files.
My wallpaper files were all created in GIMP at 1920x1080 for the particular monitor I use. They are about 20 in number. A script like Duaner uses would interest me as a possible improvement on the bkchd script I am using as it continues to be problematic. Since I am not interested in background color, I wonder what the simplest possible script might be and how to set it up to run only in Openbox.
I just have a bash script change my background. It's definitely minimal.
I take it you haven't noticed feh's --randomize option then?
I run it from a systemd timer, but crontab would be easier.
Even easier:
while true ; do feh --randomize --no-fehbg --bg-max /usr/share/wallpaper ; sleep 600 ; done &
But enough of this diversion...
when I login after logging out (no reboot), plank in particular takes nearly a minute to load, and bgchd doesn't load for a couple of minutes, not really ideal. I wonder why
Have you checked the X.Org log & the journal?
I'd also appreciate any other suggestions about load order, or any advantages to be had by introducing periods of sleep before loading some apps, or whatever
Are you sure all those ampersands are necessary? Run each command in a terminal and only add an ampersand in the autostart file if the prompt is not returned, this will help avoid any potential race conditions. I know for sure that picom shouldn't have both an ampersand and the -b option applied at the same time.
Applying sleep commands shouldn't be needed at all but you could look at using the XDG autostart specification instead of ~/.config/openbox/autostart (this needs the python-pyxdg package).
]]>I know it's not a solution to your problem, but consider that approach if you don't find a suitable solution. Consult the Wiki about systemd user services or the official documentation.
]]>I would just like something more minimalist than variety, for example.
I just have a bash script change my background. It's definitely minimal.
#!/bin/bash
# ~/bin/change-background
export DISPLAY=:0
if ! /usr/bin/xset q &>/dev/null; then
exit 0
fi
# It was just this:
#feh --bg-max "$(find ~/.local/backgrounds/ -type f | shuf -n 1)" &
# but I wanted a darker background:
PIC="$(/usr/bin/find ~/bin/python/art/pics/ -type f | /usr/bin/shuf -n 1)"
/usr/bin/convert &>/dev/null "$PIC" -fill black -colorize 80% ~/.cache/background.png
#/usr/bin/pcmanfm --wallpaper-mode fit -w ~/.cache/background.png
/usr/bin/feh --no-fehbg --bg-max ~/.cache/background.png
I run it from a systemd timer, but crontab would be easier.
]]>pgrep -u kendew bgchd || bgchd -dir /usr/share/wallpaper -bcknd feh -intv 11m &
or
pkill -u kendew bgchd; bgchd -dir /usr/share/wallpaper -bcknd feh -intv 11m &
?
]]>after logging out
Login to a console and check what of your former session is still running.
]]>picom --config ~/.config/picom.conf -b &
feh &
bgchd -dir /usr/share/wallpaper -bcknd feh -intv 11m &
plank &
fcitx5 &
nm-applet &
tint2 &
dunst &
gvfs &
udisks2 &
udiskie &
volumeicon &
python3 /home/kendew/.config/openbox/minimize.py dino &
If I turn on my computer, reach the sddm login screen and login, everything works pretty much as desired. However, if I exit Openbox (logout), the next time I login there are problems. Everything eventually autostarts, but whereas autostart seems pretty much instantaneous when booting the computer and logging in, when I login after logging out (no reboot), plank in particular takes nearly a minute to load, and bgchd doesn't load for a couple of minutes, not really ideal. I wonder why.
I tried re-arranging the order of these apps, but the way they are ordered above is about the best I've found.
I'd like to know what I can do so they all load pretty much instantaneously like they do on computer startup. But I'd also appreciate any other suggestions about load order, or any advantages to be had by introducing periods of sleep before loading some apps, or whatever.
I think most of the apps are self explanatory. The bgchd is a script found in the aur to produce a desktop wallpaper slide show. The python3 command runs a script to autostart Dino minimized to taskbar.
Thanks.