Skip to content

Commit

Permalink
sync i3lock-wrapper options with i3lock.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashinkarov committed May 15, 2018
1 parent 176f68f commit 49889ca
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions i3lock-wrapper
Expand Up @@ -18,8 +18,8 @@ set -e

script_name=$(basename $0)
params=$(getopt \
-o vnbI:up:eflh \
-l version,nofork,beep,inactivity-timeout:,no-unlock-indicator,pointer:,ignore-empty-password,show-failed-attempts,logo,help \
-o vnbup:eflh \
-l version,nofork,beep,no-unlock-indicator,pointer:,ignore-empty-password,show-failed-attempts,logo,help \
-n "$script_name" -- "$@")
eval set -- "$params"
# exit on bad arguments
Expand All @@ -34,21 +34,17 @@ as a background image for the screen saver.
Usage: $script_name [options]
-v, --version version of the i3lock.
-n, --nofork don't fork i3lock after start.
-b, --beep enable beeping.
-d, --dpms enable turning off the screen with DPMS.
-I sec,
--inactivity-timeout=sec specifies the number of seconds i3lock will
wait for another password before turning
off the monitors.
-u, --no-unlock-indicator disable the unlock indicator.
-v, --version version of the i3lock.
-n, --nofork don't fork i3lock after start.
-b, --beep enable beeping.
-u, --no-unlock-indicator disable the unlock indicator.
-p win|default,
--pointer=win|default do not hide the mouse pointer on default
or the current position of the mouse pointer.
-e, --ignore-empty-password when an empty password is provided by the user,
do not validate it.
-l, --logo superimpose the padlock logo
--pointer=win|default do not hide the mouse pointer on default
or the current position of the mouse pointer.
-e, --ignore-empty-password when an empty password is provided by the user,
do not validate it.
-f, --show-failed-attempts Show the number of failed attempts, if any.
-l, --logo superimpose the padlock logo
Please note, that all the options except "-l" or "--logo" are being passed
directly to i3lock. See "man i3lock" for more details.
Expand All @@ -67,18 +63,6 @@ arg_test () {
shift;;
-b|--beep)
shift;;
-I|--inactivity-timeout)
shift
case "$1" in
[0-9]*)
shift;;
*)
echo "$script_name: invalid option \"$1\" for argument -I" \
"number expected" >&2
exit 1
;;
esac
;;
-u|--no-unlock-indicator)
shift;;
-p|--pointer)
Expand Down

0 comments on commit 49889ca

Please sign in to comment.