6 GetOptions(\%options, 'k', 'i', 't');
14 if(-r "$dir/nextep") {
15 open NE, "$dir/nextep" || die;
25 if(-r "$dir/.autodl/curep" && -r "$dir/.autodl/rtinfo") {
26 open DE, "$dir/.autodl/curep" || die;
37 if(-r "$dir/.flags") {
38 open FL, "$dir/.flags" || die;
52 $cns = $options{"k"} == $dirs{$_}->{"kaka"};
53 # $cns = 0 if $dirs{$_}->{"notdone"} && !$options{"i"};
55 if($dirs{$_}->{"lp"}) {
57 } elsif($dirs{$_}->{"first"}) {
59 } elsif($dirs{$_}->{"hasmore"}) {
61 } elsif($dirs{$_}->{"nomore"}) {
63 } elsif($dirs{$_}->{"act"}) {
71 if($options{"t"} && ($nc == 34)) {
74 $dirs{$_}->{"color"} = $nc;
83 ($w, $h) = GetTerminalSize;
84 $cols = int($w / $cw);
85 @sorted = sort keys %dirs;
86 $percol = int(@sorted / $cols) + 1;
87 for($i = 0; $i < $percol; $i++) {
88 for($o = 0, $x = 0; $o < $cols; $o++) {
89 $n = ($o * $percol) + $i;
90 last if $n >= @sorted;
91 print (" " x (($cw * $o) - $x)) if $x < $cw * $o;
94 $nc = $dirs{$_}->{"color"};
95 print "\e[${nc}m$_\e[39m";