App-orgdaemon

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

The App-orgdaemon distribution provides the "org-daemon" program, a
Perl/Tk application which sits in the background and "warns" about
appointments found in configured Emacs org-mode files.

Installation:

	perl Makefile.PL
	make
	make test
	make install

Installation without downloading the distribution:

bin/org-daemon  view on Meta::CPAN

		    ($fg, $bg) = ('white', 'red');
		} elsif ($duration < 86400) {
		    ($fg, $bg) = ('black', 'orange');
		} elsif ($duration < 86400*7) {
		    ($fg, $bg) = ('black', 'yellow');
		} else {
		    ($fg, $bg) = ('black', 'green');
		}
	    }
	    if ($overview_widget eq 'listbox') {
		$lb->itemconfigure($i, -foreground => $fg, -background => $bg, -selectforeground => $fg, -selectbackground => $bg);
	    } else {
		my $style = $hl_is{$fg}->{$bg};
		if (!$style) {
		    $style = $hl_is{$fg}->{$bg} = $lb->ItemStyle('text', -foreground => $fg, -background => $bg, -selectforeground => $fg, -selectbackground => $bg);
		}
		$lb->entryconfigure($i, -style => $style);
		eval {
		    $lb->itemConfigure($i, 1, -style => $style);
		    $lb->itemConfigure($i, 2, -style => $style);
		};
	    }
	}
    }
}

bin/org-daemon  view on Meta::CPAN

		}
	    } elsif ($date_state eq 'due') {
		if ($seen_due_date{$date_id}) {
		    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

bin/org-daemon  view on Meta::CPAN

    $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,
			-scrollbars => 'osoe',
			-selectbackground => '#4a6984',
			-selectmode => 'browse',
			-header => 0,
			-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);

bin/org-daemon  view on Meta::CPAN

in the form of non-modal dialogs. "Passive" timestamps (enclosed in
square brackets) are ignored. Diary-style sexp entries are not
implemented (see L</TODO>).

=head1 OPTIONS

=over

=item --early-warning=I<seconds>

There's an warning (a non-modal dialog with orange background) before
the real alarm, by default 30 minutes (1800 seconds) before. This
option can be used to change this default. Use 0 to turn early
warnings off completely.

=item --recheck-interval=I<seconds>

Set the interval for checking the specified org-mode files for
changes. By default, B<org-daemon> checks every 60 seconds.

=item --debug



( run in 2.102 seconds using v1.01-cache-2.11-cpan-f56aa216473 )