Hi,
I think I get what you are trying to do - try this code snippet. It
displays <time> <bell symbol><alarm time> when using the large font
display - is that what you were looking for?
Code:
--------------------
sub screensaverAlarmTimelines {
my $client = shift;
my @line = (Slim::Utils::DateTime::longDateF(), getFuzzyTimeF());
my $alarmID = defined $nextAlarm{$client} ? $nextAlarm{$client} :
findNextAlarm($client);
if ($alarmID) {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
my $time = $prefs->client($client)->get('time.'.$alarmID);
my ($h0, $h1, $m0, $m1, $p) =
Slim::Utils::DateTime::timeDigits($time);
my $timestring = ((defined($p) && $h0 == 0) ? ' ' : $h0) . $h1
. ":" . $m0 . $m1 . " " . (defined($p) ? $p : '');
if ($prefs->client($client)->get('offDisplaySize')) {
# for large size, display in the format: hh:mm m
xx:yy
# with: hh = current hour, mm = current minute, m =
alarm_mode, xx = alarm hour, yy = alarm minute
my $sec = int(substr($line[1],6,2));
my $even = $sec - (int($sec / 2) * 2); # blink of
separator
my $sep = ".";
if ($even) {$sep = ":";}
my @alarmModes = ('*', '1','2','3','4','5','6','7','w',
'e' ,'o', 'd');
$line[1] =
substr($line[1],0,2).$sep.substr($line[1],3,2)." ";
$line[1] .=
$alarmModes[$prefs->client($client)->get("days.".$alarmID)];
} else {
# for small size display verbose information
# upper line: centered date (default style)
# lower line: Time hh:mm:ss Alarm hh:mm mode
#my @alarmModes = ('7d', 'Mon', 'Tue', 'Wed', 'Thu',
'Fri', 'Sat', 'Sun', 'Week', ,'SaSo', 'Next', 'Today');
# $line[1] .= " ".$client->string("PLUGIN_ALARM_WAKE")."
$timestring";
# $line[1] .= "
".$alarmModes[$prefs->client($client)->get("days.".$alarmID)];
$line[1] .= " ";
$line[1] .= $client->symbols('bell');
$line[1] .= $timestring;
}
}
return {
'center' => [EMAIL PROTECTED],
'overlay'=> [ ($nextAlarm{$client} ? $client->symbols('bell') :
undef) ],
};
}
--------------------
--
sk33ve
------------------------------------------------------------------------
sk33ve's Profile: http://forums.slimdevices.com/member.php?userid=16580
View this thread: http://forums.slimdevices.com/showthread.php?t=45943
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins