diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-06-02 13:18:49 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-06-02 13:18:49 +0100 |
commit | 1695d600a000abf65ef6e5e0a176991c00773b31 (patch) | |
tree | f59fa43c3a359e748da9ca85fffe9417bdbb3676 /.config/yambar | |
parent | cb2aa2a9ab0bff2c4c17323f592aae9964f62495 (diff) |
Added Chimera Linux updates script ( Allowed wheel group to 'apk update' only in doas.conf )
Diffstat (limited to '.config/yambar')
-rw-r--r-- | .config/yambar/config.yml | 20 | ||||
-rwxr-xr-x | .config/yambar/scripts/chimera-updates.sh (renamed from .config/yambar/scripts/void-updates.sh) | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/.config/yambar/config.yml b/.config/yambar/config.yml index 61f1bf8..0cb638b 100644 --- a/.config/yambar/config.yml +++ b/.config/yambar/config.yml @@ -82,16 +82,16 @@ bar: text: "{time}" right: - # - script: - # path: ~/.config/yambar/scripts/void-updates.sh - # args: [] - # content: - # string: - # margin: 0 - # text: "{updates}" - # font: *nerdfont - # foreground: 98971aff - # on-click: sh -c "~/.config/yambar/scripts/void-updates.sh update" + - script: + path: ~/.config/yambar/scripts/chimera-updates.sh + args: [] + content: + string: + margin: 0 + text: "{updates}" + font: *nerdfont + foreground: 98971aff + on-click: sh -c "~/.config/yambar/scripts/chimera-updates.sh update" - script: path: ~/.config/yambar/scripts/idleinhibit.sh args: [] diff --git a/.config/yambar/scripts/void-updates.sh b/.config/yambar/scripts/chimera-updates.sh index 98b3e0b..2a948ae 100755 --- a/.config/yambar/scripts/void-updates.sh +++ b/.config/yambar/scripts/chimera-updates.sh @@ -6,9 +6,9 @@ echo "" while true; do -xbps-install -Mun 1> /tmp/void-updates -updates="$(cat /tmp/void-updates | awk '{ print $1 }')" -number="$(cat /tmp/void-updates | wc -l)" +doas apk update +updates="$(apk -u list | awk '{ print $1 }')" +number="$(apk -u list | wc -l | awk '{$1=$1};1')" if [ "$number" -gt 0 ]; then text=" $number" @@ -24,7 +24,7 @@ done } function update { - foot bash -c "sudo xbps-install -Suv"; sh -c "~/.config/yambar/scripts/yambar-start.sh" + foot bash -c "doas apk upgrade"; sh -c "~/.config/yambar/scripts/yambar-start.sh" } case $1 in |