aboutsummaryrefslogtreecommitdiff
path: root/betterlockscreen
diff options
context:
space:
mode:
Diffstat (limited to 'betterlockscreen')
-rwxr-xr-xbetterlockscreen16
1 files changed, 13 insertions, 3 deletions
diff --git a/betterlockscreen b/betterlockscreen
index e385591..860a59f 100755
--- a/betterlockscreen
+++ b/betterlockscreen
@@ -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[@]}"