diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2023-10-17 13:07:04 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2023-10-17 13:07:04 -0400 |
commit | 3475edd53aaf98258f26e679b7054bbf9dc4d061 (patch) | |
tree | ccd1019e8296cc240d81933d9158ef2c76c4aad2 /.local/bin | |
parent | 04b32e49e24e63d9ac03451e2431a3cb2392280d (diff) |
Adapt dropdowntoggle to alacritty
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/dropdowntoggle | 11 |
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 |