feat: finish nix-update, add idle/github/bright.

This commit is contained in:
Swarsel 2024-08-11 01:18:07 +02:00
parent 40ccc0a9e9
commit 220451e8ac
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
9 changed files with 377 additions and 218 deletions

View file

@ -15,4 +15,5 @@ in
opacitytoggle = callPackage ./opacitytoggle { };
fs-diff = callPackage ./fs-diff { };
update-checker = callPackage ./update-checker { };
github-notifications = callPackage ./github-notifications { };
}

View file

@ -0,0 +1,13 @@
{ writeShellApplication, jq }:
writeShellApplication {
name = "github-notifications";
runtimeInputs = [ jq ];
text = ''
count=$(curl -u Swarsel:"$(cat /run/user/1000/secrets/github_notif)" https://api.github.com/notifications | jq '. | length')
if [[ "$count" != "0" ]]; then
echo "{\"text\":\"$count\"}"
fi
'';
}