Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/troglobit/awesome-light
Lua library for controlling screen and keyboard brightness from Awesome WM
https://github.com/troglobit/awesome-light
List: awesome-light
Last synced: about 2 months ago
JSON representation
Lua library for controlling screen and keyboard brightness from Awesome WM
- Host: GitHub
- URL: https://github.com/troglobit/awesome-light
- Owner: troglobit
- License: isc
- Created: 2018-08-05T13:33:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-05T13:38:35.000Z (over 6 years ago)
- Last Synced: 2024-10-29T15:44:19.265Z (3 months ago)
- Language: Lua
- Size: 1000 Bytes
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-awesomewm-modules-widgets-and-libraries - awesome-light
- awesome-awesomewm-modules-widgets-and-libraries - awesome-light
README
Brightness Control for Awesome WM
=================================This is a tiny Lua library to interface the [Awesome window manager][] with
[light][], a program that can control the backlight of your laptop screen
and keyboard.Install
-------First, you need to install [list][].
Second, in your awesome configuration directory:
```sh
cd ~/.config/awesome/
git clone git://github.com/troglobit/awesome-light.git light
```In your `rc.lua`:
```lua
local light = require("light")
light.exec = "light" -- optional, set to abs path
light.kbd = "" -- optional, default: thinkpad ctrl
light.kbd_step = 1 -- optional, default: 1
light.dpy_cap = 2 -- optional, default: 2
light.dpy_step = 10 -- optional, default: 10light.init() -- sets diplay min cap
```Usage
-----Done! Now you have these functions at your disposal:
* `light.dpy_inc()`
* `light.dpy_dec()`
* `light.kbd_toggle()`They're pretty self-explanatory ... but here's an example for your
`rc.lua`:```lua
-- Brightness
globalkeys = gears.table.join(globalkeys,
awful.key({}, "XF86MonBrightnessUp", function () light.dpy_inc() end),
awful.key({}, "XF86MonBrightnessDown", function () light.dpy_dec() end)
)
root.keys(globalkeys)
```[Awesome window manager]: http://awesome.naquadah.org
[light]: http://jonls.dk/light/