--- installastheme.pl~ Fri Mar 30 20:38:48 2001 +++ installastheme.pl Fri Mar 30 23:32:09 2001 @@ -353,31 +353,14 @@ open (PROC, "xdpyinfo|") or die "Cannot start 'xdpyinfo' process, $!\n"; while () { - # looking for a line that has the key word "depths" on it, as in: - # screen #0: - # dimensions: 1024x768 pixels (347x260 millimeters) - # resolution: 75x75 dots per inch - # depths (1): 16 - next unless /depths/; - # strip out all the stuff except the actual bit depth - chomp; # and the pesky newlines + # This uses the (wrong) assumption that afterstep and QT uses.. That + # the root window depth is the depth we should actually use. + # - Thomas Stromberg - s { - \s* # Match any beginning spaces - depths # Catch the keyword "depths" - \s+ # follwed by some more spaces - \( - (\d+) # some number of digets - # (remember them for later) - \) # the digets are enclosed in parens - :\s* # follwed by a colon and some more spaces - }[]x; # replace all that with nothing (erase it) - # The number in parenthases is the length of a list of bit depths - # We will make an array of that list and read the last one as the actual - # bit depth - my @depths = split /,\s/, $_, $1; - $BIT_DEPTH = $depths[scalar(@depths) -1]; - last; + if (/depth of root window: +(\d+)/) { + $BIT_DEPTH = $1; + last; + } } # Check to make sure we got the bit depth from xdpyinfo