aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Prefs.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/Prefs.qml')
-rw-r--r--desktop/Prefs.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml
index 09960c4..1d24796 100644
--- a/desktop/Prefs.qml
+++ b/desktop/Prefs.qml
@@ -14,6 +14,7 @@ pragma Singleton
import Quickshell
import Quickshell.Io
import QtQuick
+import "island/calendar/Cal.js" as Cal
// Preferences that must survive a reboot, in one JSON file under the state
// home. Only the shell writes it, which is why it is not in ~/.config.
@@ -86,8 +87,10 @@ Singleton {
// The island bar's settings (modules/island): the length a new event gets,
// and that its end keeps from the start, in minutes; the pills left to
- // right, the first two left of the screen's centre, the last two right.
- readonly property var islandDefaults: ({ eventMinutes: 60, pills: ["media", "clock", "status", "obs"] })
+ // right, the first two left of the screen's centre, the last two right; the
+ // clock, 12-hour or not, and the date's format (island/calendar/Cal.js).
+ readonly property var islandDefaults: ({ eventMinutes: 60, pills: ["media", "clock", "status", "obs"],
+ h12: false, dateFormat: Cal.DATE_FORMATS[0] })
property var island: islandDefaults
function setIsland(changes) {
root.island = Object.assign({}, root.island, changes);
@@ -171,6 +174,8 @@ Singleton {
pills: Array.isArray(isl.pills) && isl.pills.length === 4
&& root.islandDefaults.pills.every(p => isl.pills.includes(p))
? isl.pills.slice() : root.islandDefaults.pills,
+ h12: isl.h12 === true,
+ dateFormat: Cal.shortDateFmt(isl.dateFormat),
};
}