Front-end to Hyprland's screen shader feature
NOTE: Hyprshade is not an official Hyprland tool
Hyprshade takes full advantage of Hyprland's decoration:screen_shader feature
by automating the process of switching screen shaders, either from a user-defined
schedule or on the fly. It can be used as a replacement1 for apps that adjust
the screen's color temperature such as f.lux,
redshift, or gammastep
with blue-light-filter, which is installed by default.
Use your favorite AUR helper (e.g. paru):
paru -S hyprshadeOr manually:
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/hyprshade.git
cd hyprshade
makepkg -siIf your distribution isn't officially supported, you can also install directly from PyPI with pipx2:
pipx install hyprshadeUsage: hyprshade [OPTIONS] COMMAND [ARGS]...
Commands:
auto Set screen shader on schedule
current Print current screen shader
install Install systemd user units
ls List available screen shaders
off Turn off screen shader
on Turn on screen shader
toggle Toggle screen shader
Commands which take a shader name accept either the basename:
hyprshade on blue-light-filter...or a full path name:
hyprshade on ~/.config/hypr/shaders/blue-light-filter.glslIf you provide the basename, Hyprshade searches in ~/.config/hypr/shaders and /usr/share/hyprshade.
Warning
For scheduling to work, systemd --user must have access to the environment variable
HYPRLAND_INSTANCE_SIGNATURE.
Add the following line to hyprland.conf3:
exec-once = dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE
To have specific shaders enabled during certain periods of the day, you can
create a config file in either ~/.config/hypr/hyprshade.toml or ~/.config/hyprshade/config.toml.
[[shades]]
name = "vibrance"
default = true # will be activated when no other shader is scheduled
[[shades]]
name = "blue-light-filter"
start_time = 19:00:00
end_time = 06:00:00 # optional if more than one shader has start_timeFor starters, you can copy the example config:
cp /usr/share/hyprshade/examples/config.toml ~/.config/hypr/hyprshade.tomlAfter writing your config, install the systemd timer/service user units and enable the timer unit:
hyprshade install
systemctl --user enable --now hyprshade.timerTip
Run hyprshade install every time you make changes to hyprshade.toml to keep the user units in sync.
You probably want the following line in your hyprland.conf:
exec = hyprshade auto
This ensures that the correct shader is enabled when you log in.
hyprctl seterror disable. (Contrary to what the command may seem to imply,
this does not disable any further error messages.) You may also use
hyprctl reload.
I tried to copy something from the examples/ or shaders/ directory, but it's not working. What gives?
TL;DR: Hyprshade should work properly without needing to manually copy files.
If activating a shader with hyprshade on does not work out of the box, feel
free to open a bug report.
If you try to copy things from the main branch while you are using a stable
release, it may not work properly. This repository has a single-branch
development scheme, where all development is done on the main branch and
stable versions are pinned with
tags. The only exception to this is
that updates to the README pertaining to unreleased features are kept on
separate branches to avoid advertising features not present in any stable
version.
If you'd like to try out unreleased features, you can use a development version
of Hyprshade — currently, the only officially supported way to do this is to use
the hyprshade-git AUR
package.
Footnotes
-
Gradual color shifting currently unsupported. ↩
-
Installing with
pipoutside of a venv is unsupported. ↩ -
See also: Hyprland FAQ (cache) ↩


