From 3475edd53aaf98258f26e679b7054bbf9dc4d061 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 17 Oct 2023 13:07:04 -0400 Subject: Adapt dropdowntoggle to alacritty --- .local/bin/dropdowntoggle | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.local/bin/dropdowntoggle b/.local/bin/dropdowntoggle index 056a716..d1c1e3b 100755 --- a/.local/bin/dropdowntoggle +++ b/.local/bin/dropdowntoggle @@ -5,13 +5,18 @@ # The rest of it is the program/command to be run # in the dropdown window. -class="$1" -title="dropdown_$class" +title_flag="--title" +class_flag="--class" +cmd_flag="--command" + +name="$1" +class="dropdown" +title="dropdown_$name" active="$(xdotool search --name $title | wc -l)" shift case "$active" in - 0) $TERMINAL -c "dropdown" -t "$class" -e "$@" & ;; + 0) $TERMINAL --class "dropdown" --title "$title" --command "$@" & ;; *) kill -9 `xdotool search --name "$class" getwindowpid` ;; esac -- cgit v1.2.3