summaryrefslogtreecommitdiff
path: root/scripts/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gui')
-rwxr-xr-xscripts/gui/sdev17
-rwxr-xr-xscripts/gui/shot4
2 files changed, 8 insertions, 13 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
diff --git a/scripts/gui/shot b/scripts/gui/shot
index e24e551..e7d2d08 100755
--- a/scripts/gui/shot
+++ b/scripts/gui/shot
@@ -52,7 +52,9 @@ fi
if [ "${mode}" = "select" ]; then
run --no-exit --reload-compositor \
- "screenshot_handle ${mode} ${outfile}" && echo "${outfile}"
+ screenshot_handle "${mode}" "${outfile}"
+
+ [ $? -eq 0 ] && echo "${outfile}"
else
screenshot_handle "${mode}" "${outfile}" && echo "${outfile}"
fi