libthinkpad
2.6
https://github.com/libthinkpad
|
libthinkpad is a userspace general purpose library to change hardware configuration and
manage hardware events in the userspace for Lenovo/IBM ThinkPad laptops.
The library unifies ACPI dispatchers, hardware information systems and hardware configuration
interfaces into a single userspace library.
This library enables userspace applications to configure the ThinkPad-specific hardware and fetch
information about it. Examples include the docking events, the dock state and other things.
To build the library you will need a few components first:
libsystemd: needed to provide suspend support via logind
libudev: needed to monitor the system interface filesystem
acpid: needed to provide the ACPI events to libthinkpad
Note about systemd: The library is not heavily dependent on systemd.
systemd is only needed for power management state changes, and it can be
disable via the SYSTEMD CMake flag.
However, disabling systemd support also cripples the power management system of the library.
In the future, we will support ALL init systems.
Building the library:
1) Download the latest source
2) Create a new folder called build inside the source root (optional)
3) Run cmake . -DCMAKE_INSTALL_PREFIX=/usr
or cmake .. -DCMAKE_INSTALL_PREFIX=/usr
depending on where you are
4) Run make
5) Run make install
Now to use the library, use -lthinkpad
.
To build the examples, use g++ example.cpp -lthinkpad -std=c++11
To start with the library, you can start exploring the ThinkPad namespace.
Also, you can find examples inside the examples
directory in the main source tree.
This library is early in development, bugs may occur.
Licensed under the BSD 2-Clause license.