Skip to content

LED device reporting and setting tool for Linux, written in golang.

License

Notifications You must be signed in to change notification settings

rbisewski/ledctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ledctl - LED device reporting and setting tool for Linux, written in golang.

This is a rather plain golang-based method of gathering and setting LED data from a wide range of devices, if-and-only-if supported by the Linux kernel.

When it comes to LED device data on Linux, I expect there could potentially be some non-conformity (some devices may have odd behaviour), so go ahead and shoot me an email if you see any obvious issues on your hardware.

My reason for writing this was a need for a more minimalist method of accessing a number of customizable LED devices, many of which have their own API which sometimes are heavy-weight implementations. As the Linux kernel already controls these, a simple golang commandline interface works for trivial situations.

Maybe one day it will be more fleshed out, but for now it is more of a simple tool. Feel free to fork it and use it for other projects if you find it useful.

Requirements

The following is needed in order for this to function as intended:

  • Linux kernel 4.4+
  • golang

Older kernels could still give some kind of result, but I think most of the newer Linux distros ought to contain all of the modules need to read and write data to the brightness pseudo-files. Feel free to email me if this is incorrect.

Running

  1. Build this program as you would a simple golang module.

    go build

  2. Run the program to gather data from a list of devices.

    ledctl

  3. Set the brightness level of a given device (this requires sudo).

    sudo ledctl -device input2::scrolllock -level 1

Todo

  • Consider adding functionality to generate tables without needing \t chars.

Author

Written by Robert Bisewski at Ibis Cybernetics. For more information, contact:

About

LED device reporting and setting tool for Linux, written in golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published