Appearance now opens on Themes: light and dark side by side, each remembering its own choice, over galleries of ten shipped themes — Tokyo Moon and Day joined by Moon Rose, Catppuccin, Nord, Gruvbox and Everforest in both modes. A theme is a complete palette: the catalog lives in themes.json, Theme.qml reads every color token from the active record, and one render pipeline carries it to kitty, tmux, btop, GTK, Vicinae, Firefox's chrome, and the lock screen. The Theme editor builds new ones from four wells — wheel, hex, or eyedropper — with derived surfaces, a saturation slider, debounced fine-tune, and effects that save with the theme. Custom edits finally keep GNOME's accent, kitty's border, and hyprlock in sync. Wallpapers can be video: mpvpaper per output, hardware-decoded, muted and looped, supervised and respawned. Panama owns the pausing — games, battery, and a bar pill for right now — because the compositor rebuilds full-screen blur for every frame a video wallpaper draws. The lock screen gets a still frame. Titlebars stop lying. GNOME apps get close-only on your chosen side, the maximize and double-click settings are gone, the Settings window obeys the same rules, and its titlebar can be turned off entirely. Typography becomes five labeled dropdowns instead of a wall of samples. Contracts updated and written throughout (165 now); per the redesign workflow none were executed — the full sweep runs once at the end. Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
149 lines
4.6 KiB
QML
149 lines
4.6 KiB
QML
// The top bar: edge-to-edge system chrome with no surface of its own. Content
|
|
// floats directly over the desktop, while individual controls still provide
|
|
// hover and press feedback. The entire bar is a hit target so the top-left
|
|
// corner remains a dependable workspace-scroll gesture.
|
|
//
|
|
// Instantiate one per screen:
|
|
//
|
|
// Variants {
|
|
// model: Quickshell.screens
|
|
// Bar {}
|
|
// }
|
|
//
|
|
// Layout mirrors GNOME's: workspaces + vitals left, clock + weather center,
|
|
// media + tray + status cluster right.
|
|
|
|
import Quickshell
|
|
import Quickshell.Wayland
|
|
import QtQuick
|
|
import qs.config
|
|
import qs.modules.clipboard
|
|
import qs.modules.focus
|
|
|
|
PanelWindow {
|
|
id: root
|
|
|
|
// Set by Variants. Left as a plain property (not `required`) so the bar can
|
|
// also be instantiated standalone on the default screen while testing.
|
|
property var modelData: null
|
|
|
|
// Raised when the status cluster is clicked; the shell wires this to the
|
|
// quick settings panel, which this module does not own.
|
|
signal requestQuickSettings
|
|
|
|
// Bound by the shell when an idle inhibitor is held, so the cluster can
|
|
// show the caffeine glyph.
|
|
property alias idleInhibited: statusCluster.idleInhibited
|
|
|
|
screen: root.modelData
|
|
|
|
anchors {
|
|
top: true
|
|
left: true
|
|
right: true
|
|
}
|
|
|
|
// PanelWindow defaults to an opaque white background.
|
|
color: "transparent"
|
|
|
|
implicitHeight: Theme.barHeight
|
|
|
|
exclusiveZone: Theme.barHeight
|
|
|
|
// Stable namespace for compositor inspection and shell diagnostics.
|
|
WlrLayershell.namespace: "qs-bar"
|
|
WlrLayershell.layer: WlrLayer.Top
|
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
|
|
|
// The full-width region is intentional: unlike a floating island, a menu
|
|
// bar owns the screen edge. In particular, Workspaces starts at x=0 and
|
|
// spans the full height so scrolling at the literal corner always works.
|
|
mask: Region {
|
|
item: barContent
|
|
}
|
|
|
|
Item {
|
|
id: barContent
|
|
|
|
anchors.fill: parent
|
|
|
|
// ── Left ────────────────────────────────────────────────────────────
|
|
Row {
|
|
anchors.left: parent.left
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: Theme.itemSpacing
|
|
|
|
Workspaces {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
screen: root.screen
|
|
}
|
|
|
|
AgentUsageWidget {}
|
|
|
|
VitalsWidget {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
|
|
// ── Center ──────────────────────────────────────────────────────────
|
|
Row {
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: 2
|
|
|
|
Clock {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
WeatherWidget {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
|
|
// ── Right ───────────────────────────────────────────────────────────
|
|
Row {
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: Theme.itemSpacing
|
|
|
|
CalendarIndicator {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
HealthIndicator {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
ActivityIndicator {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
WallpaperIndicator {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
FocusIndicator {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
MediaWidget {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
ClipboardWidget {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
Tray {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
StatusCluster {
|
|
id: statusCluster
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
onRequestQuickSettings: root.requestQuickSettings()
|
|
}
|
|
}
|
|
}
|
|
}
|