You are not logged in.

#1 2022-06-24 05:33:42

anthanor2
Member
Registered: 2021-09-24
Posts: 18

Turning keyboard backlight back on after

Hi, I did some skimming of the ACPI, ACPID, and systemd events wiki pages but I'm not sure which way to go for such a small task. Its a small problem but slightly annoying and I'd really appreciate a pointer in the right direction. Whenever, I close and reopen my laptop lid, my keyboard backlight doesn't return to its original state. Therefore I whipped up a simple script at /usr/local/bin/wake_keyboard to detect if its night time(when I need my keyboard lights):

#!/usr/bin/bash

hour=$(date +%H)

if [[ ${hour} < 7 || ${hour} > 17  ]]; then  
    brightnessctl --device='tpacpi::kbd_backlight' set 100%;
fi

My question now is, how would you recommend running this script whenever I open the lid of my laptop? A lot of the options I looked into were pretty confusing so once again, I'd really appreciate a nudge in the right direction.

Offline

#2 2022-06-24 05:58:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,569

Re: Turning keyboard backlight back on after

I close and reopen my laptop lid

Does that imply the system going through S3?
=> https://wiki.archlinux.org/title/Power_ … stem-sleep

Otherwise you'll have to run and implement https://wiki.archlinux.org/title/Acpid#Configuration (I'm not aware that systemd allows you to run random stuff as lid action)

Offline

Board footer

Powered by FluxBB