View Single Post
  #6   (View Single Post)  
Old 29th January 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

My wallpaper is randomly selected from set of wallpapers indexed from 1 to "ILOSC_TAPET" inclusively.
Wallpapers are meant to be found inside "/home/open/tapety/z_logo/" directory.
Variable "losowa_liczba" is meant to store random integer number from 1 to "ILOSC_TAPET".
Not impressive, but makes system look slightly less monotonous.

Code:
#!/bin/ksh

typeset -i ILOSC_TAPET=4
typeset -i losowa_liczba=$(( ( RANDOM % ${ILOSC_TAPET} ) + 1 ))
/usr/local/bin/feh --bg-scale /home/open/tapety/z_logo/${losowa_liczba}.jpg
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote