more and fixes
This commit is contained in:
23
modules/home/wayland/apps/eww/bar/scripts/read-mode
Normal file
23
modules/home/wayland/apps/eww/bar/scripts/read-mode
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user