App-orgdaemon
view release on metacpan or search on metacpan
bin/org-daemon view on Meta::CPAN
my($h,$m);
if ($self->end_is_timeless) {
($h,$m) = (23,59);
} else {
($h,$m) = $self->{time_end} =~ m{^(\d{1,2}):(\d{2})};
}
Time::Local::timelocal(0,$m,$h,$D,$M-1,$Y);
}
}
my $small_font = 'sans 8';
my $default_early_warning = 30*60;
my $default_timeless_early_warning = 86400;
my $include_timeless;
my $time_fallback = '06:00';
my $recheck_interval;
my $debug;
my $use_emacsclient_eval = 1;
my $emacsclient_fmt_cmd;
my $show_version;
my $overview_widget = 'hlist';
bin/org-daemon view on Meta::CPAN
next;
} else {
$seen_due_date{$date_id} = 1;
}
}
my %colargs = (
-background => ($is_early_warning ? 'orange' : 'red'),
-foreground => ($is_early_warning ? 'black' : 'white'),
);
my %smlbtnargs = (-font => $small_font);
my %t_args = (
-title => ($is_early_warning ? "Early Warning" : "Alarm!"),
%colargs,
);
if ($t && Tk::Exists($t)) {
# something changed: early -> due
$t->configure(%t_args);
$_->destroy for $t->children;
$t->{OverflowCounter}->cancel;
bin/org-daemon view on Meta::CPAN
$t->Icon(-image => $org_alert_logo);
$t->bind($_ => sub { $t->destroy })
for ('<Escape>', '<Control-q>');
$t->{DateId} = $date_id;
$t->{DateState} = $date_state;
}
$t->Label(-text => (($is_early_warning ? "Early warning:\n" : "")
. $date->formatted_text),
-justify => 'left',
-anchor => 'nw',
-font => 'sans 24',
%colargs,
)->pack(qw(-fill x -expand 1));
my $overflow = ($is_early_warning ? "" : "+00:00");
$t->Label(-textvariable => \$overflow,
-justify => 'right',
-anchor => 'e',
%colargs, %smlbtnargs,
)->pack(qw(-side right));
my @button_opts = (
-anchor => 'w',
bin/org-daemon view on Meta::CPAN
return 1 if caller;
GetOptions(
"d|debug!" => \$debug,
"recheck-interval=i" => \$recheck_interval,
"early-warning=i" => \$default_early_warning,
"early-warning-timeless=i" => \$default_timeless_early_warning,
"include-timeless!" => \$include_timeless,
'time-fallback=s' => \$time_fallback,
"small-font=s" => \$small_font,
'emacsclient-eval!' => \$use_emacsclient_eval,
'emacsclient-cmd=s' => \$emacsclient_fmt_cmd,
'overview-widget=s' => \$overview_widget,
'ignore-tag=s@' => \@ignore_tags,
'v|version' => \$show_version,
'move-button!' => \$with_move_button,
'use-anyevent' => \$use_anyevent,
)
or die <<EOF;
$0 [--debug] [--early-warning=seconds] [--early-warning-timeless=seconds] [--recheck-interval=seconds]
bin/org-daemon view on Meta::CPAN
Z8/3fL/vDkO/5erVyqrKqjUrX/l4w9k5Tx5NSb+2qe4WTHl5udlsFkVxuND92x9HU9IbC+xyMKhK
RhyZ6urYf8D54mpcS9l27yCYxOGqKEKCKNA6/S0mV195K9LmzHz1peya6ngzGQCiknR6SgnvbL+H
ZxmupSadOKLLzIj3bEGynFho01nuu5eHH4GjKAKAfwEkxHqUW0+AiwAAAABJRU5ErkJggg==
EOF
if ($overview_widget eq 'listbox') {
$lb = $mw->Scrolled('Listbox',
-width => 100,
-height => 8,
-scrollbars => "osoe",
-font => 'Courier 9', # a fixed font
)->pack(qw(-fill both -expand 1));
$lb->bind("<Double-1>" => sub {
show_date_by_index_in_emacs(shift->xyIndex);
});
} else {
require Tk::HList;
require Tk::ItemStyle;
$lb = $mw->Scrolled('HList',
-width => 100,
-height => 10,
bin/org-daemon view on Meta::CPAN
-columns => 3,
-command => sub {
my $path = shift;
show_date_by_index_in_emacs($path);
},
)->pack(qw(-fill both -expand 1));
$lb->anchorClear;
$lb->columnWidth(0, 400);
}
$lb->Button(-padx => 0, -pady => 0, -borderwidth => 1,
-font => $small_font,
-text => 'Update',
-command => \&tk_do_one_iteration,
)->place(-relx => 1, -rely => 1, -anchor => 'se');
$mw->bind('<Control-p>' => sub { start_ptksh() });
tk_do_one_iteration();
if ($recheck_interval == 60) {
# synchronize with full minute, only implemented for recheck_interval=60
my(@l) = localtime;
( run in 0.751 second using v1.01-cache-2.11-cpan-5735350b133 )