prevent need to click on initial term/win creation

if there is no saved window id, xwininfo -id will be run without an
argument and will wait for the user to click on a window; prevent this
from happening
long-opts
angelic-sedition 10 years ago
parent c2f94ff372
commit 3c4de4f7c0

@ -126,8 +126,13 @@ wid_toggle() {
# get saved window id if already created
wid=$(< /tmp/tdrop/"$term$num")
exists=true
if [[ -n $wid ]]; then
visibility=$(xwininfo -id "$wid" | awk '/Map State/ {print $3}')
if [[ -z $wid ]] || [[ -z $visibility ]]; then
if [[ -z $visibility ]]; then
# window no longer exists
exists=false
fi
else
exists=false
fi
if $exists && [[ $visibility != IsUnviewable ]]; then

Loading…
Cancel
Save