feat: crt/vignette/chromatic-aberration/pixelate shader + dynamischer F10-cycle
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
SHADER_DIR="$HOME/.config/hypr/shaders"
|
||||
|
||||
mapfile -t SHADERS < <(find "$SHADER_DIR" -name "*.glsl" | sort)
|
||||
|
||||
if [[ ${#SHADERS[@]} -eq 0 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CURRENT=$(hyprctl getoption decoration:screen_shader | grep "str:" | awk '{print $2}' | tr -d '"')
|
||||
|
||||
INDEX=-1
|
||||
for i in "${!SHADERS[@]}"; do
|
||||
if [[ "${SHADERS[$i]}" == "$CURRENT" ]]; then
|
||||
INDEX=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
NEXT=$(( (INDEX + 1) % ${#SHADERS[@]} ))
|
||||
hyprshade on "${SHADERS[$NEXT]}"
|
||||
Reference in New Issue
Block a user