From 25a5a4e65f087d6fdef1667bfe5134b17e2c3d84 Mon Sep 17 00:00:00 2001 From: candifloss Date: Sun, 8 Dec 2024 16:02:07 +0530 Subject: [PATCH] fixed OSD opening script --- sh/osd/README.md | 2 +- sh/osd/osd.sh | 20 +------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/sh/osd/README.md b/sh/osd/README.md index bc503e8..4940069 100644 --- a/sh/osd/README.md +++ b/sh/osd/README.md @@ -1,4 +1,4 @@ # OSD opening/closing script This script opens the OSD popup, waits for the specified time, and closes the popup window. -If the trigger key(vol, bri, etc.) was pressed again before closing, the timer is stopped and restarted. \ No newline at end of file +If the trigger key(vol, bri, etc.) was pressed again before closing, the timer is reset. \ No newline at end of file diff --git a/sh/osd/osd.sh b/sh/osd/osd.sh index 76cdc74..1fe7a80 100755 --- a/sh/osd/osd.sh +++ b/sh/osd/osd.sh @@ -1,21 +1,3 @@ #!/bin/bash -pidfile="/home/lcm/.config/eww/sh/osd/osd.pid" osd_id="$1" - -function close() { - sleep 1.4s; - eww close $osd_id 1> /dev/null; -} - -active=$(eww active-windows| grep "osd_" | cut -d":" -f1) - -if [[ -n "$active" ]]; then - kill $(cat $pidfile); - if [[ "$active" != "$osd_id" ]]; then - echo $active - eww close "$active" 1> /dev/null; - fi; -else - eww open osd --arg osdtype=$osd_id --id $osd_id > /dev/null; -fi; -close & echo $! > $pidfile; +eww open osd --arg osdtype=$osd_id --id $osd_id --duration 1.4s > /dev/null;