From 8450b90e31830999dd4c0e782ba6b96ffbdc0b77 Mon Sep 17 00:00:00 2001 From: haemka Date: Sun, 1 Aug 2021 20:12:24 +0200 Subject: [PATCH] Fixed fan modes in g14control.sh --- g14control.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/g14control.sh b/g14control.sh index eee3c39..10787a7 100755 --- a/g14control.sh +++ b/g14control.sh @@ -94,15 +94,16 @@ fan() { CHKMODE=$(cat ${INTERFACE}) - notify-send -t 500 "Fan mode changed" \ + notify-send "Fan mode changed" \ "${MODELIST[${CURRMODE}]} -> ${MODELIST[${CHKMODE}]}" } usage() { - echo "Usage: $0 [-d LEVEL|up|down] [-k LEVEL|up|down] [-f [MODE]] [-h]" + echo "Usage: $0 [-d LEVEL|up|down] [-k LEVEL|up|down] [-f MODE] [-F] [-h]" } -while getopts "d:k:f:h" ARG; do + +while getopts "d:k:f:Fh" ARG; do case "${ARG}" in d) disp ${OPTARG} @@ -110,6 +111,9 @@ while getopts "d:k:f:h" ARG; do k) kbd ${OPTARG} ;; + F) + fan ${OPTARG} + ;; f) fan ${OPTARG} ;;