diff options
author | Von Random <von@vdrandom.org> | 2019-03-12 14:22:23 +0300 |
---|---|---|
committer | Von Random <von@vdrandom.org> | 2019-03-12 14:22:23 +0300 |
commit | 652b984561244746abd70bac8e637333c647cdc4 (patch) | |
tree | 0b2636d5ed834f3b277616f091b7d5eac906ff85 | |
parent | 8e4fd746045b445062b90c7118b186dc1d117ef2 (diff) |
some refactor
-rwxr-xr-x | touchpad-toggle | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/touchpad-toggle b/touchpad-toggle index 8754f98..8babf18 100755 --- a/touchpad-toggle +++ b/touchpad-toggle @@ -5,11 +5,10 @@ DEVNAME='ETPS/2 Elantech Touchpad' (($#)) || [[ ! -r $STATUSFILE ]] case $? in - (1|'on') toggle='enable' flag_action=('rm' '-f');; - (0|'off') toggle='disable' flag_action=('touch');; + (1|'on') toggle='enable' flag_action=('/usr/bin/rm' '-f');; + (0|'off') toggle='disable' flag_action=('/usr/bin/touch');; (*) exit 1;; esac -notification_msg="Touchpad ${toggle}d" -xinput $toggle $DEVNAME +/usr/bin/xinput $toggle $DEVNAME $flag_action[@] $STATUSFILE -notify-send $notification_msg +notify-send "Touchpad ${toggle}d" |