Add a way to toggle the grayscale shader

This commit is contained in:
2024-12-04 22:45:59 +01:00
parent 782260833e
commit 2f6291556f
3 changed files with 17 additions and 2 deletions

View File

@@ -69,8 +69,6 @@ general {
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
screen_shader = /home/daniele/.config/hypr/shaders/grayscale.frag
rounding = 5
blur {
@@ -133,9 +131,13 @@ misc {
force_default_wallpaper = 0
disable_hyprland_logo = 1
}
# Include windows rules
source = ~/.config/hypr/windows_rules.conf
# Include shaders config
source = ~/.config/hypr/shaders/shader.conf
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

View File

@@ -0,0 +1,3 @@
#decoration {
# screen_shader = /home/daniele/.config/hypr/shaders/grayscale.frag
#}

View File

@@ -0,0 +1,10 @@
# Check if the file exists
if [ ! -f "$HOME/.config/hypr/shaders/shader_is_active" ]; then
# Activate shader
sed -Ei 's/^#([[:blank:]]*)/\1/' $HOME/.config/hypr/shaders/shader.conf
touch $HOME/.config/hypr/shaders/shader_is_active
else
# Deactivate shader
sed -i 's/^[[:blank:]]*/#&/' $HOME/.config/hypr/shaders/shader.conf
rm $HOME/.config/hypr/shaders/shader_is_active
fi