From be4eb16b604091ed7542e845351dfdd21bcc016d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 8 Feb 2026 20:29:49 +0100 Subject: [PATCH] clearer session screen download warning, update check config option --- .../quickshell/ii/modules/common/Config.qml | 1 + .../ii/sessionScreen/SessionScreen.qml | 13 ++++++---- .../ii/modules/settings/ServicesConfig.qml | 26 +++++++++++++++++++ .../quickshell/ii/services/Updates.qml | 4 +-- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 64fcc7a85..659c3eb22 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -599,6 +599,7 @@ Singleton { } property JsonObject updates: JsonObject { + property bool enableCheck: true property int checkInterval: 120 // minutes property int adviseUpdateThreshold: 75 // packages property int stronglyAdviseUpdateThreshold: 200 // packages diff --git a/dots/.config/quickshell/ii/modules/ii/sessionScreen/SessionScreen.qml b/dots/.config/quickshell/ii/modules/ii/sessionScreen/SessionScreen.qml index ee8714793..78b93c4d0 100644 --- a/dots/.config/quickshell/ii/modules/ii/sessionScreen/SessionScreen.qml +++ b/dots/.config/quickshell/ii/modules/ii/sessionScreen/SessionScreen.qml @@ -238,7 +238,7 @@ Scope { } } - RowLayout { + ColumnLayout { anchors { top: contentColumn.bottom topMargin: 10 @@ -247,19 +247,22 @@ Scope { spacing: 10 Loader { - active: SessionWarnings.packageManagerRunning + Layout.alignment: Qt.AlignHCenter + active: SessionWarnings.downloadRunning visible: active sourceComponent: DescriptionLabel { - text: Translation.tr("Your package manager is running") + text: Translation.tr("There might be a download in progress. Check your Downloads folder.") textColor: Appearance.m3colors.m3onErrorContainer color: Appearance.m3colors.m3errorContainer } } + Loader { - active: SessionWarnings.downloadRunning + Layout.alignment: Qt.AlignHCenter + active: SessionWarnings.packageManagerRunning visible: active sourceComponent: DescriptionLabel { - text: Translation.tr("There might be a download in progress") + text: Translation.tr("Your package manager is running") textColor: Appearance.m3colors.m3onErrorContainer color: Appearance.m3colors.m3errorContainer } diff --git a/dots/.config/quickshell/ii/modules/settings/ServicesConfig.qml b/dots/.config/quickshell/ii/modules/settings/ServicesConfig.qml index f5931bb1b..aec8dc98a 100644 --- a/dots/.config/quickshell/ii/modules/settings/ServicesConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/ServicesConfig.qml @@ -203,6 +203,32 @@ ContentPage { } } + // There's no update indicator in ii for now so we shouldn't show this yet + // ContentSection { + // icon: "deployed_code_update" + // title: Translation.tr("System updates (Arch only)") + + // ConfigSwitch { + // text: Translation.tr("Enable update checks") + // checked: Config.options.updates.enableCheck + // onCheckedChanged: { + // Config.options.updates.enableCheck = checked; + // } + // } + + // ConfigSpinBox { + // icon: "av_timer" + // text: Translation.tr("Check interval (mins)") + // value: Config.options.updates.checkInterval + // from: 60 + // to: 1440 + // stepSize: 60 + // onValueChanged: { + // Config.options.updates.checkInterval = value; + // } + // } + // } + ContentSection { icon: "weather_mix" title: Translation.tr("Weather") diff --git a/dots/.config/quickshell/ii/services/Updates.qml b/dots/.config/quickshell/ii/services/Updates.qml index 48549ac3c..ee9093143 100644 --- a/dots/.config/quickshell/ii/services/Updates.qml +++ b/dots/.config/quickshell/ii/services/Updates.qml @@ -29,7 +29,7 @@ Singleton { Timer { interval: Config.options.updates.checkInterval * 60 * 1000 repeat: true - running: Config.ready + running: Config.ready && Config.options.updates.enableCheck onTriggered: { print("[Updates] Periodic update check due") root.refresh(); @@ -38,7 +38,7 @@ Singleton { Process { id: checkAvailabilityProc - running: true + running: Config.ready && Config.options.updates.enableCheck command: ["which", "checkupdates"] onExited: (exitCode, exitStatus) => { root.available = (exitCode === 0);