summaryrefslogtreecommitdiff
path: root/scripts/gui/sdev
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-11-25 22:40:16 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-11-25 22:40:16 +0400
commit7c19172f87b6fe35dffd8f9a252c3c10efe13aa2 (patch)
treef42dd1ffd3440200977ea4c38950458f57bd534c /scripts/gui/sdev
parentaf078c55f03e2884b883abb095c623b96fa97ec5 (diff)
fix(scripts): fix shellcheck errors and warnings
Diffstat (limited to 'scripts/gui/sdev')
-rwxr-xr-xscripts/gui/sdev17
1 files changed, 5 insertions, 12 deletions
diff --git a/scripts/gui/sdev b/scripts/gui/sdev
index 5c2976f..4ec0ed8 100755
--- a/scripts/gui/sdev
+++ b/scripts/gui/sdev
@@ -27,22 +27,15 @@ get_id() {
while getopts "e:d:t:lh" option; do
case "${option}" in
- e)
- input_device_handle enable "$(get_id ${OPTARG})"
- exit $?
- ;;
- d)
- input_device_handle disable "$(get_id ${OPTARG})"
- exit $?
- ;;
+ e) run input_device_handle enable "$(get_id "${OPTARG}")" ;;
+ d) run input_device_handle disable "$(get_id "${OPTARG}")" ;;
t)
- id=$(get_id ${OPTARG})
+ id="$(get_id "${OPTARG}")"
if input_device_handle is_enabled "${id}"; then
- input_device_handle disable "${id}"
+ run input_device_handle disable "${id}"
else
- input_device_handle enable "${id}"
+ run input_device_handle enable "${id}"
fi
- exit $?
;;
l)
input_device_handle list