mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
13 lines
342 B
Nix
13 lines
342 B
Nix
{ name, writeShellApplication, jq, ... }:
|
|
|
|
writeShellApplication {
|
|
inherit name;
|
|
runtimeInputs = [ jq ];
|
|
text = ''
|
|
count=$(curl -u Swarsel:"$(cat "$XDG_RUNTIME_DIR/secrets/github_notif")" https://api.github.com/notifications | jq '. | length')
|
|
|
|
if [[ "$count" != "0" ]]; then
|
|
echo "{\"text\":\"$count\"}"
|
|
fi
|
|
'';
|
|
}
|