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
|
#!/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
|
||||||
|
|
||||||
|
@ -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
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user