aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Prefs.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-13 09:35:55 +0100
committerDanilo M. <danix@danix.xyz>2026-11-13 09:35:55 +0100
commit8578a4ce1f31fb5786f10ef4e6f43c4d32fbe484 (patch)
tree69d7315fbd19e4e6c0bca1c4ca9491eef046ba1b /desktop/Prefs.qml
parentbfdc3ce1e1be950dc810d19490d0b0a8ccaea3e8 (diff)
downloadquickshell-8578a4ce1f31fb5786f10ef4e6f43c4d32fbe484.tar.gz
quickshell-8578a4ce1f31fb5786f10ef4e6f43c4d32fbe484.zip
feat(island): configurable pill order, dragged on a settings page
The pills' x positions were written per pill around a fixed centre gap. They now come from one pillX() over Prefs.island.pills: the first two sit left of the screen's centre and the last two right, each a gap past the visible pills nearer the centre, so a hidden player or OBS pill leaves no hole and a panel still widens a pill away from the centre. The default order is the previous layout. The Island bar group gains a Pills page: four fixed slots with the centre marked, a pill dragged takes the nearest slot and the others step aside while it moves. The drag holds the pointer (preventStealing) so the page does not scroll under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Prefs.qml')
-rw-r--r--desktop/Prefs.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml
index 0861258..09960c4 100644
--- a/desktop/Prefs.qml
+++ b/desktop/Prefs.qml
@@ -85,8 +85,9 @@ Singleton {
}
// The island bar's settings (modules/island): the length a new event gets,
- // and that its end keeps from the start, in minutes.
- readonly property var islandDefaults: ({ eventMinutes: 60 })
+ // 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"] })
property var island: islandDefaults
function setIsland(changes) {
root.island = Object.assign({}, root.island, changes);
@@ -167,6 +168,9 @@ Singleton {
root.island = {
eventMinutes: Number.isInteger(isl.eventMinutes) && isl.eventMinutes >= 5 && isl.eventMinutes <= 1440
? isl.eventMinutes : 60,
+ pills: Array.isArray(isl.pills) && isl.pills.length === 4
+ && root.islandDefaults.pills.every(p => isl.pills.includes(p))
+ ? isl.pills.slice() : root.islandDefaults.pills,
};
}