View Full Version : [xubuntu] Desktop Picture Folder Widget
Taylz
July 26th, 2018, 11:23 PM
Hi all,
Does anyone know of a widget or desktop thing that will act like a small viewer for pictures stored in your pictures folder, rotating through them at certain intervals (set within the settings). I seen something similar on the KDE desktop environment but I didn't get on well with that environment because it felt very buggy and slow. However I did love the widget features for it!
Don't suppose XFCE has a similar widget system or option does it? So far I haven't managed to find it/one.
Regards,
Tayl.
Holger_Gehrke
July 28th, 2018, 12:44 AM
To the best of my knowledge there no such thing as a desktop widget in XFCE. You can have the desktop "wallpaper" change among files from a specific directory at specifiable intervals.
Holger
again?
July 28th, 2018, 02:59 AM
You could achieve this using conky and a script to select a random file from a directory.
slideshow.sh (set your pics directory and make script executable)
#!/bin/sh
dir="$HOME/Pictures" # Directory
file=$(find "$dir" -type f -iname '*.jpg' -or -iname '*.jpeg' -or -iname '*.png' | shuf -n1)
cp "$file" ~/.currentpic
echo '${image ~/.currentpic -p 0,0 -s 400x300}'
exit 0
conky config Save as .conkyrc in your home folder.
(on last line set your path to slideshow.sh and set slideshow interval in secs).
background no
update_interval 1
total_run_times 0
use_xft yes
xftfont Droid Sans:bold:size=12
alignment tr
xftalpha 1.0
own_window yes
own_window_title conkyslideshow
own_window_type normal
own_window_transparent no
own_window_colour blue
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
double_buffer yes
draw_shades yes
draw_outline no
draw_borders yes
#stippled_borders 10
gap_y 60
gap_x 20
default_shade_color blue
default_outline_color blue
default_color blue
use_spacer none
no_buffers yes
uppercase no
text_buffer_size 512
override_utf8_locale yes
minimum_size 400 300
maximum_width 400
#use_spacer left
max_user_text 4000
imlib_cache_size 0
imlib_cache_flush_interval 900
TEXT
${execpi 10 $HOME/scripts/slideshow.sh}
to run
conky
EDIT:
Been playing around and wrote an alternate slideshow.sh script to try. (Chooses random image without repetition)
As before....(set your image directory and make script executable)
#!/bin/sh
## Randomly selects images without repetition
## If you change Image Directory delete the ~/.piclist file
## to create a new list on first run
dir="$HOME/conky/slideshow" # Image Directory
files=$(find "$dir" -type f -iname '*.jpg' -or -iname '*.jpeg' -or -iname '*.png')
uniquefiles=$(cat $HOME/.piclist | sort | uniq -u | wc -l)
## create list of images @ ~/.piclist
if [ ! -f "$HOME/.piclist" ] ; then
notify-send -i info "Created list" "$HOME/.piclist"
echo "$files" > ~/.piclist
fi
## checks for unique files ~/.piclist. Refreshes list if none
if [ "$uniquefiles" = "0" ] ; then
echo "$files" > ~/.piclist
fi
## select a pic and duplicate path in ~/.piclist so no longer unique
currentpic=$(cat $HOME/.piclist | sort | uniq -u | shuf -n1)
echo "$currentpic" >> $HOME/.piclist
## copy selected pic to ~/.currentpic
cp "$currentpic" $HOME/.currentpic
## output parsed by conky
echo '${image ~/.currentpic -p 0,0 -s 400x300}'
exit 0
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.