Professional blog


Touchpad on/off

Posted in HowTo, Linux by Yordan Georgiev on the February 12th, 2007

. , .
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'

Subscribe to comments with RSS or TrackBack to 'Touchpad on/off'.

  1. said,

    on July 17th, 2007 at 6:15 am

    ;) HP Pavillion Zv5200
    .

Leave a Reply