From 912130c3b2c09123d933addde1fcf97373a5cdc1 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sat, 15 Aug 2026 11:26:57 -0400 Subject: Fixed opacity keybinds add: ToggleOpacity script Signed-off-by: Don Williams On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/configs/Keybinds.conf modified: config/hypr/configs/system_keybinds.lua modified: config/hypr/lua/keybind_helpers.lua new file: config/hypr/scripts/ToggleOpacity.sh --- config/hypr/scripts/ToggleOpacity.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 config/hypr/scripts/ToggleOpacity.sh (limited to 'config/hypr/scripts') 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" -- cgit v1.2.3