Add initial support for terminix

long-opts
noctuid 9 years ago
parent f5c81e6acd
commit ef9e436252

@ -75,6 +75,7 @@ mime ^video, has mpv, X, flag f = tdrop -a auto_hide && mpv -- "$@" && tdrop -a
- Terminology - Terminology
- Sakura - Sakura
- Roxterm - Roxterm
- Terminix
If your terminal doesn't work with tdrop, feel free to make an issue. If your terminal doesn't work with tdrop, feel free to make an issue.

@ -444,10 +444,15 @@ term_create() {
else else
term_command=$term term_command=$term
fi fi
if [[ $term == terminix ]]; then
sleep_term_time=0.3
fi
if [[ -n $session_name ]]; then if [[ -n $session_name ]]; then
# ugly workarounds due to how different terms different -e flags work # ugly workarounds due to how different terms' different -e flags work
if [[ $term == urxvt ]]; then if [[ $term == urxvt ]]; then
$term_command -e bash -c "sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && tmux attach-session -dt $session_name || tmuxinator start $session_name || tmux new-session -s $session_name" & $term_command -e bash -c "sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && tmux attach-session -dt $session_name || tmuxinator start $session_name || tmux new-session -s $session_name" &
elif [[ $term == terminix ]]; then
$term_command -x "bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && tmux attach-session -dt $session_name || tmuxinator start $session_name || tmux new-session -s $session_name'" &
else else
# starting with '/bin/bash -c' because required by termite # starting with '/bin/bash -c' because required by termite
$term_command -e "/bin/bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && tmux attach-session -dt $session_name || tmuxinator start $session_name || tmux new-session -s $session_name'" & $term_command -e "/bin/bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && tmux attach-session -dt $session_name || tmuxinator start $session_name || tmux new-session -s $session_name'" &
@ -456,6 +461,8 @@ term_create() {
# not using hold, because flag is different for different terminals # not using hold, because flag is different for different terminals
if [[ $term == urxvt ]]; then if [[ $term == urxvt ]]; then
$term_command -e bash -c "sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && $SHELL" & $term_command -e bash -c "sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && $SHELL" &
elif [[ $term == terminix ]]; then
$term_command -x "bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && $SHELL'" &
else else
# not using hold, because flag is different for different terminals # not using hold, because flag is different for different terminals
$term_command -e "/bin/bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && $SHELL'" & $term_command -e "/bin/bash -c 'sleep $sleep_term_time && xdotool getactivewindow > /tmp/tdrop/$term$num && xdotool getactivewindow windowmove $xoff $yoff windowsize $width $height && $SHELL'" &

Loading…
Cancel
Save