# If config file not exist create one with defaults
if [ ! -f $SCRNLOCKCFG ]; then
cat <<EOF > ${SCRNLOCKCFG}
# Effect to use: dim, blur, dimblur or pixel
effect=pixel
# ScreenLocker program: betterlockscreen or i3lock
screenlocker=i3lock
EOF
fi
# read config variables from file
source <(grep = $SCRNLOCKCFG)
case $LANG in
pl*)
LOCK="Zablokuj ekran"
GENIMGS="Generuj obrazy tła"
LOCKER="Blokada ekranu <small>(super+l)</small>"
TYPETO="wpisz hasło aby odblokować"
SELECT_IMG="Wybierz obrazek"
CACHE="Użyj aktualnej tapety"
EFFECT="Efekt (ustaw i wypróbuj)"
DIM="przyciemnienie"
BLUR="rozmycie"
DIMBLUR="przyciemnienie i rozmycie"
PIXEL="pikseloza"
DESK="Rozmyty pulpit"
EDITCONF="Edytuj plik konfiguracyjny"
LEFTPANEL="Lewy panel"
;;
*)
LOCK="Lock screen now"
GENIMGS="Update Images"
LOCKER="ScreenLocker <small>(super+l)</small>"
TYPETO="type password to unlock"
SELECT_IMG="Select image file"
CACHE="Cache current wallpaper for ScreenLock"
EFFECT="Effect (set and run)"
DIM="dim"
BLUR="blur"
DIMBLUR="dim and blur"
PIXEL="pixel"
DESK="Blurred desktop"
EDITCONF="Edit config file"
LEFTPANEL="Left panel"
;;
esac
. $HOME/.config/mabox/mabox.conf
me="jglockscreen -s"
#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'