Files
skygqts/workspace-manager/Theme.qml
T
2026-10-16 15:18:18 -04:00

170 lines
7.9 KiB
QML

import QtQuick
QtObject {
readonly property color barBg: "#731a1e2a"
readonly property color barBorder: "#40ffffff"
readonly property color textColor: "#ffffff"
readonly property color labelColor: "#a9b1d6"
readonly property color fieldBg: "#4d0b0e14"
readonly property color fieldBorder: "#7aa2f7"
readonly property color cardBg: "#661a1e2a"
readonly property color buttonBg: "#7aa2f7"
readonly property color buttonText: "#0b0e14"
// ── glass ───────────────────────────────────────────────────────────
// Bars and cards are see-through glass. A rim catches the light along
// the top and fades toward the bottom, a soft shine lies over the top
// half, and a shadow sits underneath.
readonly property color glassRimTop: "#8cffffff"
readonly property color glassRimBottom: "#14ffffff"
readonly property color glassShine: "#29ffffff"
// Selected glass: a blue tint and a blue rim.
readonly property color glassSelectedTint: "#66283a5e"
readonly property color glassSelectedRimBottom: "#807aa2f7"
readonly property color glassShadow: "#59000000"
readonly property real glassShadowBlur: 24
readonly property real glassShadowOffset: 8
readonly property real cornerRadius: 12
readonly property real barHeight: 84
readonly property real barWidth: 800
// Space between the bar edge and the boxes inside it.
readonly property real barPadding: 18
readonly property real barSpacing: 14
// Space between a box edge and its own text.
readonly property real fieldPadding: 14
readonly property real logoSize: 36
readonly property real fontSize: 24
// Fullscreen dim behind the workspace carousel.
readonly property color backdrop: "#0d0b0e14"
readonly property real cardWidth: 280
readonly property real cardHeight: 220
readonly property real cardSpacing: 36
readonly property real cardRadius: 16
readonly property real monitorLabelSize: 18
// Distance from the top of the screen to each monitor's name,
// which sits above the search bar.
readonly property real monitorLabelTop: 20
readonly property real monitorNameSize: 22
readonly property real monitorNamePadding: 25
// Distance from the top of the screen to the search bar.
readonly property real searchBarTop: 76
// Each monitor is a column of its workspaces. One step between
// monitors (sideways), and one step between workspaces (down).
readonly property real carouselStepX: cardWidth + 120
readonly property real carouselStepY: cardHeight + cardSpacing
readonly property real carouselFadeStep: 0.35
readonly property real carouselMaxFade: 0.85
readonly property real carouselScaleStep: 0.08
readonly property real carouselMaxScaleReduction: 0.3
readonly property real carouselMonitorFadeStep: 0.4
readonly property real carouselMonitorMaxFade: 0.72
readonly property int carouselDuration: 220
// A swipe must cross this many pixels (or angleDelta units) before the
// selection steps once.
readonly property int swipeThreshold: 120
// Window bubbles inside a workspace card.
readonly property real windowIconSize: 20
readonly property real windowFontSize: 16
readonly property real windowRowSpacing: 6
readonly property int maxWindowRows: 3
// Key hints. They sit under the search bar, the selected workspace and
// the front window, this far below each.
readonly property real hintSize: 12
readonly property real hintGap: 8
readonly property int hintFadeDuration: 160
// ── window loop ─────────────────────────────────────────────────────
// Live previews on Hyprland.
readonly property bool livePreviews: true
// Still snapshots taken when the loop opens. On Hyprland they back up the
// live previews and use grim. On niri they use niri's own screenshot,
// which always shows a notification and replaces the clipboard.
readonly property bool snapshotPreviewsHyprland: true
readonly property bool snapshotPreviewsNiri: true
// While the loop is open, other monitors sit this far past its edge,
// and workspaces above and below sit this far from the front window.
// The gap below leaves room for the key hint under the window.
readonly property real loopEdgeGap: 40
readonly property real loopWorkspaceGapAbove: 10
readonly property real loopWorkspaceGapBelow: 30
// Extra fade on those cards while the loop is open. The workspaces
// right above and below use loopNeighbourFade.
readonly property real loopHiddenFade: 0.75
readonly property real loopNeighbourFade: 0.9
// Tilt in degrees while the loop is open, so the other cards look part
// of the same 3D scene. Workspaces above and below lean back as if on a
// drum; other monitors turn to face the middle.
readonly property real loopTiltX: 35
readonly property real loopTiltY: 30
// Size the loop grows from as it appears.
readonly property real loopStartScale: 0.6
readonly property int loopExpandDuration: 280
readonly property color loopCardBg: "#991a1e2a"
readonly property real loopCardWidth: 440
readonly property real loopCardHeight: 320
readonly property real loopCardRadius: 16
readonly property real loopCardPadding: 14
readonly property color loopPreviewBg: "#660b0e14"
readonly property real loopPreviewRadius: 8
// Big icon shown in the preview area when there is no picture.
readonly property real loopIconSize: 96
// Title row under the preview.
readonly property real loopRowHeight: 44
readonly property real loopRowIconSize: 32
readonly property real loopTitleSize: 18
readonly property real loopAppSize: 14
readonly property real loopEmptySize: 22
// The loop is as long as the cards laid side by side, plus this gap
// between them. Its radius stays inside these limits.
readonly property real loopCardGap: 60
readonly property real loopMinRadius: 260
// Share of the screen width the loop may take on each side of center.
readonly property real loopMaxRadiusShare: 0.42
// About how far round the loop, in degrees, a card turns edge-on and
// flips to its inner face. It is moved to fall between two cards, so
// none rests edge-on. Bigger means flatter cards at the sides.
readonly property real loopFlipAngle: 120
// How strongly far cards shrink. Bigger means a flatter loop.
readonly property real loopFocalLength: 1400
// How far the back of the loop is raised, so it shows above the front.
readonly property real loopBackLift: 200
// Opacity of the card at the very back.
readonly property real loopBackOpacity: 0.35
// Extra darkening of the back half, 0 to 1.
readonly property real loopBackShade: 0.55
readonly property int loopTurnDuration: 320
// When Up/Down switch workspaces inside the loop, the old windows fold
// into a small box that slides away, and the new ones slide in as a box
// from this far away and open out.
readonly property real loopSwitchOffset: 160
readonly property int loopSwitchDuration: 400
readonly property int loopCollapseDuration: 300
// Size of that box, next to a full window. It stays at least as big as
// the workspace cards right above and below the loop.
readonly property real loopBoxScale: {
const shrink = 1 - Math.min(carouselScaleStep, carouselMaxScaleReduction);
return Math.max(cardWidth * shrink / loopCardWidth, cardHeight * shrink / loopCardHeight);
}
// The new windows start opening this long after the old ones start folding.
readonly property int loopExpandDelay: 150
// A window preview grows out from its icon once the picture is ready.
readonly property int loopPreviewGrowDuration: 700
}