Delete .config/blacklayer directory

This commit is contained in:
FURK4NGG
2026-01-19 16:33:00 +03:00
committed by GitHub
parent ff46e49918
commit a9afdd9c5f
5 changed files with 0 additions and 163 deletions
-24
View File
@@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Kullanım: event-driven.sh <MONITOR_NAME> <POLL_INTERVAL>
MONITOR="$1"
POLL_INTERVAL="${2:-3}" # default 3s
[ -z "$MONITOR" ] && { echo "Monitor arg missing"; exit 1; }
BASE_DIR="$HOME/.config/blacklayer"
BLACKLAYER_BIN="$BASE_DIR/blacklayer"
STATE_DIR="$BASE_DIR/.blacklayer_state"
STATE_FILE="$STATE_DIR/$MONITOR"
while true; do
sleep "$POLL_INTERVAL"
JSON="$(hyprctl -j monitors 2>/dev/null)"
echo "$JSON" | jq empty >/dev/null 2>&1 || continue
FOCUSED=$(echo "$JSON" | jq -r ".[] | select(.name==\"$MONITOR\") | .focused")
if [ "$FOCUSED" = "true" ]; then
pkill -f "$BLACKLAYER_BIN $MONITOR" >/dev/null 2>&1
echo "false" > "$STATE_FILE"
exit 0
fi
done