LiQuid Screen Dim - Dim your screen smoothly
Go to file
Marko Korhonen 4bbffbbdd8
Update all dependencies
Lots of breaking changes in clap
2023-03-02 00:16:01 +02:00
src Update all dependencies 2023-03-02 00:16:01 +02:00
.gitignore Added release build script 2020-01-22 00:30:39 +02:00
build-release.sh Conver build-release to POSIX sh and fix issues reported by shellcheck 2023-03-01 22:21:15 +02:00
Cargo.lock Update all dependencies 2023-03-02 00:16:01 +02:00
Cargo.toml Update all dependencies 2023-03-02 00:16:01 +02:00
LICENSE Fix typo in license file name 2020-01-20 19:45:43 +02:00
manpage.adoc Add manpage 2022-06-12 11:48:51 +03:00
README.adoc Update dotfile link 2022-06-12 12:26:12 +03: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
    -r, --resume         Sets the backlight to the value it was before dimming
        --copy-config    Copies the default config file to $XDG_CONFIG_HOME/lqsd
    -h, --help           Prints help information
    -V, --version        Prints version information

OPTIONS:
    --config <FILE>      Sets a custom config file

The configuration file resides at ~/.config/lqsd/config.toml. To copy the default configuration file in place, you can use --copy-config.

In the configuration file you can set the following 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. Its 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.

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

Select if you want to [1] build from source [2] install a precompiled binary:

:: There are 2 providers available for lqsd:
:: Repository AUR
    1) lqsd 2) lqsd-bin

Enter a number (default=1):

Releases

Release notes and binaries can be found either in My Git server or GitHub.

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 My Git server, but it is also mirrored to GitHub and GitLab