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