Lower the battery threshold to 30% and default the cachy-update prompt to yes

The prompt offering to silence cachy-update's own update notification now
defaults to yes: once updates install themselves that notification is nothing
but noise, so the common answer should be the one you get by pressing Enter.

It also accepts "j" now. The prompt is translated, so a German user reads
"[J/n]" and types the German letter - which the old check for "y" alone
silently read as a refusal.
This commit is contained in:
Felitendo committed 2026-08-08 16:30:20 +02:00
1 parent 2fa830284e
commit 5728ca3038
8 files changed
+18 -10

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
# Overridable so a packager can pass the version it is actually building
# (`make VERSION=$pkgver`). The literal below is the fallback for builds
# straight from a checkout, and is what a release tag has to carry.
VERSION ?= 1.1.1
VERSION ?= 1.1.2
PREFIX ?= /usr
DESTDIR ?=
+1 -1
View File
@@ -74,7 +74,7 @@ deliberately.
A run is postponed — and retried an hour later — when:
- the battery is below 40 % (ignored on mains power; desktops without a battery
- the battery is below 30 % (ignored on mains power; desktops without a battery
are never affected),
- a game is running: GameMode, a known game process, or anything holding a
blocking idle inhibitor,
+1 -1
View File
@@ -168,7 +168,7 @@ msgstr ""
msgid "base-devel is missing - AUR packages cannot be built without it."
msgstr ""
msgid "cachy-update also notifies about available updates. Turn its notifications off? [y/N]"
msgid "cachy-update also notifies about available updates. Turn its notifications off? [Y/n]"
msgstr ""
msgid "cachy-update's update check has been disabled."
+2 -2
View File
@@ -169,8 +169,8 @@ msgstr "Kein AUR-Helper gefunden – für AUR-Updates paru oder yay installieren
msgid "base-devel is missing - AUR packages cannot be built without it."
msgstr "base-devel fehlt – ohne das lassen sich AUR-Pakete nicht bauen."
msgid "cachy-update also notifies about available updates. Turn its notifications off? [y/N]"
msgstr "cachy-update benachrichtigt ebenfalls über verfügbare Updates. Dessen Benachrichtigungen abschalten? [j/N]"
msgid "cachy-update also notifies about available updates. Turn its notifications off? [Y/n]"
msgstr "cachy-update benachrichtigt ebenfalls über verfügbare Updates. Dessen Benachrichtigungen abschalten? [J/n]"
msgid "cachy-update's update check has been disabled."
msgstr "Die Update-Prüfung von cachy-update wurde abgeschaltet."
+1 -1
View File
@@ -31,7 +31,7 @@ UpdateInterval=1d
# Never update while the battery is below this percentage. Ignored on mains
# power and on machines without a battery.
MinBatteryPercent=40
MinBatteryPercent=30
# Update only while plugged in. Stricter than MinBatteryPercent.
RequireAC=no
+10 -2
View File
@@ -117,9 +117,17 @@ cau_offer_disable_cachy_update() {
(( found )) || return 0
printf '\n %s\n ' \
"$(cau_msg "cachy-update also notifies about available updates. Turn its notifications off? [y/N]")"
"$(cau_msg "cachy-update also notifies about available updates. Turn its notifications off? [Y/n]")"
read -r answer || return 0
[[ ${answer,,} == y ]] || return 0
# Defaults to yes: once updates install themselves, cachy-update's "N
# updates available" is purely noise. "j" is accepted too - the prompt is
# translated, so a German user types the German letter and used to have
# that silently read as "no".
case "${answer,,}" in
''|y|yes|j|ja) ;;
*) return 0 ;;
esac
while read -r user uid; do
[[ -n $user ]] || continue
+1 -1
View File
@@ -134,7 +134,7 @@ cau_config_load() {
CFG_INTERVAL="$(cau_config_get UpdateInterval 1d)"
CFG_INTERVAL_SECONDS="$(cau_duration_to_seconds "$CFG_INTERVAL" 86400)"
CFG_MIN_BATTERY="$(cau_config_int MinBatteryPercent 40)"
CFG_MIN_BATTERY="$(cau_config_int MinBatteryPercent 30)"
CFG_KEEP_OLD="$(cau_config_int KeepOldPackages 3)"
CFG_AUR_HELPER="$(cau_config_get AURHelper auto)"
CFG_IGNORE_PKG="$(cau_config_get IgnorePkg '')"
+1 -1
View File
@@ -135,7 +135,7 @@ CAU_SETTINGS=(
"UpdateInterval|choice:6h 12h 1d 2d 1w|1d|Time between update runs"
"SkipWhenGaming|bool|yes|Postpone while a game is running"
"RequireAC|bool|no|Only update on mains power"
"MinBatteryPercent|choice:0 20 30 40 50 60 70 80|40|Minimum battery level (%)"
"MinBatteryPercent|choice:0 20 30 40 50 60 70 80|30|Minimum battery level (%)"
"UpdateAUR|bool|yes|Update AUR packages"
"UpdateFlatpak|bool|yes|Update Flatpaks"
"UpdateAppImages|bool|yes|Update AppImages"