Table of Contents
Blinking keyboard backlight under Linux
Well, I own a Thinkpad T440p, so unfortunately I don't have a Thinklight. I recently put a backlit keyboard into the machine, then I realised that I don't really need the keyboard backlight. I thought the best way to put it into good use is to get it to blink when certain things happen.
My operating system is Debian - the Universal Operating System. I am running Debian Stretch.
Under Pidgin
By following this guide, you can get your keyboard backlight to blink when you get new message:
apt-get source pidgin-blinklight
- In
pidgin-blinklight-0.11.1/src/blink.c
, change /proc/acpi/ibm/light
to/proc/acpi/ibm/kbdlight
, and change off to 0, on to 2. - In
pidgin-blinklight-0.11.1/src/blinklight-fixperm.c
, change/proc/acpi/ibm/light
to/proc/acpi/ibm/kbdlight
. - Go to
pidgin-blinklight-0.11.1
, recompile the package by runningdebuild -b -uc -us
. - Go to the parent directory of
pidgin-blinklight-0.11.1
, install the resulting package, it should have the namepidgin-blinklight_0.11.1-3_amd64.deb
- Enable pidgin-blinklight plugin in Pidgin.
I am pretty sure someone can write a patch and submit to the package maintainer, I am sure I am probably able to do that, but then I have some homework to do. So I am just going to leave it like that for now.
When the terminal bell is triggered
- First of all, you need to follow the previous section, change light to kbdlight if you want to use the keyboard backlight rather than the Thinklight.
- After compilation, copy
pidgin-blinklight-0.11.1/src/demoblink
to/usr/local/bin
. - Add
chmod o+w /proc/acpi/ibm/kbdlight
to your/etc/rc.local
. - Configure your terminal emulator to run
/usr/local/bin/demoblink
when the terminal alarm bell is sounded. In Konsole, this is under Settings→Configure Notifications…→Bell in Visible Session - Open your terminal emulator, and smash the tab key to make your keyboard blink. Now your keyboard would blink at you, as the terminal screams at you.
Other notification event
You can also trigger the running of /usr/local/bin/demoblink
in notification events in your desktop environment. In KDE, it is under Notifications System Settings Module, which you can launch by typing in “Notification” in your Application Launcher. It is useful to change the notification settings for “Plasma Workspace”.