this seems to work:
$current_window =~ s/^[^\s]+\s+(\d+).*/$1/; On Jul 9, 2005, at 8:32 AM, Kevin Geiss wrote: it seems to me that with 'info', the hard part is getting the number out of a single string, but with 'window', you have to first choose the right string out of a set of strings, then get the number out of the (albeit simpler) string. :)
for parsing 'info', maybe something simple like this would work, looks like there's no leading spaces on the info output after all:
$current_window =~ m/^[^\s]+\s+(\d+)/; $current_window = $1; On Jul 9, 2005, at 6:30 AM, Trent Buck wrote: Instead of :info, why not use :window's status flag to select the appropriate number?
_______________________________________________ Ratpoison-devel mailing list
|