Files
nixconfig/modules/home/wayland/apps/eww/bar/scripts/read-mode
2026-06-17 20:04:08 +02:00

24 lines
591 B
Bash

#!/usr/bin/env bash
SHADER="$HOME/.config/eww/shaders/read-mode.glsl"
is_active() {
hyprctl getoption decoration:screen_shader | grep -qF "$SHADER"
}
case "$1" in
status)
is_active && echo true || echo false
;;
*)
if is_active; then
hyprctl eval 'hl.config({ decoration = { screen_shader = "" } })'
hyprctl eval 'hl.config({ render = { use_fp16 = 2 } })'
echo false
else
hyprctl eval 'hl.config({ render = { use_fp16 = 0 } })'
hyprctl eval "hl.config({ decoration = { screen_shader = \"$SHADER\" } })"
echo true
fi
;;
esac