diff options
author | psyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet> | 2016-08-10 15:28:42 +0000 |
---|---|---|
committer | psyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet> | 2016-08-10 15:28:42 +0000 |
commit | 3eccf0b4756713deea71a428b1d6b23be740828c (patch) | |
tree | fb39181a8b7bdf10bd19b163c4a21404f319ae99 /bin/psycamp | |
parent | c95ee53140efe12e372bb28dcbc19f8c957eaaf0 (diff) | |
download | perlpsyc-3eccf0b4756713deea71a428b1d6b23be740828c.tar.gz perlpsyc-3eccf0b4756713deea71a428b1d6b23be740828c.zip |
nicer playlist display.. and 'qq' quitLater function
Diffstat (limited to 'bin/psycamp')
-rwxr-xr-x | bin/psycamp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/psycamp b/bin/psycamp index d427e74..f7baefc 100755 --- a/bin/psycamp +++ b/bin/psycamp | |||
@@ -411,6 +411,7 @@ sub ginread { | |||
411 | print BOLD, GREEN, "\r [\n", RESET unless $opt_q; | 411 | print BOLD, GREEN, "\r [\n", RESET unless $opt_q; |
412 | } | 412 | } |
413 | &ginstop if $opt_I; | 413 | &ginstop if $opt_I; |
414 | if ($quitLater) { &save($CS-1), &exit(0); } | ||
414 | &next(0); | 415 | &next(0); |
415 | } | 416 | } |
416 | } | 417 | } |
@@ -552,10 +553,10 @@ X | |||
552 | my $s = $size[$order[$i]] || -s $f; | 553 | my $s = $size[$order[$i]] || -s $f; |
553 | # my $a = $adate[$order[$i]]; | 554 | # my $a = $adate[$order[$i]]; |
554 | $f =~ s/\.[^\.\s]+$//i; | 555 | $f =~ s/\.[^\.\s]+$//i; |
555 | $f = '..'.substr($f,length($p)-$TWIDTH+16) if | 556 | $f = '..'.substr($f,length($p)-$TWIDTH+11) if |
556 | length($f) > $TWIDTH-14; | 557 | length($f) > $TWIDTH-9; |
557 | $any++; | 558 | $any++; |
558 | printf "%2d.%9d %s\n", $i, $s, $f; | 559 | printf "%9d %s\n", $s, $f; |
559 | } | 560 | } |
560 | print $any ? "\n" : "<no more tracks in playlist>\n\n"; | 561 | print $any ? "\n" : "<no more tracks in playlist>\n\n"; |
561 | print &sep('-'); | 562 | print &sep('-'); |
@@ -689,6 +690,10 @@ X | |||
689 | # &gin("seek $1 $2"); | 690 | # &gin("seek $1 $2"); |
690 | # } | 691 | # } |
691 | 692 | ||
693 | if (/^q(q|quit)\b/) { | ||
694 | print BOLD, GREEN, ">> scheduled to quit after this track\n", RESET; | ||
695 | $quitLater++, next; | ||
696 | } | ||
692 | /^(q|quit)\b/ and &save($CS-1), &exit(0); | 697 | /^(q|quit)\b/ and &save($CS-1), &exit(0); |
693 | /^(x|exit)\b/ and &exit(0); | 698 | /^(x|exit)\b/ and &exit(0); |
694 | /^(w|write)\b/ and &save($CS-1), next; | 699 | /^(w|write)\b/ and &save($CS-1), next; |
@@ -1047,7 +1052,7 @@ sub ginparse { | |||
1047 | #% $TC eq $1 #? X | 1052 | #% $TC eq $1 #? X |
1048 | $tc == $1 #? !X | 1053 | $tc == $1 #? !X |
1049 | ) { | 1054 | ) { |
1050 | &seek(84) if $opt_j and $tc == 8; | 1055 | &seek(91) if $opt_j and $tc == 8; |
1051 | #% $TC = $1; #? X | 1056 | #% $TC = $1; #? X |
1052 | $tc = $1; #? !X | 1057 | $tc = $1; #? !X |
1053 | $TC = time2str('[%T]', $tc, 0); #? !X | 1058 | $TC = time2str('[%T]', $tc, 0); #? !X |