2020-01-19 21:49:17 +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.
2020-01-19 22:01:41 +02:00
This is useful if you are running a standalone screen locking setup like swayidle/swaylock. Check out [my configuration files ](https://git.reekynet.com/ReekyMarko/dotfiles/src/branch/master/home/Scripts/swayidle.sh ) for an example use case.
2020-01-19 21:49:17 +02:00
## Usage
2020-01-19 23:46:00 +02:00
```nosyntax
2020-01-19 21:49:17 +02:00
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
```
2020-01-19 22:05:56 +02:00
The configuration file resides at `~/.config/lqsd/config.toml` . There you can set these values:
2020-01-19 21:49:17 +02:00
2020-01-19 22:05:56 +02:00
| Key | Explanation | Default |
| ---------------- | -------------------------------------------------------------------------------------------- | :-----------------: |
2020-01-20 02:02:32 +02:00
| resume_file | The location where the previous brightness is saved | /tmp/lqsd-resume |
2020-01-19 22:05:56 +02:00
| 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 |
2020-01-20 02:02:32 +02:00
| resume_speed | Same as dim_speed, but for the resume operation `-r` | 25 |
2020-01-19 21:49:17 +02:00
2020-01-19 23:43:52 +02:00
## Installation
So far, I have only packaged this for [Arch Linux ](https://aur.archlinux.org/packages/lqsd )
To install it, use your favorite AUR helper, yay for example:
2020-01-19 23:46:00 +02:00
```nosyntax
2020-01-19 23:43:52 +02:00
yay -S lqsd
```
Or if you don't want to build it from source, a binary version is also available:
2020-01-19 23:46:00 +02:00
```nosyntax
2020-01-19 23:43:52 +02:00
yay -S lqsd-bin
```
2020-01-20 00:12:26 +02:00
Prebuilt binaries, their checksums and signatures live in [GitLab ](https://gitlab.com/ReekyMarko/lqsd/releases )
2020-01-19 22:01:41 +02:00
## Why Rust?
I wanted start a small project to learn Rust. Before lqsd, I was using [this script ](https://github.com/Bonnee/dotfiles/blob/wayland/scripts/bin/dim.sh ) and figured, why not rewrite it in Rust.
2020-01-19 23:24:41 +02:00
# Mirrors
2020-01-19 23:47:19 +02:00
This repository lives at [ReekyNET Git ](https://git.reekynet.com/ReekyMarko/lqsd ), but it is also mirrored to [GitLab ](https://gitlab.com/ReekyMarko/lqsd ) and [GitHub ](https://github.com/ReekyMarko/lqsd )