summaryrefslogtreecommitdiff
path: root/.local/bin/dropdowntoggle
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-10-17 13:07:04 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-10-17 13:07:04 -0400
commit3475edd53aaf98258f26e679b7054bbf9dc4d061 (patch)
treeccd1019e8296cc240d81933d9158ef2c76c4aad2 /.local/bin/dropdowntoggle
parent04b32e49e24e63d9ac03451e2431a3cb2392280d (diff)
Adapt dropdowntoggle to alacritty
Diffstat (limited to '.local/bin/dropdowntoggle')
-rwxr-xr-x.local/bin/dropdowntoggle11
1 files 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