Hirdetés
- Százmilliárd dolláros AI-fegyverkezésbe kezdett az Amazon és a Google
- Így tüzelt el százbillió forintot az AI a héten
- Kétféle módon harcol a forró helyzetekkel szemben az ASUS új, M.2-es SSD háza
- Mérföldkő a szilárdtest akkuknál: fontos lépést tett a QuantumScape
- Degeneratív kapcsolóval készül a Firefox
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Intel Core i7 9xx "Bloomfield" (LGA 1366)
- Milyen CPU léghűtést vegyek?
- Fejhallgató erősítő és DAC topik
- Milyen alaplapot vegyek?
- Milyen billentyűzetet vegyek?
- Androidos fejegységek
- Gaming notebook topik
- Milyen házat vegyek?
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
-
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
- Robotporszívók
- VGA kibeszélő offtopik
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Szívós, szép és kitartó az új OnePlus óra
- Lalikiraly: Commodore The C64, Ultimate
- Intel Core i7 9xx "Bloomfield" (LGA 1366)
- Milyen CPU léghűtést vegyek?
- Fejhallgató erősítő és DAC topik
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Elektromos autók - motorok
- További aktív témák...
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- Windows 10/11 Home/Pro , Office 2024 kulcsok
- Eredeti Microsoft termékek - MEGA Akciók! Windows, Office Pro Plus, Project Pro, Visio Pro stb.
- Windows 10 11 Pro Office 19 21 Pro Plus Retail kulcs 1 PC Mac AKCIÓ! Automatikus 0-24
- Bitdefender Total Security 3év/3eszköz! - Tökéletes védelem.
- LG 65G4 - 65" OLED evo - 4K 144Hz & 0.1ms - MLA Plus - 3000 Nits - NVIDIA G-Sync - FreeSync Premium
- ÁRGARANCIA!Épített KomPhone i5 14600KF 32/64GB RAM RTX 5060Ti 16GB GAMER PC termékbeszámítással
- BESZÁMÍTÁS! Asus B560M i5 10500 16GB DDR4 512GB SSD RTX 3060Ti 8GB LIAN LI LANCOOL 207 Digital 650W
- új, összeszerelt Razer Iskur V2 Fabric gamer szék
- Dell Latitude 5430 14" Touchscreen i5-1235U 16GB 512GB 1 év garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs


