wallpaper generator
parent
a5df21ab9e
commit
d57c27132c
|
@ -1,6 +1,16 @@
|
|||
#!/bin/bash
|
||||
# jgwallpapergenerate - submenu to generate wallpapers
|
||||
#
|
||||
CONFIG_DIR="$HOME/.config/mbxutils/imgw"
|
||||
CONFIG_FILE="$CONFIG_DIR/imgw.cfg"
|
||||
mkdir -p $CONFIG_DIR
|
||||
if [ ! -f $CONFIG_FILE ]; then
|
||||
cat <<EOF > ${CONFIG_FILE}
|
||||
show_preview=yes
|
||||
EOF
|
||||
fi
|
||||
source <(grep = $CONFIG_FILE)
|
||||
|
||||
|
||||
case $LANG in
|
||||
pl*)
|
||||
|
@ -8,7 +18,7 @@ case $LANG in
|
|||
RANDCOLORS="Losowe kolory"
|
||||
PICKCOLORS="Wybór kolorów..."
|
||||
WALLPAPERMENU="Menu Tapety"
|
||||
RANDOMEFFECT="Losowy efekt"
|
||||
RANDOMEFFECT="<b>Losowy</b> efekt"
|
||||
SOLID="<b>Jednolity</b> kolor"
|
||||
BLURRED="<b>Rozmycie</b>"
|
||||
LINEAR="Gradient <b>liniowy</b>"
|
||||
|
@ -23,13 +33,17 @@ case $LANG in
|
|||
OPENDIR="Otwórz katalog"
|
||||
EMPTYDIR="Opróżnij katalog"
|
||||
SIZE="rozmiar"
|
||||
SETTINGS="Ustawienia"
|
||||
PREVIEW="Pokaż podgląd"
|
||||
YES="tak"
|
||||
NO="nie"
|
||||
;;
|
||||
*)
|
||||
TITLE="Wallpaper Generator (ImageMagick)"
|
||||
RANDCOLORS="Random colors"
|
||||
PICKCOLORS="Pick colors..."
|
||||
WALLPAPERMENU="Wallpapers Menu"
|
||||
RANDOMEFFECT="Random effect"
|
||||
RANDOMEFFECT="<b>Random</b> effect"
|
||||
SOLID="<b>Solid</b> color"
|
||||
BLURRED="<b>Blurred</b>"
|
||||
LINEAR="<b>Linear</b> gradient"
|
||||
|
@ -44,6 +58,10 @@ case $LANG in
|
|||
OPENDIR="Open directory"
|
||||
EMPTYDIR="Empty directory"
|
||||
SIZE="size"
|
||||
SETTINGS="Settings"
|
||||
PREVIEW="Show preview?"
|
||||
YES="yes"
|
||||
NO="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -53,12 +71,10 @@ files="$(ls ${DIR}|wc -l)"
|
|||
du="$(du -sh ${DIR}|awk '{print $1}')"
|
||||
me="jgwallpapergenerate -s"
|
||||
|
||||
|
||||
[[ "$show_preview" == "yes" ]] && l_show_preview="${YES}" || l_show_preview="${NO}"
|
||||
|
||||
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")
|
||||
|
@ -66,17 +82,29 @@ 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()")
|
||||
out+=("$RANDOMEFFECT,mb-canvas -Ra;$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")
|
||||
out+=("$PLASMA,mb-canvas -ap;$me")
|
||||
if [ "$files" -gt "0" ]; then
|
||||
out+=("\"\"\"^sep($IMAGES: $files - $SIZE: ${du})\"\"\"")
|
||||
out+=("$OPENDIR,xdg-open $DIR")
|
||||
out+=("$EMPTYDIR,rm ${DIR}/*.png;$me")
|
||||
fi
|
||||
out+=("^sep($SETTINGS)")
|
||||
out+=("$PREVIEW [ <b>${l_show_preview}</b> ],^checkout(preview)")
|
||||
|
||||
out2+=("^tag(preview)")
|
||||
out2+=("^sep($PREVIEW)")
|
||||
out2+=("$YES ,mb-setvar show_preview=yes $CONFIG_FILE;$me")
|
||||
out2+=("$NO,mb-setvar show_preview=no $CONFIG_FILE;$me")
|
||||
|
||||
|
||||
|
||||
|
||||
### RUN
|
||||
|
|
Loading…
Reference in New Issue