From 4ca3f8775666a4772215d6a5ea7653524ceb8d98 Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 30 Nov 2023 21:24:10 +0200 Subject: Add delay onEnter --- hotspots | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hotspots b/hotspots index 76ae5e8..af1f70d 100755 --- a/hotspots +++ b/hotspots @@ -13,6 +13,8 @@ # hotspot size SIZE=2 +DELAY=0.7 # Adjust the delay time in seconds + # active hotspot dimensions (width, height) B=(1100 140) T=(700 "$SIZE") @@ -35,11 +37,8 @@ TR=("$SIZE" "$SIZE") function onEnter { ZONE=$1 case "$1" in - 'T') eww open status &>/dev/null ;; - #'L') eww open panel &>/dev/null ;; - 'R') eww open bar &>/dev/null ;; - #'BL') launch-rofi ;; - #'TR') cycleDesktops ;; + 'T') sleep "$DELAY" && [ "$ZONE" == "T" ] && eww open status &>/dev/null ;; + 'R') sleep "$DELAY" && [ "$ZONE" == "R" ] && eww open bar &>/dev/null ;; esac } -- cgit v1.2.3