Hoy navegando por la red he encontrado una utilidad a la que muchos de nosotros le encontraremos bastante utilidad.
Todos los que tengamos portátil sabemos lo fastidioso que llega a ser escribir en ubuntu y que no nos moleste el touchpap (click en lugares que no desesamos, el ratón se "disloca", abre ventanas que estaban en segundo plano), bien pues aquí les traigo un scripts que puede solucionar este problemilla, tan fácil cómo un "Copy/Paste" en un archivo de texto y ejecutarlo, para desactivar/activar el touchpap tan solo hay que pulsar "ALT+T".
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_auto-disable true |
| echo "Generando los scripts" |
| zenity --question --text= "¿Desea activar las notificaciones?\nSe instalara el paquete libnotify-bin\npara lanzar notificaciones a traves de Notify-OSD" |
| sudo apt-get install libnotify-bin |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_notify true |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_notify false |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_auto-disable false |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_enabled) = true ]; then |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_enabled false |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_notify) = true ]; then |
| notify-send --icon=mouse "Touchpad Deshabilitado" |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_enabled true |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_notify) = true ]; then |
| notify-send --icon=mouse "Touchpad Habilitado" |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_auto-disable) = true ]; then |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_enabled) = true ] && [ -e /dev/input/by- id /*event-mouse ]; then |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_enabled false |
| notify-send --icon=mouse "Touchpad Deshabilitado" "Se ha detectado un Ratón externo" |
| elif [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_enabled) = false ] && [ ! -e /dev/input/by- id /*event-mouse ]; then |
| gconftool-2 -- type boolean -- set /desktop/gnome/peripherals/touchpad/touchpad_enabled true |
| notify-send --icon=mouse "Touchpad Habilitado" "Se ha desconectado el Ratón externo" |
| if [ $(gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_notify) = true ]; then |
| echo "Instalando los script" |
| gksu cp $MANUAL /usr/bin/ |
| echo "Asociando combinacion de teclas Alt+t" |
| gconftool-2 -t str -- set /apps/metacity/global_keybindings/run_command_8 "<Alt>t" |
| gconftool-2 -t str -- set /apps/metacity/keybinding_commands/command_8 "$MANUAL" |
| echo "Asociando combinacion de teclas Alt+a para el modo automático" |
| gconftool-2 -t str -- set /apps/metacity/global_keybindings/run_command_7 "<Alt>a" |
| gconftool-2 -t str -- set /apps/metacity/keybinding_commands/command_7 "gconftool-2 --type boolean --set /desktop/gnome/peripherals/touchpad/touchpad_auto-disable true" |
| echo "Creando autoarranque" |
| cd /usr/share/gnome/autostart/ |
| echo '[Desktop Entry]' | sudo tee $AUTO.desktop |
| echo 'Type=Application' | sudo tee -a $AUTO.desktop |
| echo 'Name=AutoDeshabilitar Touchpad' | sudo tee -a $AUTO.desktop |
| echo "Exec=$AUTO" | sudo tee -a $AUTO.desktop |
| echo 'Icon=mouse' | sudo tee -a $AUTO.desktop |
| echo 'Comment=Detecta si exixte un raton, y si es asi, deshabilita el touchpad' | sudo tee -a $AUTO.desktop |
No hay comentarios:
Publicar un comentario