aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/ChangeBlur.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-08-15 12:05:10 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:41:34 -0700
commit845e801b873bf995cd7750edee136f9ce3c660e5 (patch)
tree2e2cf4c0ca7e499fd10f9ab4561d44a1e35a5b34 /config/hypr/scripts/ChangeBlur.sh
parent464c2487d326f0b463343d8e485ac3e3129bab81 (diff)
Fixed(really) ToggleOpacity and ChangeBlur.sh
Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/UserConfigs/ENVariables.conf modified: config/hypr/scripts/ChangeBlur.sh modified: config/hypr/scripts/ToggleOpacity.sh
Diffstat (limited to 'config/hypr/scripts/ChangeBlur.sh')
-rwxr-xr-xconfig/hypr/scripts/ChangeBlur.sh36
1 files changed, 29 insertions, 7 deletions
diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh
index ca1be5ad..098969fc 100755
--- a/config/hypr/scripts/ChangeBlur.sh
+++ b/config/hypr/scripts/ChangeBlur.sh
@@ -9,14 +9,36 @@
notif="${XDG_CONFIG_HOME:-$HOME/.config}/swaync/images"
-STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int")
+config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
+hypr_dir="$config_home/hypr"
+lua_entry="$hypr_dir/hyprland.lua"
+legacy_lua_entry="$config_home/hyprland.lua"
+
+if [[ -f "$lua_entry" || -f "$legacy_lua_entry" ]]; then
+ hypr_config_mode="lua"
+else
+ hypr_config_mode="conf"
+fi
+
+STATE=$(hyprctl -j getoption decoration:blur:passes 2>/dev/null | jq -r ".int // empty")
+if [[ -z "$STATE" || "$STATE" == "null" ]]; then
+ STATE=$(hyprctl getoption decoration:blur:passes 2>/dev/null | awk 'NR==1{print $2}')
+fi
if [ "${STATE}" == "2" ]; then
- hyprctl keyword decoration:blur:size 2
- hyprctl keyword decoration:blur:passes 1
- notify-send -e -u low -i "$notif/note.png" " Less Blur"
+ if [[ "$hypr_config_mode" == "lua" ]]; then
+ hyprctl eval "hl.config({ decoration = { blur = { size = 2, passes = 1 } } })"
+ else
+ hyprctl keyword decoration:blur:size 2
+ hyprctl keyword decoration:blur:passes 1
+ fi
+ notify-send -e -u low -i "$notif/note.png" " Less Blur"
else
- hyprctl keyword decoration:blur:size 5
- hyprctl keyword decoration:blur:passes 2
- notify-send -e -u low -i "$notif/ja.png" " Normal Blur"
+ if [[ "$hypr_config_mode" == "lua" ]]; then
+ hyprctl eval "hl.config({ decoration = { blur = { size = 5, passes = 2 } } })"
+ else
+ hyprctl keyword decoration:blur:size 5
+ hyprctl keyword decoration:blur:passes 2
+ fi
+ notify-send -e -u low -i "$notif/ja.png" " Normal Blur"
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage