Adicione o mactel
PPA por seguindo estas instruções .
Instalar os pacotes applesmc-dkms
e hid-dkms
.
Reinicie.
sudo vi /usr/local/bin/keyboard-backlight
e adicione:
#!/bin/bash
VALUE=$(cat /sys/class/leds/smc::kbd_backlight/brightness)
INCREMENT=32
TOTAL=unset
case $1 in
up)
TOTAL='expr $VALUE + $INCREMENT'
;;
down)
TOTAL='expr $VALUE - $INCREMENT'
;;
full)
TOTAL=255
;;
off)
TOTAL=0
;;
esac
if [ $TOTAL == unset ]; then
echo "Please specify up, down, full, or off"
exit 1
fi
if [ $TOTAL -gt 255 ]; then TOTAL=255; fi
if [ $TOTAL -lt 0 ]; then TOTAL=0; fi
echo $TOTAL > /sys/class/leds/smc::kbd_backlight/brightness
Seguido por sudo chmod 755 /usr/local/bin/keyboard-backlight
.
sudo visudo
e adicione a linha:
your_username_goes_here ALL=NOPASSWD:/usr/local/bin/keyboard-backlight up, /usr/local/bin/keyboard-backlight down
Ir para System
> Preferences
> Keyboard Shortcuts
.
Adicione novos atalhos:
Increase Keyboard Backlight Brightness
/ sudo keyboard-backlight up
e
Decrease Keyboard Backlight Brightness
/ sudo keyboard-backlight down
.
Defina cada um para a chave correta clicando na caixa de mapeamento de teclas e pressionando a tecla.