Skip to content

feat/screen filter: Add native screen-filter script with shaders, Rofi menu selector, and boot persistence - #1819

Open
anshifmonz wants to merge 4 commits into
mylinuxforwork:mainfrom
anshifmonz:feat/screen-filter
Open

feat/screen filter: Add native screen-filter script with shaders, Rofi menu selector, and boot persistence#1819
anshifmonz wants to merge 4 commits into
mylinuxforwork:mainfrom
anshifmonz:feat/screen-filter

Conversation

@anshifmonz

@anshifmonz anshifmonz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Hey @mylinuxforwork! 👋

I put together a standalone screen filter utility for Hyprland and thought it would make a great addition to the dotfiles.

It allows users to toggle and cycle through GLSL screen shaders (such as Nightlight, Grayscale, Sepia, Invert Colors, and Blue-light filters) directly using keyboard shortcuts, an interactive Rofi menu, or CLI subcommands.


Key Highlights

  • Zero external dependencies: Uses native hyprctl shader calls under the hood (hl.config / keyword) — no need to install or configure hyprshade.
  • State persistence across reboots: Remembers your active shader in cache and silently restores it on boot/login via autostart.lua.
  • Auto-detects custom shaders: Automatically scans ~/.config/hypr/shaders/. If users drop any custom .frag or .glsl files in there, they will show up in the cycle and Rofi menu immediately.
  • Compact Rofi picker: Uses ML4W's config-compact.rasi theme, pre-highlighting the active shader and allowing 1-click selection or disabling.
  • Synchronous notifications: Gives clean desktop notifications with the active shader name.

What's Included

  1. dotfiles/.config/hypr/scripts/screen-filter.sh - Main executable script (cycle, --menu, restore, off, set <name>, status, list).
  2. dotfiles/.config/hypr/shaders/ - Preset shader files (greyscale.frag, nightlight.frag, sepia.frag, invert-colors.glsl, and 25/50/75% blue-light GLSL filters).
  3. dotfiles/.config/hypr/conf/keybindings/default.lua - Added default shortcuts.
  4. dotfiles/.config/hypr/conf/autostart.lua - Added silent restore hook on Hyprland startup.

Default Shortcuts

Keybinding Action
SUPER + SHIFT + N Cycle through available screen filters
SUPER + CTRL + N Open the interactive Rofi filter menu
SUPER + ALT + N Turn off / disable active screen filter

Testing & Verification

Tested on the latest Hyprland build with ML4W config:

  • Verified rotation cycle (NoneGrayscaleNightlightSepiaInvert25/50/75% blue-lightDisabled).
  • Tested interactive Rofi menu selection and cancellation (Esc).
  • Verified silent state persistence across reboots/reloads (screen-filter.sh restore).
  • Verified keybindings appear properly in the keybinding search cheat sheet (SUPER + CTRL + K).
  • Tested safe fallbacks if shaders are missing or if run outside Hyprland.

Demo

screen-filter-demo

@eljejer

eljejer commented Sep 2, 2026

Copy link
Copy Markdown

Great addition indeed!

@mylinuxforwork

Copy link
Copy Markdown
Owner

This is absolutely great. Thank you so much.
Will be on vacation the next two weeks. Will test when I am back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants