shackie: add .open command
This commit is contained in:
parent
b850c6476f
commit
b6f6aee6ba
@ -14,6 +14,21 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
plugin = "system";
|
||||||
|
config = {
|
||||||
|
hooks.PRIVMSG = [
|
||||||
|
{
|
||||||
|
pattern = ".open$";
|
||||||
|
activate = "match";
|
||||||
|
command.filename = pkgs.writers.writeDash "is_shack_open" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSsk https://api.shackspace.de/v1/space |
|
||||||
|
${pkgs.jq}/bin/jq '.doorState.open'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.services.announce_doorstatus = {
|
systemd.services.announce_doorstatus = {
|
||||||
|
Loading…
Reference in New Issue
Block a user