- sziku69: Fűzzük össze a szavakat :)
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- talmida: Változások 2. rész
- erer1000: Milyen tesztekre lennétek kíváncsiak a lenti káosz gépet illetően?
- Luck Dragon: Alza kuponok – aktuális kedvezmények, tippek és tapasztalatok (külön igényre)
- MasterDeeJay: RAM gondolatok: Mennyi a minimum? DDR3 is jó?
- Brogyi: CTEK akkumulátor töltő és másolatai
- ldave: New Game Blitz - 2026
- Oldman2: A KOReader ebook olvasó program
- gerner1
-
LOGOUT
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
- Melyik tápegységet vegyem?
- Lexus, Toyota topik
- Formula-1
- Kerékpárosok, bringások ide!
- Samsung kuponkunyeráló
- exHWSW - Értünk mindenhez IS
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- Vezeték nélküli fülhallgatók
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- sziku69: Fűzzük össze a szavakat :)
- További aktív témák...
- Eredeti Microsoft termékek - MEGA Akciók! Windows, Office Pro Plus, Project Pro, Visio Pro stb.
- MEGA AKCIÓ! - Jogtiszta Windows - Office & Autodesk & CorelDRAW - Azonnal - Számlával - Garanciával
- Bitdefender Total Security 3év/3eszköz! - Tökéletes védelem.
- Adobe Előfizetések - Adobe Creative Cloud All Apps - 12 Hónap - 15% AKCIÓ
- Játékkulcsok ! : PC Steam, EA App, Ubisoft, Windows és egyéb játékok
- GYÖNYÖRŰ iPhone 14 Pro Max 256GB Space Black -1 ÉV GARANCIA -Kártyafüggetlen, MS4031
- BESZÁMÍTÁS! 16GB G.skill Ares 2400Mhz DDR3 memória garanciával hibátlan működéssel
- Apple iPhone 14 128GB,Újszerű,Dobozaval,12 hónap garanciával
- AKCIÓ! MSI Thin A15 B7VE FHD Gamer notebook - R5 7535HS 16GB DDR5 512GB SSD RTX 4050 6GB W11
- ÉV ELEJI RAKTÁRSÖPRÉS!!! - Videókártyák, Monitorok, Notebookok, Stb. - Szaküzletből! Számlával!
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
