Skip to content

A small Linux app that dynamically switches keyboard backlight based on mouse and keyboard activity.

License

Notifications You must be signed in to change notification settings

moson-mo/smartlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartlight

A small Linux app that dynamically switches keyboard backlight based on mouse and keyboard activity.
When keyboard / mouse are idle for some time, the backlight is turned off.
This duration can be specified as well as the off and on brightness levels.

Note: I've written this app since my thinkpad (T-480s) does not support automatic keyboard brightness control.
So far it has only been tested with that model on Manjaro Linux.

smartlight consists of 3 binaries:

  • smservice

    • The service that set's the backlight level via dbus (org.freedesktop.UPower.KbdBacklight.SetBrightness)
    • Run it as a systemd --user service or set up it up in your startup applications in your favorite DE (see examples folder).
    • Use command line arguments to configure keyboard / mouse timeout and brightness levels
  • smcli

    • command line interface to control smservice
  • smtray

    • tray icon with menu to control smservice
    • set up as a startup application in your DE

Note that smtray requires libappindicator

Building

See buildscript build.sh.

How to get

go get it :)

go get github.com/moson-mo/smartlight

or clone git repo

git clone https://github.com/moson-mo/smartlight.git

or download binaries from the releases page...

Installation

You can use the install script install.sh which copies the binaries to /usr/local/bin/.
Note that you need to build first (or download binaries from release on github).

In order to run things on startup set up smservice (and smtray if you like) as startup application on your favorite desktop environment.

Configuration

On the first start of smservice, a config file is created here ~/.smartlight/config.json, adjust the settings as needed. You can also override those settings by running the application with parameters. Start the service with "-h" to see a list of available options.

Based on

Following libraries are used:

Disclaimer

Although this software uses "safe methods" in order to set keyboard backlight levels I wouldn't say it can't kill things. So handle with care.

In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this software. (ok, that section I've copied from somewhere else ;-) , but ok it's still valid)

License

A few libraries are used here.
If this project does not comply, please let me know.
I don't know shit about those things. :) , bear with me.

WORK IN PROGRESS

About

A small Linux app that dynamically switches keyboard backlight based on mouse and keyboard activity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published