diff --git a/README.md b/README.md index 0cd35eb..7311734 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ Use terminal to issue this command: ```bitsnet``` Force login attempt -U Update program + -w + Force sending request to wireless + -q + Quiet mode. Don't send a notification -h Display help ``` diff --git a/bitsnet b/bitsnet index ee3cec0..7dc0e67 100755 --- a/bitsnet +++ b/bitsnet @@ -7,7 +7,7 @@ source ~/.local/lib/bitsnet/util.sh source ~/.bitsnetrc # Parse arguments -while getopts "u:p:dhUof" o; do +while getopts "u:p:dhUofwq" o; do case "${o}" in u) username=${OPTARG} @@ -32,6 +32,9 @@ while getopts "u:p:dhUof" o; do w) cisco=1 ;; + q) + quiet=1 + ;; h | * | [?]) show_help ;; diff --git a/util.sh b/util.sh index 3fbb3c9..2857ef5 100644 --- a/util.sh +++ b/util.sh @@ -20,6 +20,10 @@ function show_help { force login attempt -U update + -w + Force sending request to wireless + -q + Quiet mode. Don't send a notification -h display help" exit @@ -42,7 +46,7 @@ function extract_msg { } function send_msg { - if [[ debug -eq 0 ]]; then + if [[ $debug == 0 || $quiet != 1 ]]; then notify-send 'BITSnet' "$1" --icon=network-transmit else debug_msg "reply: $1"