Habilitando/desabilitando o touchpad através da tecla de função Fn (Fn + F9) em notebooks Asus
Publicado por David Lorente em 10/03/2016
[ Hits: 6.902 ]
#!/bin/bash
declare -i IDp
ID=`xinput list | grep -Eio 'touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
xinput disable $ID
# echo "Touchpad disabled."
# notify-send 'Touchpad' 'Disabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
else
xinput enable $ID
# echo "Touchpad enabled."
# notify-send 'Touchpad' 'Enabled' -i /usr/share/icons/Adwaita/48x48/devices/input-touchpad.png
fi
#!/bin/bash
# Script touchpad_toogle.sh: habilita/desabilita o touchpad por meio das teclas de atalho (fn+f9)
# Local onde a trava será criadap
CMD="/home/username/.local/share/scripts/touchpad"
ID=$(xinput list | grep -Eio 'touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}')
STATE=$(xinput list-props $ID | grep 'Device Enabled' | awk '{print $4}')
if [ $STATE -eq 1 ]
then
xinput disable $ID
# make the lock to remember the touchpad's last status
touch $CMD/touchpad.lock
# echo "Touchpad enabled."
notify-send -t 3000 'Touchpad' 'Disabled' -i /usr/share/icons/Numix-Circle/48x48/apps/input-touchpad.svg
else
xinput enable $ID
# remove the lock to remember the touchpad's last status
if [ -f $CMD/touchpad.lock ]
then
rm $CMD/touchpad.lock
fi
# echo "Touchpad enabled."
notify-send -t 3000 'Touchpad' 'Enabled' -i /usr/share/icons/Numix-Circle/48x48/apps/input-touchpad.svg
fi
#!/bin/sh
# Script touchpad_last_status.sh: verifica o último status do touchpad.
#
# Esse script deve ser executado ao fazer o login. Novamente no Xfce, fazemos a inclusão desse arquivo em:
# "Settings > Settings Manager > Session and Startup", aba "Application Autostart".
# Local onde a trava está localizada
CMD="/home/username/.local/share/scripts/touchpad"
ID=$(xinput list | grep -Eio 'touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}')
if [ -f $CMD/touchpad.lock ]
then
# Desabilita o touchpad
xinput disable $ID
fi
ID=$(xinput list | grep -Eio 'touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}')
xinput disable $ID
Como configurar um segundo drive de CDROM no seu Linux
Removendo softwares instalados no Slackware
Instalando a placa de vídeo GeForce 4 MX numa PC-Chips M810LR-H
Acompanhando progresso na cópia de arquivos
Exibindo vídeos na sua área de trabalho com o Xine
Ativando NumLock automaticamente do login do Ubuntu
Como montar um desktop com 2 monitores usando um PC velho
Lançamento do Projeto PCLinuxOS Brasil!
Nenhum comentário foi encontrado.
SynapSeq - programa para estimular as ondas cerebrais
Por que seu __DIR__ falhou ou o "inferno" dos caminhos no PHP
Preparando-se para certificações da LPI através do LPI Lab
Migração de Arch Linux para repositórios CachyOS (Uso de Instruções v3 e v4)
Arch Linux com repos do CachyOS para otimização ou usar Gentoo?
Ativando o modo Quake no XFCE4-Terminal
[Tutorial] Configurando Multimaster no Samba 4 AD (DC02) + Explicação de FSMO Roles
[Resolvido] Google Chrome reclamando de perfil em uso após mudar hostname
Senhor Einstein tinha razão mesmo! [RESOLVIDO] (12)
Como insiro e excluo um elemento XML e JSON ao código Javascript (2)
Como instalar Warsaw no Gentoo? (4)
Da pra formatar um netbook MGB e usar algum linux nele? É possível usa... (4)









