summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-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