mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: finish nix-update, add idle/github/bright.
This commit is contained in:
parent
40ccc0a9e9
commit
220451e8ac
9 changed files with 377 additions and 218 deletions
13
pkgs/github-notifications/default.nix
Normal file
13
pkgs/github-notifications/default.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue