Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gutjuri/blight
Display brightness utility
https://github.com/gutjuri/blight
Last synced: 5 days ago
JSON representation
Display brightness utility
- Host: GitHub
- URL: https://github.com/gutjuri/blight
- Owner: gutjuri
- License: bsd-3-clause
- Created: 2019-12-20T18:47:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-13T10:30:00.000Z (13 days ago)
- Last Synced: 2025-01-13T11:38:31.338Z (13 days ago)
- Language: Haskell
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# blight
Command line utility for changing the display brightness under linux.
## Installation
### Downloading the binary
You can download the latest binary file [here](https://github.com/juril33t/blight/releases/download/0.1.0.0/blight-0.1.0.0.zip).
Unzip it in a directory of your choice (ideally in your PATH, e.g. in /home/yourname/.local/bin).If you don't want to give root permissions to blight everytime you run it, execute `sudo ./give_permissions.sh /path/to/blight`.
This gives blight permissions to edit the linux `brightness` file.### Building from source
You'll need to have Stack installed.
```bash
$ git clone https://github.com/juril33t/blight.git
$ cd blight
$ stack install
$ sudo ./give_permissions $(which blight) # (*)```
Step (*) is optional. It gives permissions to blight for setting the display brightness.
If you skip this step, you'll have to execute blight as root.## Usage
```
Usage: blight COMMAND [-r|--relative] [-m|--max-brightness-file FILE]
[-f|--brightness-file FILE]
Manipulate display brightnessAvailable options:
-r,--relative Using relative display brighness (as oppossed to the
internal representation)
-m,--max-brightness-file FILE
The file containing the maximum brightness (default:
/sys/class/backlight/intel_backlight/max_brightness)
-f,--brightness-file FILE
The file containing the current brightness (default:
/sys/class/backlight/intel_backlight/brightness)
-h,--help Show this help textAvailable commands:
show Show current display brightness
max Show maximum display brightness
set Set display brightness
inc Increase display brightness
dec Decrease display brightness```
## Examples
### Set display brightness to 100%
```bash
$ blight set 100 -r
```### Set display brightness to 50%
```bash
$ blight set 50 -r
```### Decrease display brightness by 5%
```bash
$ blight dec 5 -r
```### Increase display brightness by 300 (of internal units)
```bash
$ blight inc 300
```### Show current display brightness
```bash
$ blight show # using internal units
$ blight show -r # or using percents
```### Show maximum display brightness
```bash
$ blight max
```