mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-21 22:52:52 +00:00
Added quiet-mode (#288)
This commit is contained in:
parent
5d8b8aa72a
commit
de7bcdc2b5
2 changed files with 14 additions and 3 deletions
|
@ -20,6 +20,7 @@ init_config () {
|
||||||
pixel_scale=10,1000
|
pixel_scale=10,1000
|
||||||
solid_color=333333
|
solid_color=333333
|
||||||
description=""
|
description=""
|
||||||
|
quiet=false
|
||||||
i3lockcolor_bin="i3lock-color"
|
i3lockcolor_bin="i3lock-color"
|
||||||
|
|
||||||
if ! cmd_exists "$i3lockcolor_bin" && cmd_exists "i3lock"; then
|
if ! cmd_exists "$i3lockcolor_bin" && cmd_exists "i3lock"; then
|
||||||
|
@ -764,7 +765,7 @@ echof() {
|
||||||
error) msgpfx="[\e[1;91m!\e[m]";;
|
error) msgpfx="[\e[1;91m!\e[m]";;
|
||||||
*) msgpfx="";;
|
*) msgpfx="";;
|
||||||
esac
|
esac
|
||||||
echo -e "$msgpfx $message"
|
[ "$quiet" != true ] && echo -e "$msgpfx $message"
|
||||||
}
|
}
|
||||||
|
|
||||||
# help message
|
# help message
|
||||||
|
@ -772,6 +773,9 @@ usage() {
|
||||||
echo
|
echo
|
||||||
echo "Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]"
|
echo "Usage: betterlockscreen [-u <PATH>] [-l <EFFECT>] [-w <EFFECT>]"
|
||||||
echo
|
echo
|
||||||
|
echo " -q --quiet"
|
||||||
|
echo " Do not produce any text output on locking"
|
||||||
|
echo
|
||||||
echo " -u --update <PATH>"
|
echo " -u --update <PATH>"
|
||||||
echo " Update lock screen image"
|
echo " Update lock screen image"
|
||||||
echo
|
echo
|
||||||
|
@ -828,8 +832,6 @@ usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
echof header "Betterlockscreen"
|
|
||||||
|
|
||||||
init_config
|
init_config
|
||||||
|
|
||||||
# show usage when no arguments passed
|
# show usage when no arguments passed
|
||||||
|
@ -841,6 +843,12 @@ for arg in "$@"; do
|
||||||
[[ "${arg:0:1}" = '-' ]] || continue
|
[[ "${arg:0:1}" = '-' ]] || continue
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
||||||
|
-q | --quiet)
|
||||||
|
quiet=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
-u | --update)
|
-u | --update)
|
||||||
runupdate=true
|
runupdate=true
|
||||||
imagepaths+=("$2")
|
imagepaths+=("$2")
|
||||||
|
@ -959,6 +967,8 @@ for arg in "$@"; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echof header "Betterlockscreen"
|
||||||
|
|
||||||
# Run image generation
|
# Run image generation
|
||||||
[[ $runupdate ]] && update "${imagepaths[@]}"
|
[[ $runupdate ]] && update "${imagepaths[@]}"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ blur_level=1
|
||||||
pixel_scale=10,1000
|
pixel_scale=10,1000
|
||||||
solid_color=333333
|
solid_color=333333
|
||||||
wallpaper_cmd="feh --bg-fill"
|
wallpaper_cmd="feh --bg-fill"
|
||||||
|
quiet=false
|
||||||
# i3lockcolor_bin="i3lock-color" # Manually set command for i3lock-color
|
# i3lockcolor_bin="i3lock-color" # Manually set command for i3lock-color
|
||||||
|
|
||||||
# default theme
|
# default theme
|
||||||
|
|
Loading…
Reference in a new issue