mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: remove updatechecker, lidChange apci script
This commit is contained in:
parent
faff8d9ee6
commit
1ae3be96fa
6 changed files with 32 additions and 145 deletions
|
|
@ -1,14 +0,0 @@
|
|||
updates="$({ cd /home/swarsel/.dotfiles && nix flake lock --update-input nixpkgs && nix build .#nixosConfigurations."$(eval hostname)".config.system.build.toplevel && nvd diff /run/current-system ./result | grep -c '\[U'; } || true)"
|
||||
|
||||
alt="has-updates"
|
||||
if [[ $updates -eq 0 ]]; then
|
||||
alt="updated"
|
||||
fi
|
||||
|
||||
tooltip="System updated"
|
||||
if [[ $updates != 0 ]]; then
|
||||
tooltip=$(cd ~/.dotfiles && nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n')
|
||||
echo "{ \"text\":\"$updates\", \"alt\":\"$alt\", \"tooltip\":\"$tooltip\" }"
|
||||
else
|
||||
echo "{ \"text\":\"\", \"alt\":\"$alt\", \"tooltip\":\"\" }"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue