aboutsummaryrefslogtreecommitdiff
path: root/dropdown
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-07-28 23:28:45 +0200
committersrdusr <trevorgray@srdusr.com>2023-07-28 23:28:45 +0200
commit416377aa88cfbc17f3778cb42b8e8ad02b399921 (patch)
tree1928189900e978d9650c45fb89643beae56fe084 /dropdown
parentef0e1527a73749497592464e4201bd302d6010c5 (diff)
downloaddotfiles-416377aa88cfbc17f3778cb42b8e8ad02b399921.tar.gz
dotfiles-416377aa88cfbc17f3778cb42b8e8ad02b399921.zip
Update correct ydotool commands
Diffstat (limited to 'dropdown')
-rwxr-xr-xdropdown4
1 files changed, 3 insertions, 1 deletions
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