From 416377aa88cfbc17f3778cb42b8e8ad02b399921 Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 28 Jul 2023 23:28:45 +0200 Subject: Update correct ydotool commands --- dropdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dropdown b/dropdown index c4a3fa4..69c734d 100755 --- a/dropdown +++ b/dropdown @@ -64,6 +64,7 @@ #fi + # Function to get window ID by window class name get_window_id_by_class() { local class="$1" @@ -122,7 +123,8 @@ id=$(get_window_id_by_class "dropdown") # Toggle the visibility of the dropdown terminal if [ -n "$id" ]; then if command -v ydotool > /dev/null; then - if ydotool windowvisible "$id"; then + mapped=$(ydotool windowmap --query "$id" | awk '{print $2}') + if [ "$mapped" = "true" ]; then # The dropdown window is visible, so hide it ydotool windowunmap "$id" else -- cgit v1.2.3