Hirdetés
- Szívós, szép és kitartó az új OnePlus óra
- Samsung Galaxy Watch5 Pro - kerek, de nem tekerek
- Xiaomi 17 Ultra - jó az optikája
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Akciófigyelő: Jelentős kedvezményekkel veheted meg a Xiaomi 17-eket
- AirTag-riválist hoz Európába a Xiaomi
- Sokkal jobb ajánlat lett elődjénél az iPhone 17e
- Apple AirPods Pro (2. generáció) - csiszolt almaságok
- Samsung Galaxy A54 - türelemjáték
- Samsung Galaxy A56 - megbízható középszerűség
-
Mobilarena
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
- Házimozi belépő szinten
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Szívós, szép és kitartó az új OnePlus óra
- AMD Ryzen 9 / 7 / 5 7***(X) "Zen 4" (AM5)
- Azonnali játékos kérdések órája
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- OTP Bank topic
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Sorozatok
- További aktív témák...
- Windows 10/11 Home/Pro , Office 2024 kulcsok
- Vírusirtó, Antivirus, VPN kulcsok GARANCIÁVAL!
- MS SQL Server 2016, 2017, 2019
- Windows 10 11 Pro Office 19 21 Pro Plus Retail kulcs 1 PC Mac AKCIÓ! Automatikus 0-24
- MEGA AKCIÓ! - Jogtiszta Windows - Office & Autodesk & CorelDRAW - Azonnal - Számlával - Garanciával
- Lenovo ThinkPad T14 Gen1 Ryzen5 4650U Refurbished - Garancia
- Samsung Gear VR: Note5, S6 (EDGE), S7 (EDGE)
- GYÖNYÖRŰ iPhone 14 Pro 128GB Space Black -1 ÉV GARANCIA - Kártyafüggetlen
- Gamer PC-Számítógép! Csere-Beszámítás! R5 3600X / GTX 1080Ti 11GB / 16GB DDR4 / 512 Nvme SSD
- Samsung Galaxy S21+ / 8/128GB / Kártyafüggetlen / 12Hó Garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

