From 1078bd52ab8776beac3ae6fcb8effbe3c37c8290 Mon Sep 17 00:00:00 2001 From: Felitendo Date: Mon, 28 Sep 2026 14:40:00 +0200 Subject: [PATCH] fix: hide the progress bar when start notices are off Fixes #2 --- doc/cachy-auto-update.1.scd | 3 ++- res/config/cachy-auto-update.conf | 4 ++-- src/lib/progress.sh | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/cachy-auto-update.1.scd b/doc/cachy-auto-update.1.scd index ad2171b..4dff1f7 100644 --- a/doc/cachy-auto-update.1.scd +++ b/doc/cachy-auto-update.1.scd @@ -114,7 +114,8 @@ entry: the step being performed, how many items it has got through, an overall percentage, and the package currently being unpacked under "Details". This is a job in the sense of *org.kde.JobViewServer*, the same mechanism a file manager uses while copying, rather than a notification. That is what makes it a bar -instead of a line of text. +instead of a line of text. The desktop pops it up as it opens, so it follows +_NotifyOnStart_ and is not shown when that is off. The desktop withdraws a job as soon as the D-Bus connection that requested it closes, so a helper process runs inside each graphical session for the duration diff --git a/res/config/cachy-auto-update.conf b/res/config/cachy-auto-update.conf index 1e0b2ab..a772874 100644 --- a/res/config/cachy-auto-update.conf +++ b/res/config/cachy-auto-update.conf @@ -107,8 +107,8 @@ RemoveOrphans=no # password prompt that never mentions updates. The message is withdrawn again # when the result arrives, so it costs one bubble, not two. # -# Separate from the progress bar in the notification area, which is not -# optional and appears whenever the desktop supports one. +# Also turns the progress bar in the notification area on or off. The desktop +# pops it up as it opens, so it counts as a start notice too. NotifyOnStart=yes # Say something after a successful update. Nothing is ever shown when there diff --git a/src/lib/progress.sh b/src/lib/progress.sh index d872956..aaa3423 100644 --- a/src/lib/progress.sh +++ b/src/lib/progress.sh @@ -95,6 +95,8 @@ cau_progress_begin() { (( CAU_PROGRESS_SCALE > 0 )) || return 0 [[ $CFG_NOTIFICATIONS == yes ]] || return 0 + # The desktop pops the bar up as it opens, which reads as a start notice. + [[ $CFG_NOTIFY_START == yes ]] || return 0 [[ -x $CAU_PROGRESS_HELPER ]] || return 0 mkdir -p "$CAU_RUNDIR" 2>/dev/null || return 0