Hirdetés
- Ilyen olcsó sem volt még egy Apple notebook
- Túl nagy alkatrészt vettél? Így kerülheted el a PC-építés legnagyobb hibáját
- MWC 2026: leégsz, ha nem figyelsz a TCL 15 ezer nites panelje előtt
- Második villámcsapás: teszteltük a ROG Raikiri II Xbox kontrollert
- 100 TB-os HDD-k felé vezető alapot prezentált a Seagate
- Második villámcsapás: teszteltük a ROG Raikiri II Xbox kontrollert
- Vezetékes FEJhallgatók
- Ilyen olcsó sem volt még egy Apple notebook
- Mindhárom Tab S9 vízálló lett
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Kormányok / autós szimulátorok topikja
- Vezeték nélküli fülhallgatók
- Intel Core i7 9xx "Bloomfield" (LGA 1366)
- OLED TV topic
- AMD Navi Radeon™ RX 9xxx sorozat
-
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
- Trollok komolyan
- Xbox Series X|S
- PROHARDVER! feedback: bugok, problémák, ötletek
- iPhone topik
- Xiaomi 15 - kicsi telefon nagy energiával
- Parkside szerszám kibeszélő
- Második villámcsapás: teszteltük a ROG Raikiri II Xbox kontrollert
- Vezetékes FEJhallgatók
- sziku69: Fűzzük össze a szavakat :)
- Ilyen olcsó sem volt még egy Apple notebook
- További aktív témák...
- MS SQL Server 2016, 2017, 2019
- Game Pass Ultimate előfizetések 1 - 36 hónapig azonnali kézbesítéssel a LEGOLCSÓBBAN! AKCIÓ!
- Microsoft és egyéb dobozos retro szoftverek
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- Fallout 4 Pip-Boy Edition eladó
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 16/32/64GB RAM RTX 5060 Ti 16GB GAMER termékbeszámítással
- Dell Precision 7750,17.3" FHD,i7-10875H,32GB DDR4,256GB SSD,RTX 3000 6GB VGA,WIN11
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- GYÖNYÖRŰ iPhone 14 Plus 128GB Starlight -1 ÉV GARANCIA - Kártyafüggetlen, MS4458
- MS SQL Server 2016, 2017, 2019
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

