LiQuid Screen Dim - Dim your screen smoothly
Find a file
2020-01-21 21:43:18 +02:00
src Use default value if key is missing 2020-01-21 21:43:18 +02:00
.gitignore Initial commit 2020-01-19 21:33:52 +02:00
Cargo.lock Initial commit 2020-01-19 21:33:52 +02:00
Cargo.toml Sort dependencies 2020-01-19 22:34:51 +02:00
LICENSE Fix typo in license file name 2020-01-20 19:45:43 +02:00
README.md Add information about dependencies and building 2020-01-20 19:51:35 +02:00

LiQuid Screen Dim

A simple utility which dims your screen. It saves the previous brightness too, so you can restore to the point before dimming.

This is useful if you are running a standalone screen locking setup like swayidle/swaylock. Check out my configuration files for an example use case.

Usage

USAGE:
    lqsd [FLAGS] [OPTIONS]

FLAGS:
    -d, --dim        Dims the screen to idle level set in configuration
    -h, --help       Prints help information
    -r, --resume     Sets the backlight to the value it was before dimming
    -V, --version    Prints version information

OPTIONS:
    -c, --config <config>    Sets a custom config file

The configuration file resides at ~/.config/lqsd/config.toml. There you can set these values:

Key Explanation Default
resume_file The location where the previous brightness is saved /tmp/lqsd-resume
idle_level The minimum brightness that will be dimmed to. Can be a value between 0-100 0
dim_speed This sets the "sleep time" between each backlight command. It's in milliseconds 50
resume_speed Same as dim_speed, but for the resume operation -r 25

Installation

Dependencies

The only external dependency is light

Building

Clone this repository and run cargo build --release inside the project to compile a static binary.

Prebuilt binaries, their checksums and signatures live in GitLab

Arch Linux

So far, I have only packaged this for Arch Linux. Packages are in AUR

To install it, use your favorite AUR helper, yay for example:

yay -S lqsd

Or if you don't want to build it from source, a binary version is also available:

yay -S lqsd-bin

Why Rust?

I wanted start a small project to learn Rust. Before lqsd, I was using this script and figured, why not rewrite it in Rust.

Mirrors

This repository lives at ReekyNET Git, but it is also mirrored to GitLab and GitHub