support paru in checkUpdates & clarify polling interval is in ms (#601)
* feat(scripts): support `paru` for checking package updates * fix(config): clarify polling interval is in ms --------- Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
@@ -3,14 +3,19 @@
|
||||
check_arch_updates() {
|
||||
official_updates=0
|
||||
aur_updates=0
|
||||
if command -v paru &> /dev/null; then
|
||||
aur_helper="paru"
|
||||
else
|
||||
aur_helper="yay"
|
||||
fi
|
||||
|
||||
if [ "$1" = "-y" ]; then
|
||||
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
|
||||
aur_updates=$($aur_helper -Qum 2>/dev/null | wc -l)
|
||||
elif [ "$1" = "-p" ]; then
|
||||
official_updates=$(checkupdates 2>/dev/null | wc -l)
|
||||
else
|
||||
official_updates=$(checkupdates 2>/dev/null | wc -l)
|
||||
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
|
||||
aur_updates=$($aur_helper -Qum 2>/dev/null | wc -l)
|
||||
fi
|
||||
|
||||
total_updates=$((official_updates + aur_updates))
|
||||
|
||||
@@ -176,7 +176,7 @@ export const CustomModuleSettings = (): JSX.Element => {
|
||||
<Option opt={options.bar.customModules.netstat.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.pollingInterval}
|
||||
title="Polling Interval"
|
||||
title="Polling Interval (ms)"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
|
||||
Reference in New Issue
Block a user