slack: disable autostart on weekends

This commit is contained in:
Tigor Hutasuhut 2024-11-09 15:35:09 +07:00
parent 8a22df1081
commit 68f2cd8fec

View file

@ -7,6 +7,9 @@
let
cfg = config.profile.slack;
autostartScript = pkgs.writeShellScriptBin "slack.sh" ''
# do not autostart on weekend
if [ "$(date +%u)" -gt 5 ]; then exit 0; fi
sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 1.1.1.1; do sleep 1; done; slack
'';
inherit (lib.meta) getExe;