From 0e3b3eceb664f183e9cae63f838c37a60ed11e87 Mon Sep 17 00:00:00 2001 From: vaguesyntax Date: Sun, 14 Dec 2025 13:48:37 +0300 Subject: [PATCH] digital clock: add font.family option --- dots/.config/quickshell/ii/modules/common/Config.qml | 1 + .../ii/background/widgets/clock/DigitalClock.qml | 2 ++ .../ii/modules/settings/BackgroundConfig.qml | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 3518b3dbd..3dfc6dd30 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -191,6 +191,7 @@ Singleton { property bool animateChange: true property bool vertical: false property JsonObject font: JsonObject { + property string family: "Google Sans Flex" property real weight: 350 property real width: 100 property real size: 90 diff --git a/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/DigitalClock.qml b/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/DigitalClock.qml index 233cad7b1..aff44ebd2 100644 --- a/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/DigitalClock.qml +++ b/dots/.config/quickshell/ii/modules/ii/background/widgets/clock/DigitalClock.qml @@ -31,6 +31,7 @@ ColumnLayout { font { pixelSize: Config.options.background.widgets.clock.digital.font.size weight: Config.options.background.widgets.clock.digital.font.weight + family: Config.options.background.widgets.clock.digital.font.family variableAxes: ({ "wdth": Config.options.background.widgets.clock.digital.font.width, "ROND": Config.options.background.widgets.clock.digital.font.roundness @@ -49,6 +50,7 @@ ColumnLayout { font { pixelSize: Config.options.background.widgets.clock.digital.font.size weight: Config.options.background.widgets.clock.digital.font.weight + family: Config.options.background.widgets.clock.digital.font.family variableAxes: ({ "wdth": Config.options.background.widgets.clock.digital.font.width, "ROND": Config.options.background.widgets.clock.digital.font.roundness diff --git a/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml b/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml index 697c40274..e6aa0aaa7 100644 --- a/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/BackgroundConfig.qml @@ -219,6 +219,16 @@ ContentPage { } } + MaterialTextArea { + Layout.fillWidth: true + placeholderText: Translation.tr("Font family (e.g., Google Sans Flex)") + text: Config.options.background.widgets.clock.digital.font.family + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.background.widgets.clock.digital.font.family = text; + } + } + ConfigSlider { text: Translation.tr("Font weight")