wallpaper generator
parent
07cbb46c80
commit
a5df21ab9e
|
@ -26,9 +26,12 @@ source <(grep = $CONFIG_FILE)
|
|||
case $LANG in
|
||||
pl*)
|
||||
TITLE="Zmieniacz tapet"
|
||||
NITROGEN="Nitrogen"
|
||||
WALLPAPERS="Tapety"
|
||||
RANDWALL="Losowa tapeta"
|
||||
GENERATOR="Generuj (ImageMagick)..."
|
||||
CHOOSE="Wybierz tapetę..."
|
||||
SLIDESHOW="Pokaz slajdów"
|
||||
STARTS="Uruchom Pokaz slajdów <small>(<i>zatrzymany</i>)</small>"
|
||||
STOPS="Zatrzymaj Pokaz slajdów <small>(<i>działający</i>)</small>"
|
||||
CONF="Konfiguracja"
|
||||
|
@ -41,9 +44,12 @@ case $LANG in
|
|||
;;
|
||||
*)
|
||||
TITLE="Wallpaper Changer"
|
||||
NITROGEN="Nitrogen"
|
||||
WALLPAPERS="Wallpapers"
|
||||
RANDWALL="Random Wallpaper"
|
||||
GENERATOR="Generate (ImageMagick)..."
|
||||
CHOOSE="Choose Wallpaper..."
|
||||
SLIDESHOW="Slideshow"
|
||||
STARTS="Start Slideshow <small>(<i>stopped</i>)</small>"
|
||||
STOPS="Stop Slideshow <small>(<i>running</i>)</small>"
|
||||
CONF="Configuration"
|
||||
|
@ -64,17 +70,19 @@ me="jgwallpaperchanger -s"
|
|||
#out+=("^sep($TITLE)")
|
||||
out+=("^sep($WALLPAPERS)")
|
||||
if ! pgrep mbwallpaper > /dev/null; then
|
||||
out+=("$NITROGEN,nitrogen")
|
||||
out+=("$RANDWALL,mbwallpaper -o;$me")
|
||||
out+=("$CHOOSE,mbwallpaper -c")
|
||||
out+=("$GENERATOR,^pipe(jgwallpapergenerate)")
|
||||
out+=("^sep(<i>$SLIDESHOW</i>)")
|
||||
out+=("$STARTS,run_wallpaperslideshow;$me")
|
||||
out+=("Nitrogen,nitrogen")
|
||||
else
|
||||
out+=("$STOPS,killall mbwallpaper;$me")
|
||||
fi
|
||||
|
||||
out+=("^sep(<i>$CONF</i>)")
|
||||
#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>,geany $CONFIG_FILE")
|
||||
out+=("$INTERVAL [ <b>$interval</b> ] <small>($SEC)</small>,^checkout(interval)")
|
||||
out+=("^sep()")
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
#!/bin/bash
|
||||
# jgwallpapergenerate - submenu to generate wallpapers
|
||||
#
|
||||
|
||||
case $LANG in
|
||||
pl*)
|
||||
TITLE="Generator tapet (ImageMagick)"
|
||||
RANDCOLORS="Losowe kolory"
|
||||
PICKCOLORS="Wybór kolorów..."
|
||||
WALLPAPERMENU="Menu Tapety"
|
||||
RANDOMEFFECT="Losowy efekt"
|
||||
SOLID="<b>Jednolity</b> kolor"
|
||||
BLURRED="<b>Rozmycie</b>"
|
||||
LINEAR="Gradient <b>liniowy</b>"
|
||||
RADIAL="Gradient <b>promieniowy</b>"
|
||||
TWISTED="<b>Skręcony</b> gradient "
|
||||
BILINEAR="Gradient <b>dwuliniowy</b>"
|
||||
PLASMA="<b>Plazma</b>"
|
||||
ONECOLOR="(jeden kolor)"
|
||||
TWOCOLORS="(dwa kolory)"
|
||||
FOURCOLORS="(cztery kolory)"
|
||||
IMAGES="Wygenerowane obrazy"
|
||||
OPENDIR="Otwórz katalog"
|
||||
EMPTYDIR="Opróżnij katalog"
|
||||
SIZE="rozmiar"
|
||||
;;
|
||||
*)
|
||||
TITLE="Wallpaper Generator (ImageMagick)"
|
||||
RANDCOLORS="Random colors"
|
||||
PICKCOLORS="Pick colors..."
|
||||
WALLPAPERMENU="Wallpapers Menu"
|
||||
RANDOMEFFECT="Random effect"
|
||||
SOLID="<b>Solid</b> color"
|
||||
BLURRED="<b>Blurred</b>"
|
||||
LINEAR="<b>Linear</b> gradient"
|
||||
RADIAL="<b>Radial</b> gradient"
|
||||
TWISTED="<b>Twisted</b> gradient"
|
||||
BILINEAR="<b>Bilinear</b> gradient"
|
||||
PLASMA="<b>Plasma</b>"
|
||||
ONECOLOR="(pick one color)"
|
||||
TWOCOLORS="(pick two colors)"
|
||||
FOURCOLORS="(pick four colors)"
|
||||
IMAGES="Generated images"
|
||||
OPENDIR="Open directory"
|
||||
EMPTYDIR="Empty directory"
|
||||
SIZE="size"
|
||||
;;
|
||||
esac
|
||||
|
||||
. $HOME/.config/mabox/mabox.conf
|
||||
DIR="$(xdg-user-dir PICTURES)/mb-canvas"
|
||||
files="$(ls ${DIR}|wc -l)"
|
||||
du="$(du -sh ${DIR}|awk '{print $1}')"
|
||||
me="jgwallpapergenerate -s"
|
||||
|
||||
|
||||
|
||||
out+=("^sep($TITLE)")
|
||||
out+=("^sep($RANDCOLORS)")
|
||||
out+=("$RANDOMEFFECT,mb-canvas -Ra;$me")
|
||||
out+=("^sep()")
|
||||
out+=("$SOLID,mb-canvas -Ras;$me")
|
||||
out+=("$BLURRED,mb-canvas -RaB;$me")
|
||||
out+=("$LINEAR,mb-canvas -Ral;$me")
|
||||
out+=("$RADIAL,mb-canvas -Rar;$me")
|
||||
out+=("$TWISTED,mb-canvas -Rat;$me")
|
||||
out+=("$BILINEAR,mb-canvas -Rab;$me")
|
||||
out+=("$PLASMA,mb-canvas -Rap;$me")
|
||||
out+=("^sep($PICKCOLORS)")
|
||||
out+=("$SOLID $ONECOLOR,mb-canvas -as;$me")
|
||||
out+=("$LINEAR $TWOCOLORS,mb-canvas -al;$me")
|
||||
out+=("$RADIAL $TWOCOLORS,mb-canvas -ar;$me")
|
||||
out+=("$TWISTED $TWOCOLORS,mb-canvas -at;$me")
|
||||
out+=("$BILINEAR $FOURCOLORS,mb-canvas -ab;$me")
|
||||
if [ "$files" -gt "0" ]; then
|
||||
out+=("\"\"\"^sep($IMAGES: $files - $SIZE: ${du})\"\"\"")
|
||||
out+=("$OPENDIR,xdg-open $DIR")
|
||||
out+=("$EMPTYDIR,rm ${DIR}/*.png;$me")
|
||||
fi
|
||||
|
||||
|
||||
### RUN
|
||||
if [[ "$1" == "-s" ]]; then
|
||||
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
|
||||
. $HOME/.config/mabox/mabox.conf
|
||||
|
||||
out+=("^sep()")
|
||||
out+=(" ⮜ $WALLPAPERMENU,jgwallpaperchanger -s")
|
||||
|
||||
if [[ $panels_heightpos == "top" ]]; then
|
||||
MENU_VALIGN="top"
|
||||
MENU_MARGIN_Y=${panels_topmargin:-0}
|
||||
elif [[ $panels_heightpos == "bottom" ]]; then
|
||||
MENU_VALIGN="bottom"
|
||||
MENU_MARGIN_Y=${panels_topmargin:-0}
|
||||
else
|
||||
MENU_VALIGN="center"
|
||||
fi
|
||||
MENU_PADDING_TOP=${jgtools_padding:-0}
|
||||
MENU_HALIGN="left"
|
||||
jgmenu_icon_size=0
|
||||
JGWIDTH=40
|
||||
menu_margin_x=${submenu_spacing:-0}
|
||||
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
||||
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||
|
||||
mkconfigfile
|
||||
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
$(printf '%s\n' "${out[@]}")
|
||||
$(printf '%s\n' "${out2[@]}")
|
||||
EOF
|
||||
|
||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||
|
||||
exit 0
|
||||
|
||||
fi
|
||||
printf '%s\n' "${out[@]}"
|
||||
printf '%s\n' "${out2[@]}"
|
Loading…
Reference in New Issue