-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
24 lines (20 loc) · 648 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const alfy = require("alfy");
const alfredNotifier = require("alfred-notifier");
const IFTTT = require("node-ifttt-maker");
const exec = require("child_process").execSync;
const doNotDisturb = require('@sindresorhus/do-not-disturb');
// update this workflow
alfredNotifier();
const makerKey = alfy.config.get("makerKey");
if (makerKey) {
const client = new IFTTT(makerKey);
client.request({ event: "start_pomodoro" }).then(
function() {},
function(err) {
alfy.output([{ title: "Error:" + err }]);
}
);
}
exec("open 'focus://focus?minutes=25'");
doNotDisturb.enable();
alfy.output([{ title: "Done, 25 minutes, clock is ticking" }]);