Added timeout option
This commit is contained in:
parent
cce12cea78
commit
3cc0b1a300
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Show system status in notification, or your own message
|
# Show system status in notification, or your own message
|
||||||
# Syntaxis: notify [-vb] [<title> <message>]
|
# Syntaxis: notify [-vb] [-t <timeout>] [<title> <message>]
|
||||||
|
|
||||||
# Requirements:
|
# Requirements:
|
||||||
# - brightnessctl
|
# - brightnessctl
|
||||||
|
@ -12,7 +12,7 @@ panic () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get options
|
# Get options
|
||||||
while getopts ":bv" options; do
|
while getopts ":bvt:" options; do
|
||||||
case "${options}" in
|
case "${options}" in
|
||||||
b)
|
b)
|
||||||
value=$( brightnessctl | grep -o "[0-9]*%" )
|
value=$( brightnessctl | grep -o "[0-9]*%" )
|
||||||
|
@ -34,6 +34,9 @@ while getopts ":bv" options; do
|
||||||
timeout=2000
|
timeout=2000
|
||||||
category='sysinfo'
|
category='sysinfo'
|
||||||
;;
|
;;
|
||||||
|
t)
|
||||||
|
timeout="${OPTARG}"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
panic
|
panic
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue