use AnyEvent::Timer::Cron only if cron enabled in config
This commit is contained in:
@@ -19,7 +19,6 @@ use utf8;
|
|||||||
use open qw (:std :utf8);
|
use open qw (:std :utf8);
|
||||||
use Fcntl qw (:seek);
|
use Fcntl qw (:seek);
|
||||||
use AnyEvent;
|
use AnyEvent;
|
||||||
use AnyEvent::Timer::Cron;
|
|
||||||
use AnyEvent::I3;
|
use AnyEvent::I3;
|
||||||
use JSON::XS;
|
use JSON::XS;
|
||||||
use Encode;
|
use Encode;
|
||||||
@@ -36,6 +35,12 @@ sub readconf ();
|
|||||||
sub active_win_borders ();
|
sub active_win_borders ();
|
||||||
|
|
||||||
my $CONF = readconf ();
|
my $CONF = readconf ();
|
||||||
|
|
||||||
|
# load AnyEvent::Timer::Cron only if cron enabled in config
|
||||||
|
if ($CONF->{'cron'}->{enabled}) {
|
||||||
|
require AnyEvent::Timer::Cron;
|
||||||
|
}
|
||||||
|
|
||||||
my $i3 = i3 ();
|
my $i3 = i3 ();
|
||||||
my $done = AnyEvent->condvar;
|
my $done = AnyEvent->condvar;
|
||||||
$i3->connect->recv or die 'Unable to connect to i3';
|
$i3->connect->recv or die 'Unable to connect to i3';
|
||||||
|
|||||||
Reference in New Issue
Block a user