Hirdetés
- Luck Dragon: Asszociációs játék. :)
- WireGuard VPN a mindennapokra
- sziku69: Fűzzük össze a szavakat :)
- ldave: New Game Blitz - 2025
- Brogyi: CTEK akkumulátor töltő és másolatai
- GoodSpeed: Haworth Aloha – egy nemcsak szavakban ergonomikus szék
- eBay-es kütyük kis pénzért
- sziku69: Szólánc.
- GoodSpeed: Nem vénnek való vidék - Berettyóújfalu
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
-
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
- A legújabb iPhone kiegészítő egy zokni, amit magunkra akaszthatunk
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- Kerékpárosok, bringások ide!
- Azonnali mobilos kérdések órája
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Black Friday november 29. / Cyber Monday december 2.
- Videós, mozgóképes topik
- The Elder Scrolls V: Skyrim
- NVIDIA GeForce RTX 3080 / 3090 / Ti (GA102)
- További aktív témák...
- Árváltozás+játék!The Witcher 2 Assassins of Kings Collector's Edition
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- Árváltozás + játék DVD: Watch Dogs Deadsec Edititon
- Játékkulcsok olcsón: Steam, Uplay, GoG, Origin, Xbox, PS stb.
- HIBÁTLAN iPhone 13 Pro 256GB Sierra Blue 1ÉV GARANCIA -Kártyafüggetlen, MS3744, 100% Akkumulátor
- ÁRGARANCIA!Épített KomPhone Ryzen 7 9800X3D 64GB RAM RTX 5080 16GB GAMER PC termékbeszámítással
- 142 - Lenovo LOQ (15IAX9) - Intel Core i5 i5-12450HX, RTX 4060 (ELKELT)
- Kezdő Gamer PC-Számítógép!Csere-Beszámítás! I5 6500 / RX580 8GB / 16GB DDR4 / 512 SSD
- HIBÁTLAN iPhone 15 Pro Max 256GB Black Titanium -1 ÉV GARANCIA - Kártyafüggetlen, MS3004,100 % Akksi
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: NetGo.hu Kft.
Város: Gödöllő

