- Utolérte az áremelés a PlayStation 5-öt
- 5.1, 7.1 és gamer fejhallgatók
- Raspberry Pi
- Nem panaszkodhat a sebességére a Team Group legújabb, PCI Express 5.0-s SSD-je
- Milyen videókártyát?
- Párduc a gépben: teszten az ASUS ExpertBook Ultra
- SSD kibeszélő
- Döbbenetesen sok energia kell az érkező Nova Lake működéséhez?
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Fejhallgató erősítő és DAC topik
-
PROHARDVER!
Debian GNU/Linux
Új hozzászólás Aktív témák
-
CPT.Pirk
Jómunkásember
válasz
bambano
#3838
üzenetére
Na ez így még mindig nem mond semmit azon kívül, hogy írjak egy scriptet, de googleben találtam scriptet, ami működik. [link]
#!/bin/bash
#################################################################
# Script to select a random wallpaper in GNOME 2 #
# #
# Selects images from the previously selected wallpapers, #
# and from a desired folder. Its path should be configured #
# in line 31, along with desired image extension #
# #
# The script also selects the rendering method for the image #
# This feature uses the command "identify", from ImageMagick #
# Also, check if your distro is using gconftool or gconftool-2 #
# Change this option in lines 50, 52 and 56 #
# #
# The Delay between images is set in seconds, in line 62 #
# #
# Create an entry to this script in your "Startup Applications" #
# to execute it in every gnome session start. The command would #
# be: #
# PathToScript/background.sh & #
# The & would run the script as a background process #
#################################################################
# Begin of infinite loop [condition always true]
while [ 1 == 1 ] ; do
# Create array with the filenames of the previously selected wallpapers,
# from the information in the file "~/.gnome2/backgrounds.xml"
ALIST=( `grep filename ~/.gnome2/backgrounds.xml | sed 's/<filename>//g' | sed 's/<\/filename>//g'` )
# Add to this array the filenames of images '*.JPG' in "$HOME/DATA/Pictures"
# folder. Additional folders could be added with the same syntax
ALIST=( "${ALIST[@]}" `find $HOME/DATA/Pictures/ -name '*.JPG'` )
# Obtain the number of elements in this array
RANGE=${#ALIST[@]}
# Select randomly one of these elements
let "number = $RANDOM % $RANGE"
# Obtain the width and height of the image
xIMG=`identify -format "%[fx:w]" ${ALIST[$number]}` #Width
yIMG=`identify -format "%[fx:h]" ${ALIST[$number]}` #Height
# Compares the Width and Height, to select the rendering option of the image
# If Width > Height, select "zoom"
# Else, select "scaled"
# Possible values: "none", "wallpaper", "centered", "scaled", "stretched", "zoom", "spanned"
if [ "$xIMG" -gt "$yIMG" ] ; then
gconftool -t string -s /desktop/gnome/background/picture_options zoom
else
gconftool -t string -s /desktop/gnome/background/picture_options scaled
fi
# Set the random filename as wallpaper image
gconftool -t string -s /desktop/gnome/background/picture_filename ${ALIST[$number]}
# Pause in the script, in seconds. The time the image will remain as wallpaper
# 60 = 1 minute
# 300 = 5 minutes
# 1800 = 30 minutes
sleep 300
# Continue loop
doneBeraktam, hátha valaki másnak is jól jön. Persze ékezetes mappa nem jó a képeknek...
Új hozzászólás Aktív témák
- Apple iPhone 17 Pro Max – fennsík
- Elemlámpa, zseblámpa
- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- Utolérte az áremelés a PlayStation 5-öt
- Kávé kezdőknek - amatőr koffeinisták anonim klubja
- Xiaomi 15 - kicsi telefon nagy energiával
- Filmvilág
- Steam topic
- További aktív témák...
- Számlás!Steam,EA,Epic és egyébb játékok Pc-re vagy XBox!
- PC Játékok (Márc 26. UP!) Olvass...
- Eredeti Microsoft termékek - MEGA Akciók! Windows, Office Pro Plus, Project Pro, Visio Pro stb.
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- Xbox / Microsoft Store feltöltőkártya kód (digitális, HU) több címlet, több db, azonnal, olcsón
- Keresünk iPhone 13/13 Mini/13 Pro/13 Pro Max
- Oneplus 9 128GB,Átlagos,Adatkabel,12 hónap garanciával
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RX 7600 8GB GAMER PC termékbeszámítással
- Telefon felvásárlás!! Xiaomi Redmi Note 10, Xiaomi Redmi Note 10s, Xiaomi Redmi Note 10 Pro
- Ryzen 7700X / RTX 4070 Ti Super / 32GB DDR5 / 1TB NVMe / 800w GOLD! BeszámítOK
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

