diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 1936cab45..53032b980 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -42,23 +42,8 @@ Item { property color colSeconds: Appearance.colors.colTertiary readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 - readonly property int clockMinute: parseInt(clockNumbers[1]) - - property int clockSecond: 0 - - // Loader to set root.clockSecond - Loader{ - active: Config.option.background.clock.cookie.secondDot - sourceComponent: Timer { - interval: 1000 - running: true;repeat: true - onTriggered: { - var now = new Date() - clockSecond = now.getSeconds() - } - } - } - + readonly property int clockMinute: DateTime.clock.minutes + readonly property int clockSecond: DateTime.clock.seconds implicitWidth: implicitSize diff --git a/.config/quickshell/ii/modules/settings/GeneralConfig.qml b/.config/quickshell/ii/modules/settings/GeneralConfig.qml index fd5fc154d..2dcc39a2e 100644 --- a/.config/quickshell/ii/modules/settings/GeneralConfig.qml +++ b/.config/quickshell/ii/modules/settings/GeneralConfig.qml @@ -210,6 +210,18 @@ ContentPage { icon: "nest_clock_farsight_analog" title: Translation.tr("Time") + ConfigSwitch { + buttonIcon: "pace" + text: Translation.tr("Second precision") + checked: Config.options.time.secondPrecision + onCheckedChanged: { + Config.options.time.secondPrecision = checked; + } + StyledToolTip { + text: Translation.tr("Enable if you want clocks to show seconds accurately") + } + } + ContentSubsection { title: Translation.tr("Format") tooltip: ""