diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-08-15 11:26:57 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-08-29 21:41:34 -0700 |
| commit | 912130c3b2c09123d933addde1fcf97373a5cdc1 (patch) | |
| tree | ba57dce1e2002552898476269955d687e7f67bb5 /config/hypr/scripts | |
| parent | 16a0414b0e6cf4c27fc5550e7acee3e731cddbb7 (diff) | |
Fixed opacity keybinds add: ToggleOpacity script
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/configs/Keybinds.conf
modified: config/hypr/configs/system_keybinds.lua
modified: config/hypr/lua/keybind_helpers.lua
new file: config/hypr/scripts/ToggleOpacity.sh
Diffstat (limited to 'config/hypr/scripts')
| -rw-r--r-- | config/hypr/scripts/ToggleOpacity.sh | 21 |
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" |
