Omahub
← All plugins
A

Toggle Grayscale

by Archisman Panigrahi

Toggle a systemwide grayscale screen filter (Hyprland screen shader) to reduce eye strain. CLI: omarchy-shell grayscale toggle

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
40dd707
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

Low
AI risk level
Low
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
40dd707
Reviewed
1 month ago

This plugin toggles a Hyprland screen shader for grayscale filtering. It only runs fixed hyprctl commands with paths derived from its own directory, reads hyprctl output for state, and exposes a simple IPC interface. No malicious behavior, network access, or credential handling was found.

  • Executes bash -lc with a constructed hyprctl eval command, but the command is static and only includes the plugin's own shader path, so injection risk is minimal.
  • Modifies system display settings (screen shader), which is the intended functionality and reversible via the plugin's disable action.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/archisman-panigrahi/Grayscale-omarchy-plugin --enable
Appearance #bar

Toggle Grayscale Omarchy Plugin

An Omarchy shell plugin that toggles a systemwide grayscale filter — every monitor, every window, instantly — from the bar or the command line. Implemented as a Hyprland screen shader, so there is nothing to install beyond the plugin itself.

preview

Install

omarchy plugin add https://github.com/archisman-panigrahi/Grayscale-omarchy-plugin.git --enable

This clones the plugin into ~/.config/omarchy/plugins/ and puts its toggle button in the bar's right section. No restart needed.

Remove

# Turn the filter off first so Hyprland is not left pointing at a deleted shader
omarchy-shell grayscale disable
omarchy plugin remove archisman-panigrahi.grayscale

Usage

  • Click the plugin's icon in the bar to toggle the filter on/off. The icon's tooltip shows the current state.
  • Or use the CLI:
omarchy-shell grayscale toggle    # flip between on and off
omarchy-shell grayscale enable
omarchy-shell grayscale disable
omarchy-shell grayscale status    # {"enabled": true|false}

Optional keyboard shortcut

If you want one, add this to ~/.config/hypr/bindings.lua (it survives restarts there):

o.bind("CTRL + ALT + C", "Toggle Grayscale", "omarchy-shell grayscale toggle")

How it works

Hyprland can composite the whole screen through a user-supplied GLSL fragment shader (decoration:screen_shader). The plugin ships two shaders and flips the option between them:

File Effect
shaders/grayscale.glsl Converts each pixel to luminance using ITU-R BT.709 coefficients
shaders/passthrough.glsl Identity shader — renders colors unchanged ("off")

A few deliberate design choices:

  • Two real shaders instead of none. Clearing screen_shader and setting a path again can silently do nothing, so the "off" state is a passthrough shader rather than an empty option. Toggling between two real files always takes effect.
  • Set through the Lua API. Recent Hyprland versions parse this option with the Lua config system, so the plugin applies it with hyprctl eval 'hl.config({decoration = {screen_shader = …}})'.
  • State lives in Hyprland, not in a config file. On startup the service reads hyprctl getoption decoration:screen_shader, so the bar button always reflects the actual filter state — even after a reboot, and even if you changed the shader outside the plugin.

External dependencies

Dependency Purpose Notes
Hyprland ≥ 0.56 Runs the screen shader, exposes the Lua config API Ships with Omarchy
hyprctl, bash Apply/probe the shader option Part of Hyprland / any Linux base

Everything else (Quickshell service, IPC, bar widget) ships inside Omarchy itself — the plugin has no packages to install.

Layout

Service.qml        non-visual: state probe, apply process, IPC handler
Button.qml         bar widget: icon button bound to the service
GrayscaleModel.js  pure: parses hyprctl getoption output into on/off
shaders/           grayscale.glsl + passthrough.glsl

License

GPL-3.0 — see LICENSE.