This commit is contained in:
2026-06-15 00:24:26 +03:00
commit 3fab9257e0
45 changed files with 2729 additions and 0 deletions

21
config/hypr/scripts/opacity.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Usage: opacity.sh [increase|decrease]
STEP=0.1
ADDRESS=$(hyprctl activewindow -j | grep -oP '"address": "\K[^"]+')
CURRENT=$(hyprctl getprop active opacity | grep -oP '[\d.]+' | head -1)
if [[ -z "$CURRENT" ]]; then
CURRENT=1.0
fi
if [[ "$1" == "increase" ]]; then
NEW=$(echo "$CURRENT + $STEP" | bc)
else
NEW=$(echo "$CURRENT - $STEP" | bc)
fi
# Clamp between 0.1 and 1.0
NEW=$(echo "if ($NEW > 1.0) 1.0 else if ($NEW < 0.1) 0.1 else $NEW" | bc)
hyprctl dispatch setprop active opacity "$NEW"