feat: removed toggle touchpad script. fix: bad root checks. style: replaced single quotes with double

This commit is contained in:
AngeD 2021-11-15 16:16:12 +01:00
parent ffa6111967
commit afb38610f1
3 changed files with 4 additions and 11 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash #!/usr/bin/bash
if [ "$EUID" != '0' ]; then if [ "$EUID" -ne 0 ]; then
echo 'error: you cannot perform this operation unless you are root.' echo "error: you cannot perform this operation unless you are root."
exit 1 exit 1
fi fi

View File

@ -1,7 +0,0 @@
#!/usr/bin/bash
DEV="Elan Touchpad"
ON=$(xinput list-props "$DEV" | awk -F ':' '$1 ~ "Device Enabled" {print $2}')
xinput set-prop "$DEV" "Device Enabled" "$((1-ON))"

View File

@ -2,8 +2,8 @@
set -e set -e
if [ "$EUID" == 0 ]; then if [ "$EUID" -eq 0 ]; then
echo 'error: cannot be root.' echo "error: cannot be root."
exit 1 exit 1
fi fi