Code: Select all
#!/bin/bash
wid=$(xdotool search --classname urxvtq)
if [ -z "$wid" ]; then
urxvt -name urxvtq -geometry 80x28
wid=$(xdotool search --classname urxvtq)
xdotool windowfocus $wid
elif [ -z "$(xdotool search --onlyvisible --classname urxvtq 2>/dev/null)" ]; then
xdotool windowmap $wid
xdotool windowfocus $wid
else
xdotool windowunmap $wid
fi
The failure points of these (most likely introduced by my incompetency) were:
- inability to smoothly go from dropdown term in monitor one, shift focus onto monitor two, re-open term with proper size
- accidentally killing the terminal disables the functionality
I bet one of you Wizards has a solution to this