hyprdim
hyprdim is a daemon that automatically dims windows in Hyprland when switching between them.
Features
- Easily see which window has focus, even with subtle or no borders.
- Windows only dim when switching windows, eliminating the need to toggle dim on/off when you want to see other windows.
- Prevent windows from being dimmed if there are no other visible windows in a workspace.
- Prevent windows from being dimmed when toggling special workspaces.
- Dim background windows when dialog windows open.
Installation
NixOS (Recommended)
Add hyprdim
to your systemPackages
and rebuild.
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
hyprdim
];
}
Alternatively, use nix run nixpkgs#hyprdim
to start hyprdim without installing it.
Arch Linux
I don't use Arch Linux anymore, but I wrote a PKGBUILD for the pacman
enjoyers out there. Feel free to add it to the AUR.
git clone https://github.com/donovanglover/hyprdim && cd hyprdim && makepkg -si
Other distributions
Follow the install guide for Rust. Then, use cargo to install hyprdim.
cargo install --git https://github.com/donovanglover/hyprdim --tag 2.2.1
Make sure $HOME/.cargo/bin
is in your $PATH
if it isn't already.
Usage
Usage: hyprdim [OPTIONS]
Options:
-s, --strength <STRENGTH> A value from 0 (no dim) to 1 (maximum dim) [default: 0.4]
-d, --duration <DURATION> How many milliseconds to wait before removing dim [default: 800]
-f, --fade <FADE> Fade animation speed from 0 (instantaneous) to 255 (very slow) [default: 7]
-b, --bezier <BEZIER> Bezier curve used for the animation [default: default]
-p, --persist Prevent dim_inactive from being disabled by `hyprctl reload` etc
-n, --no-dim-when-only Don't dim when switching to a workspace that only has one visible window
-i, --ignore-entering-special Don't dim when opening a special workspace
-I, --ignore-leaving-special Don't dim when closing a special workspace
-D, --dialog-dim [<STRENGTH>] Dim windows if they're the same class and floating (strength_default: 0.7)
-v, --verbose Show information about what hyprdim is doing
-h, --help Print help (see more with '--help')
-V, --version Print version
Contributing
As far as I'm aware, this software is bug free. That said, if you know how to do things better, feel free to open an issue or make a pull request.
Todo
- Turn
dim_inactive
on if it isn't already - Restore the original state of variables when stopping the daemon
- Add support for command line arguments
- Add man pages
- Add shell completions
- Replace all unsafe code with Arc, Mutex, etc.
- Add example image/video to README
- Add to awesome-hyprland
- Add to nixpkgs
Thanks
- Yavor Kolev, Cyril Levis, and contributors for hyprland-rs
- Kevin K., Ed Page, and contributors for clap-rs
- Antti Keränen and contributors for rust-ctrlc
- Liu BoFan and contributors for single-instance