- Timestamp:
- 05/05/2012 01:47:13 PM (12 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 8e2c769
- Parents:
- 96251d4b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
x/wm/openbox.xml
r96251d4b r5b9edb4 228 228 <para> 229 229 Or if you like a bit of variety, put a selection of images in a folder 230 and choose one at random each time you <command>xinit</command>: 230 (in this example, the directory ~/.config/backgrounds) and choose one at 231 random each time you <command>xinit</command>: 231 232 </para> 232 233 233 234 <screen role="user"><userinput>cat > ~/.xinitrc << "HERE_DOC" 235 # make an array which lists the pictures: 234 236 picture_list=(~/.config/backgrounds/*) 235 random_number=$(( ${RANDOM} % ${#picture_list[*]} )) 236 display -backdrop -window root "${picture_list[$random_number]}" 237 # create a random integer between 0 and the number of pictures: 238 random_number=$(( ${RANDOM} % ${#picture_list[@]} )) 239 # display the chosen picture: 240 display -backdrop -window root "${picture_list[${random_number}]}" 237 241 exec openbox 238 242 HERE_DOC</userinput></screen> … … 249 253 picture_list=(~/.config/backgrounds/*) 250 254 random_number=$(( ${RANDOM} % ${#picture_list[*]} )) 251 display -backdrop -window root "${picture_list[$ random_number]}"255 display -backdrop -window root "${picture_list[${random_number}]}" 252 256 numlockx 253 257 eval $(dbus-launch --auto-syntax --exit-with-session)
Note:
See TracChangeset
for help on using the changeset viewer.