https://github.com/aesophor/displayctl
💡 Resolution, brightness, wallpaper, lockscreen manager
https://github.com/aesophor/displayctl
brightness display-resolution i3lock lockscreen resolution wallpaper xrandr
Last synced: 30 days ago
JSON representation
💡 Resolution, brightness, wallpaper, lockscreen manager
- Host: GitHub
- URL: https://github.com/aesophor/displayctl
- Owner: aesophor
- License: mit
- Created: 2017-12-20T12:56:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-08T02:02:19.000Z (about 6 years ago)
- Last Synced: 2025-04-06T16:50:38.074Z (about 1 year ago)
- Topics: brightness, display-resolution, i3lock, lockscreen, resolution, wallpaper, xrandr
- Language: Shell
- Homepage: https://www.reddit.com/r/unixporn/comments/7l6o3a/i3lock_displayctl_a_utility_to_handle_various/
- Size: 9.72 MB
- Stars: 61
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DISPLAYCTL
`Wallpapers (Desktop/Lockscreen) with Effects (Normal/Dim/Blur)`
`Resolution` `Brightness` `Lockscreen`
## Why Do I Need This?
Are you running a Window Manager without a DE? Ever experienced the inconvenience of running `xrandr` to set resolution, `feh` for wallpaper, `light` for brightness, and `i3lock` for lockscreen? (I use these tools, in my case)
I wrote displayctl to eradicate these problems. Now you can handle these tasks with a single script!
## Dependencies
* imagemagick
* ffmpeg
* xrandr
* [light](https://github.com/haikarainen/light)
* [i3lock-color](https://github.com/PandorasFox/i3lock-color)
## Installation
Currently it only supports manual installation, sorry! Supports for several common distributions will be added later!
* Manual Installation
```
$ git clone https://github.com/aesophor/displayctl.git
$ cd displayctl && cp displayctl ~/.local/bin/displayctl
```
## Configuration
Add this line to your `~/.Xresources`
```
! displayctl
#include "/home/aesophor/.x/displayctlrc"
```
Then create the configuration file in `~/.x/displayctlrc`
```
! displayctlrc
! ===================================================================================
Display.monitor: eDP1
Display.dpi: 112
Display.resolution: 1680x1050
Display.brightness: 30
Display.wallpaper: /home/aesophor/Pictures/Wallpapers/Nature/Rainy.jpeg
Display.lockscreen: /home/aesophor/Pictures/Wallpapers/Landscape/Pebble.jpeg
```
Each time after modifying displayctlrc, run
```
xrdb -merge ~/.Xresources
```
## Usage
Lockscreen cache can be located at `/tmp/lock_cache.png`. It will be stored there for faster lockscreen invocation.
To use the lockscreen with another effect, run `displayctl -c` to clear the cache first.
```
$ displayctl # Restore resolution, brightness, and wallpaper to last session
$ displayctl -d # Restore resolution and brightness to last session
$ displayctl -l # Invoke lockscreen (i3lock-color required)
$ displayctl -l -d -b # Invoke lockscreen with dim + blur effect
$ displayctl -w -d -b # Set wallpaper with dim + blur effect
$ displayctl -e 1280x800 # Mirrors display to an external monitor
$ displayctl -c # Clears lockscreen cache
```
## Gallery
The effects demonstrated below can be applied to Desktop Wallpapers as well.
* Lockscreen (Normal)

* Lockscreen (Dim)

* Lockscreen (Blur)

* Lockscreen (Dim + Blur)

## License
Available under the [MIT License](https://github.com/aesophor/dotfiles/blob/master/LICENSE).