Alterar LED do teclado
Publicado por henrique (última atualização em 14/05/2021)
[ Hits: 5.258 ]
Homepage: naotem.com
Script simples que desliga a LED se estiver acesa ou liga se estiver apagada.
Dependência: pyautogui
#!/bin/python3
from pyautogui import keyDown, keyUp
from os.path import isfile
from os import system
#by: MRH
while True:
if isfile('ligado.txt'):
system('rm ligado.txt')
keyDown('scrolllock')
if isfile('ligado.txt') != True:
open('desligado.txt', 'w').write('a')
if isfile('desligado.txt'):
system('rm desligado.txt')
keyUp('scrolllock')
if isfile('desligado.txt') != True:
open('ligado.txt', 'w').write('a')
break
# para deixar piscando
# while True:
# pyautogui.keyDown('scrolllock')
# time.sleep(0.35)
# pyautogui.keyUp('scrolllock')
Descobrir HOME do usuario e criar arquivo de configuração
Gentoo binário em 2026: UEFI, LUKS, Btrfs e Systemd
Trabalhando Nativamente com Logs no Linux
Jogando Daikatana (Steam) com Patch 1.3 via Luxtorpeda no Linux
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Usando dracut e dispensando genkernel no Gentoo + LUKS + Btrfs
Curso GRÁTIS: OCS Inventory NG - Do Deploy ao Hardening com foco em Segurança da Informação!
Instalando fontes via script no Nautilus Scripts no Gnome do Debian 13
O que houve com slackware ??? (3)
Pendrive do Ubuntu 24.04 travando ao tentar fazer a instalação dual bo... (5)
erros nos arquivos sources list ubuntu [RESOLVIDO] (3)
Instalar Linux em notebook Sony Vaio VPCEG13EB (7)
VirtualBox no Ubuntu 25.10 sem redimensionam... automatico. (2)









