aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr')
-rw-r--r--config/hypr/UserConfigs/user_decorations.lua2
-rw-r--r--config/hypr/lua/decorations.lua2
-rwxr-xr-xconfig/hypr/scripts/ChangeBlur.sh75
3 files changed, 56 insertions, 23 deletions
diff --git a/config/hypr/UserConfigs/user_decorations.lua b/config/hypr/UserConfigs/user_decorations.lua
index b3b175d9..c7049975 100644
--- a/config/hypr/UserConfigs/user_decorations.lua
+++ b/config/hypr/UserConfigs/user_decorations.lua
@@ -41,7 +41,7 @@ hl.config({
size = 6,
passes = 3,
new_optimizations = true,
- xray = true,
+ xray = false,
ignore_opacity = true,
special = true,
popups = true,
diff --git a/config/hypr/lua/decorations.lua b/config/hypr/lua/decorations.lua
index d7132887..3937b226 100644
--- a/config/hypr/lua/decorations.lua
+++ b/config/hypr/lua/decorations.lua
@@ -42,7 +42,7 @@ hl.config({
size = 6,
passes = 3,
new_optimizations = true,
- xray = true,
+ xray = false,
ignore_opacity = true,
special = true,
popups = true,
diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh
index 098969fc..7d3fb42d 100755
--- a/config/hypr/scripts/ChangeBlur.sh
+++ b/config/hypr/scripts/ChangeBlur.sh
@@ -20,25 +20,58 @@ 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
+LOCK="/tmp/.hypr_change_blur_${HYPRLAND_INSTANCE_SIGNATURE:-default}.lock"
-if [ "${STATE}" == "2" ]; then
- 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
- 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
+(
+ flock -n 200 || exit 0
+
+ # Check if blur is currently enabled
+ BLUR_ENABLED=$(hyprctl -j getoption decoration:blur:enabled 2>/dev/null | jq -r ".bool // empty")
+ if [[ -z "$BLUR_ENABLED" || "$BLUR_ENABLED" == "null" ]]; then
+ BLUR_ENABLED=$(hyprctl getoption decoration:blur:enabled 2>/dev/null | awk 'NR==1{print $2}')
+ 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 blur was disabled or 0 passes, enable Normal Blur
+ if [[ "$BLUR_ENABLED" == "false" || "$BLUR_ENABLED" == "0" || "${STATE}" == "0" ]]; then
+ if [[ "$hypr_config_mode" == "lua" ]]; then
+ hyprctl -r eval "hl.config({ decoration = { blur = { enabled = true, size = 6, passes = 3, ignore_opacity = true, xray = false, new_optimizations = true } } })" >/dev/null 2>&1 || true
+ else
+ hyprctl keyword decoration:blur:enabled 1
+ hyprctl keyword decoration:blur:size 6
+ hyprctl keyword decoration:blur:passes 3
+ hyprctl keyword decoration:blur:ignore_opacity 1
+ hyprctl keyword decoration:blur:xray 0
+ hyprctl keyword decoration:blur:new_optimizations 1
+ fi
+ notify-send -e -u low -i "$notif/ja.png" " Normal Blur"
+ elif [ "${STATE:-2}" -ge 2 ]; then
+ if [[ "$hypr_config_mode" == "lua" ]]; then
+ hyprctl -r eval "hl.config({ decoration = { blur = { enabled = true, size = 2, passes = 1, ignore_opacity = true, xray = false, new_optimizations = true } } })" >/dev/null 2>&1 || true
+ else
+ hyprctl keyword decoration:blur:enabled 1
+ hyprctl keyword decoration:blur:size 2
+ hyprctl keyword decoration:blur:passes 1
+ hyprctl keyword decoration:blur:ignore_opacity 1
+ hyprctl keyword decoration:blur:xray 0
+ hyprctl keyword decoration:blur:new_optimizations 1
+ fi
+ notify-send -e -u low -i "$notif/note.png" " Less Blur"
+ else
+ if [[ "$hypr_config_mode" == "lua" ]]; then
+ hyprctl -r eval "hl.config({ decoration = { blur = { enabled = true, size = 6, passes = 3, ignore_opacity = true, xray = false, new_optimizations = true } } })" >/dev/null 2>&1 || true
+ else
+ hyprctl keyword decoration:blur:enabled 1
+ hyprctl keyword decoration:blur:size 6
+ hyprctl keyword decoration:blur:passes 3
+ hyprctl keyword decoration:blur:ignore_opacity 1
+ hyprctl keyword decoration:blur:xray 0
+ hyprctl keyword decoration:blur:new_optimizations 1
+ fi
+ notify-send -e -u low -i "$notif/ja.png" " Normal Blur"
+ fi
+) 200>"$LOCK"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage