02.12.2007

Touchpad on/off

. , .
bash

#!/bin/bash
if [ "$(synclient -l | awk '$1=/TouchpadOff/ { print $3 }')" == "1" ] ; then    # Touchpad disabled
 
NEWSTATE="0"
 
MSG="Touchpad enabled"
 
else   # Touchpad enabled
 
NEWSTATE="1"
 
MSG="Touchpad disabled"
 
fi
 
synclient touchpadoff=${NEWSTATE}
 
[ "$(pidof dcopserver)" ] && dcop knotify default notify '' 'Touchpad' "${MSG}" '' '' 15 0

KDE. . :

[Desktop Entry]
Comment=
Comment[en_US]=
Encoding=UTF-8
Exec='/home/dancho/bin/touch.bash'
GenericName=
GenericName[en_US]=
Icon=/usr/share/app-install/icons/ktouch.png
MimeType=
Name=touchpad on/off
Name[en_US]=touchpad on/off
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=none
X-KDE-SubstituteUID=false
X-KDE-Username=
X-Ubuntu-Gettext-Domain=desktop_kdebase

One Response to “Touchpad on/off”

  1. Says:

    ;) HP Pavillion Zv5200
    .

Leave a Reply