mbscreenlocker upd
parent
41c42c4b88
commit
3bbb004390
|
@ -18,6 +18,20 @@ fi
|
|||
# read config variables from file
|
||||
source <(grep = $CONFIG_FILE)
|
||||
|
||||
case $LANG in
|
||||
pl*)
|
||||
TITLE="Tworzenie obrazków dla blokady ekranu"
|
||||
TEXT="\nCierpliwości...\nto może chwilkę potrwać.."
|
||||
TITLE2="Gotowe"
|
||||
TEXT2="\n<b>super+l</b> aby zablokować ekran"
|
||||
;;
|
||||
*)
|
||||
TITLE="Caching images for faster screen locking"
|
||||
TEXT="\nPlease wait...\nthis might take few seconds..."
|
||||
TITLE2="Done"
|
||||
TEXT2="All required changes have been applied.\n Use <b>super + l</b> to lock screen."
|
||||
;;
|
||||
esac
|
||||
|
||||
lock() {
|
||||
if [[ $screenlocker == "betterlockscreen" ]]; then
|
||||
|
@ -28,26 +42,21 @@ lock() {
|
|||
}
|
||||
|
||||
cache() {
|
||||
case $LANG in
|
||||
pl*)
|
||||
TITLE="Tworzenie obrazków dla blokady ekranu"
|
||||
TEXT="\nCierpliwości...\nto może chwilkę potrwać.."
|
||||
TITLE2="Gotowe"
|
||||
TEXT2="\n<b>W-l</b> aby zablokować ekran\n<b>W-A-s</b>aby konfigurować Tapety/Blokadę ekranu."
|
||||
;;
|
||||
*)
|
||||
TITLE="Caching images for faster screen locking"
|
||||
TEXT="\nPlease wait...\nthis might take few seconds..."
|
||||
TITLE2="Done"
|
||||
TEXT2="All required changes have been applied."
|
||||
;;
|
||||
esac
|
||||
|
||||
source <(grep file ~/.config/nitrogen/bg-saved.cfg)
|
||||
notify-send.sh -u critical -i emblem-photos -R /tmp/mbscreencache "$TITLE" "$TEXT"
|
||||
betterlockscreen -u "$file"
|
||||
notify-send.sh -u normal -i emblem-photos -R /tmp/mbscreencache "$TITLE2" "$TEXT2"
|
||||
}
|
||||
|
||||
setimg() {
|
||||
img=$(yad --file --file-filter="Image Files (*.jpg *.jpeg *.png *.tif)| *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG")
|
||||
if [ -f "$img" ]; then
|
||||
notify-send.sh -u critical -i emblem-photos -R /tmp/mbscreencache "$TITLE" "$TEXT"
|
||||
betterlockscreen -u "$img"
|
||||
notify-send.sh -u normal -i emblem-photos -R /tmp/mbscreencache "$TITLE2" "$TEXT2"
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
grep "^#:" $0 | while read DOC; do printf '%s\n' "${DOC###:}"; done
|
||||
|
@ -59,6 +68,7 @@ usage() {
|
|||
case "$1" in
|
||||
-c|cache) cache;;
|
||||
-h|--help) usage;;
|
||||
-s|setimg) setimg;;
|
||||
*) lock;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue