https://github.com/nickgeek/oled-shmoled
OLED displays don't have backlights but it'd be nice if we could pretend they do on Linux!
https://github.com/nickgeek/oled-shmoled
Last synced: 12 months ago
JSON representation
OLED displays don't have backlights but it'd be nice if we could pretend they do on Linux!
- Host: GitHub
- URL: https://github.com/nickgeek/oled-shmoled
- Owner: NickGeek
- License: gpl-3.0
- Created: 2020-12-11T08:30:45.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-14T04:36:29.000Z (over 4 years ago)
- Last Synced: 2025-07-04T00:05:35.388Z (12 months ago)
- Language: Rust
- Size: 48.8 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OLED Shmoled
OLED displays don't have backlights but it'd be nice if we could pretend they do on Linux!
This program aims to be very light weight and configurable. The easiest way to use it would be to make it run on startup.
The only external dependency is `xrandr`.
## Install
You can get an x86_64 Linux (ELF) binary from the [releases page](https://github.com/NickGeek/oled-shmoled/releases).
Alternatively, the program is [available on the AUR](https://aur.archlinux.org/packages/oled_shmoled/)
and on [crates.io](https://crates.io/crates/oled_shmoled) via `cargo install oled_shmoled`.
## Usage
```
$ oled_shmoled --help
OLED shmoled 0.1.0
Nick Webster
USAGE:
oled_shmoled [OPTIONS]
ARGS:
The xrandr identifier for the display
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--base-path
The base path for the backlight files [default: /sys/class/backlight/intel_backlight]
--current-brightness-file
The name of the file containing the current backlight state [default: brightness]
--max-brightness-file
The name of the file identifying the maximum brightness of the system [default:
max_brightness]
```
```
$ xrandr
Screen 0: minimum 8 x 8, current 4608 x 4752, maximum 32767 x 32767
eDP1 connected primary 3840x2160+266+2592 (normal left inverted right x axis y axis) 340mm x 190mm
# ...etc...
```
```
$ oled_shmoled eDP1
Watching /sys/class/backlight/intel_backlight for backlight changes…
```
The easiest way to use OLED Shmoled is to run that last command at start-up. This can be done by running it in an
`.xinitrc` or a systemd job.
On window managers like i3 you can add the following to your i3 configs to get the brightness keys working:
```
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 5
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 5
```
## Build instructions
```
$ git clone https://github.com/NickGeek/oled-shmoled oled_shmoled
$ cd oled_shmoled
$ cargo build --release
```