jgwallpaperchanger menu

This commit is contained in:
Daniel Napora 2023-01-20 15:28:49 +01:00
parent 4a5313f010
commit 96decfaa4a

View File

@ -36,7 +36,7 @@ case $LANG in
STOPS="Zatrzymaj Pokaz slajdów <small>(<i>działający</i>)</small>"
CONF="Konfiguracja"
WALLDIR="Katalog z tapetami"
INTERVAL="Interwał pokazu slajdów"
INTERVAL="Interwał slajdów"
SEC="sekund"
EDITCONF="Edytuj plik konfiguracyjny"
OPENDIR="Otwórz katalog z tapetami"
@ -53,7 +53,7 @@ case $LANG in
STARTS="Start Slideshow <small>(<i>stopped</i>)</small>"
STOPS="Stop Slideshow <small>(<i>running</i>)</small>"
CONF="Configuration"
WALLDIR="Wallpaper dir"
WALLDIR="Images dir"
INTERVAL="Slideshow Interval"
SEC="seconds"
EDITCONF="Edit config file"
@ -70,7 +70,7 @@ else
me="${0##*/} ${1:--s}"
fi
#help='\nBased on Mabox forum member Shwaybo <a href="https://forum.maboxlinux.org/t/chwp-desktop-wallpaper-changer/496">idea</a>.\n\nchange wallpapers from a directory, never using the same picture twice until all the pictures have been shown, and rotating x number of seconds (configurable) before the next wallpaper change.\n'
help='\nBased on Mabox forum member Shwaybo <a href="https://forum.maboxlinux.org/t/chwp-desktop-wallpaper-changer/496">idea</a>.\n\nchange wallpapers from a directory, never using the same picture twice until all the pictures have been shown, and rotating x number of seconds (configurable) before the next wallpaper change.\n'
#out+=("^sep($TITLE)")
out+=("^sep($WALLPAPERS)")
@ -85,14 +85,14 @@ out+=("^sep(<i>$SLIDESHOW</i>)")
out+=("$STOPS,killall mbwallpaper;$me")
fi
#out+=("About Wallpaper changer,\"\"\"notify-send.sh -u critical -i mbcc 'Wallpaper Changer - rotate desktop wallpaper every n-seconds' '$help' -o 'Edit configuration file:geany ~/.config/mbwallpaper/mbwallpaper.conf'\"\"\"")
out+=("^sep()")
out+=("$WALLDIR: <small>[ <b>$wallpaper_dir</b> ]</small>,xdg-open $CONFIG_FILE")
out+=("\"\"\"$WALLDIR: <small>[ <b>$wallpaper_dir</b> ]</small>\"\"\",xdg-open $CONFIG_FILE")
out+=("$INTERVAL [ <b>$interval</b> ] <small>($SEC)</small>,^checkout(interval)")
out+=("^sep()")
out+=("$EDITCONF ,xdg-open $CONFIG_FILE")
out+=("$OPENDIR,pcmanfm -n $wallpaper_dir")
out+=("About Slideshow,\"\"\"notify-send.sh -u critical -i mbcc 'Wallpaper Changer - rotate desktop wallpaper every n-seconds' '$help' -o 'Edit configuration file:geany ~/.config/mbwallpaper/mbwallpaper.conf'\"\"\"")
out2+=("^tag(interval)")
for i in 3 5 10 30 60 120 300 600 1800 3600; do out2+=("$(printf "<tt> %4s</tt>,%s" "$i" "mb-setvar interval=${i} $CONFIG_FILE;$me")");done
@ -130,15 +130,20 @@ JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
#WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
#TEMP POSITION:
#TEMP POSITION:
MENU_VALIGN="top"
MENU_MARGIN_Y="60"