aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts')
-rw-r--r--config/hypr/scripts/ToggleOpacity.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/hypr/scripts/ToggleOpacity.sh b/config/hypr/scripts/ToggleOpacity.sh
new file mode 100644
index 00000000..b3fa40d3
--- /dev/null
+++ b/config/hypr/scripts/ToggleOpacity.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# ==================================================
+# KoolDots (2026)
+# Project URL: https://github.com/LinuxBeginnings
+# License: GNU GPLv3
+# SPDX-License-Identifier: GPL-3.0-or-later
+# ==================================================
+# Toggle active window opacity (opaque property).
+# Uses flock so that if both .conf and .lua binds fire simultaneously
+# (dual-config load), only the first execution runs and the second exits.
+
+LOCK="/tmp/.hypr_toggle_opacity_${HYPRLAND_INSTANCE_SIGNATURE:-default}.lock"
+
+(
+ flock -n 200 || exit 0
+
+ ADDR=$(hyprctl activewindow -j 2>/dev/null | jq -r '.address // empty')
+ [ -z "$ADDR" ] && exit 0
+
+ hyprctl setprop "address:${ADDR}" opaque toggle
+) 200>"$LOCK"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage