feat: removed toggle touchpad script. fix: bad root checks. style: replaced single quotes with double
This commit is contained in:
parent
ffa6111967
commit
afb38610f1
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if [ "$EUID" != '0' ]; then
|
||||
echo 'error: you cannot perform this operation unless you are root.'
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error: you cannot perform this operation unless you are root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -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))"
|
@ -2,8 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$EUID" == 0 ]; then
|
||||
echo 'error: cannot be root.'
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo "error: cannot be root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user