Skip to main content

Hyprland shade configuration tool

Project description

Hyprshade

Front-end to Hyprland's screen shader feature

Screenshots

Unfiltered

Unfiltered

Vibrance

Vibrance

Blue Light Filter

Blue Light Filter

Description

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 replacement[^1] 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.

[^1]: Gradual color shifting currently unsupported.

Installation

Arch Linux

Use your favorite AUR helper (e.g. paru):

paru -S hyprshade

Or manually:

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/hyprshade.git
cd hyprshade
makepkg -si

PyPI

If your distribution isn't officially supported, you can also install directly from PyPI with pip:

pip install --user hyprshade

Or with pipx:

pipx install hyprshade

Usage

Usage: 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.glsl

If you provide the basename, Hyprshade searches in ~/.config/hypr/shaders and /usr/share/hyprshade.

Scheduling

[!WARNING] For scheduling to work, systemd --user must have access to the environment variable HYPRLAND_INSTANCE_SIGNATURE.

Add the following line to hyprland.conf[^2]:

exec-once = dbus-update-activation-environment --systemd HYPRLAND_INSTANCE_SIGNATURE

[^2]: See also: Hyprland FAQ (cache)

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  # shader to use during times when there is no other shader scheduled

[[shades]]
name = "blue-light-filter"
start_time = 19:00:00
end_time = 06:00:00   # optional if you have more than one shade with start_time

For starters, you can copy the example config:

cp /usr/share/hyprshade/examples/config.toml ~/.config/hypr/hyprshade.toml

After writing your config, install the systemd timer/service user units and enable the timer unit:

hyprshade install
systemctl --user enable --now hyprshade.timer

[!TIP] Run hyprshade install every time you make changes to hyprshade.toml to keep the user units in sync.

Tips

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyprshade-4.0.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyprshade-4.0.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file hyprshade-4.0.1.tar.gz.

File metadata

  • Download URL: hyprshade-4.0.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hyprshade-4.0.1.tar.gz
Algorithm Hash digest
SHA256 86d93d3066ae4dc66800620f7b982445c96738f15129ecb841929c93ef224670
MD5 abb5e356c885d25fc6aa5bee232a5a2a
BLAKE2b-256 6dd493e86091f0d8753df50e97fb0ce28c13d5b98104066f2644de8bed7e5bd4

See more details on using hashes here.

File details

Details for the file hyprshade-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: hyprshade-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hyprshade-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65338f0a7e4acb43fc785f8f33cca805e3165102aa8d25ad97c2fc30e231aae3
MD5 148dd9346da2bc5699d21da7bc139fb0
BLAKE2b-256 c34cf828b60d5349a3cb69f9aabf0583a8ec427b7bf0cf32fa54b30c0b6320bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page