Compare commits

..
30 Commits
Author SHA1 Message Date
mxandClaude Opus 5.5 bc197339fa Add bar spots beside the notch, and Caffeine and Night Light modules
Notch mode gets two more module lists, notch.innerLeft and
notch.innerRight: spots right beside the notch at the same distance on
both sides. They follow the notch's edges as it springs wider for media,
never draw pills (plugins and the tray drop theirs there), and fade out
while the notch is open or widened. Picking a module for one of the four
side spots in Settings -> Notch moves it there from the others.

Caffeine and Night Light are now bar modules too; Night Light polls its
state every 30 s while only the bar watches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 23:27:01 +01:00
mxandClaude Opus 5.5 3f0e31b116 Show Omarchy plugin settings on the Plugins page
Omarchy plugins with a manifest schema get a Settings button like Noctalia
ones: a full form (label, description, control) that edits the same
bar.modules options as the bar cog and applies as you go. A plugin not in
the bar keeps its options on a switched-off entry, which Add to bar turns
on. `plugins settings <id>` over IPC opens it, scrolled into view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 15:00:14 +01:00
mxandClaude Opus 5.5 660fa69be6 Stack cog options so they fit narrow lanes
Each option's label sits on its own line (with a toggle or a slider's
value and unit), and its dropdown, text field or slider spans the card
below it, instead of squeezing fixed-width controls beside the label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:58:02 +01:00
mxandClaude Opus 5.5 1a394955cf Skip choice lists on non-choice cog rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:53:10 +01:00
mxandClaude Opus 5.5 629287f7f3 Open every bar module cog inline
The cog on Clock, Workspaces, Tray, Volume and the metrics modules used
to jump to another settings page while the rest opened in the card. Now
every cog opens its options in the card, editing the same shared
settings as the pages. Modules with more on a page (Volume → OSD,
metrics → Metrics) end with an "All … settings →" link. System has no
options of its own, so it has no cog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:52:31 +01:00
mxandClaude Opus 5.5 f756d37f6d Revert "Let single-module islands drop their pill or notch tab"
This reverts commit 4f078bdf5c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:43:49 +01:00
mxandClaude Opus 5.5 68281b0874 Let plugins drop their bar pill with a "background" setting
A plugin bar widget whose settings say background: "transparent" sits
straight on the bar, like the tray's transparent background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:41:28 +01:00
mxandClaude Opus 5.5 4f078bdf5c Let single-module islands drop their pill or notch tab
A new "Background for single modules" toggle (notch.backSingle, on by
default) lets an island that shows only one module float on the
wallpaper instead of sitting in a circle or a hanging tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:35:25 +01:00
mxandClaude Opus 5.5 f96d16df87 Close windows from the workspace hover preview
Hovering a window tile shows a close button; middle-click closes it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 16:43:33 +01:00
mxandClaude Opus 5.5 d37f9b7121 Hold power actions to confirm instead of a confirm row
Logout, reboot and shut down now fill with accent liquid while held and
run once full; letting go early drains it. A tap hints to hold. Replaces
the Confirm/Cancel rows in the control center tile and dashboard tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 01:05:11 +01:00
mxandClaude Opus 5.5 1e918414d1 Present an empty frame before a notch drop unmaps
A fast close jumps from a visible bead straight to 0 in one tick, and
hiding in that tick left the bead as the layer's last frame, which
Hyprland then faded out. Keep the drawer mapped for a few frames after
closing so an empty frame is drawn first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:35:28 +01:00
mxandClaude Opus 5.5 972ab1120e Let the notch drop vanish fully before its panel unmaps
At high closing speeds the last frame still held a small bead, which
Hyprland's layer fade-out then faded away. The bead now shrinks into
the island and the drawer unmaps once it is empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:27:32 +01:00
mxandClaude Opus 5.5 604424869d Time drawer animations by their direction, so closing speeds apply
The duration was picked from `open`, which can update after the
progress animation has already started, so closes ran at the opening
speed. Use the Behavior's target value instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:09:38 +01:00
mxandClaude Opus 5.5 b03bd77941 Give notch-mode panels their own liquid drop animation
With no bar to unroll from, attached drawers in notch mode now open as a
glass bead that swells out under the clicked island icon on a tapered
neck, flips the wallpaper behind it like a lens, then widens into the
panel and lets go. NotchDrop draws it with a signed-distance shader;
BarDrawer swaps to it in notch mode, and hosts pass the icon's screen x.
The notch-shaped wallpaper picker keeps its own motion.

Notch settings gain panel opening and closing speeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:06:14 +01:00
mxandClaude Opus 5.5 6ad9c0b17e Close panels on a click outside them
Panels relied on Hyprland sending every click to a layer with exclusive
keyboard focus; it does not, so clicking another window or monitor left
the Control Center, Dashboard, notch, Overview, Settings, wallpaper
picker, launcher and plugin panels open. A shared OutsideClick holds a
Hyprland focus grab while a panel is open and closes it when the grab is
cleared. The bars count as inside, so a bar button still toggles its
panel. The old catchers stay as a fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:49:19 +01:00
mxandClaude Opus 5.5 476ad75ba4 Make selected plugin buttons readable with light accents
Omarchy's kit drew a selected button's label in the accent colour on an
accent tint, which vanished with a light accent such as yellow. A resting
selected button is now a solid accent pill with the theme's accent text,
like glassMxrph's own segmented controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:19:44 +01:00
mxandClaude Opus 5.5 eb81d51c07 Preview a workspace live when hovering it in the bar
The bar popout shows the hovered workspace as on its monitor: the
wallpaper and a live capture of each window where it sits. A click on it
switches there. The focused workspace is not previewed. Settings -> Bar
-> Preview on hover turns it off (bar.workspaces.preview).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:01:44 +01:00
mxandClaude Opus 5.5 84c2385cfa Fix plugin colours on Qt 6.12
Qt 6.12's QtQuick exports a Color singleton, which hides the Omarchy and
Noctalia kits' Commons.Color: every Color.foreground read undefined, so
plugin buttons, toggles and text fell back to black. The kits now import
QtQuick 6.8, which predates it, and the installer pins the same version
in plugin files that use Color (reinstall plugins to pick it up).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:59:38 +01:00
mxandClaude Opus 5.5 fc272e45b2 Open the equalizer from the notch's album art, and add notch view commands
Clicking the artwork on the notch's Media page swaps in the dashboard's
EasyEffects equalizer as a full view, the way Performance opens
"Your computer". `glassmxrph notch equalizer|computer` opens the notch
straight onto either view (or the matching dashboard tab with the full bar).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:52:59 +01:00
mxandClaude Opus 5.5 a0de1d2c41 Add a notch island style and tidy the Notch settings page
Islands can float (as before), sit on rounded pills or hang from the top
edge like the notch, both in the notch colour. The Notch page now runs
Notch, Islands, Open notch, Colour, Animation, and the colour change
speed only shows when it does something (glassy when open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:25:04 +01:00
mxandClaude Opus 5.5 049ce180da Centre the notch-mode islands on the notch's clock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:21:43 +01:00
mxandClaude Opus 5.5 8d9903b65e Read notification expire timeouts as milliseconds
Quickshell hands expireTimeout through in ms, so multiplying by 1000 kept
a notify-send -t 3000 popup up for about 50 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:17:04 +01:00
mxandClaude Opus 5.5 065b728af6 Put the whole launcher inside the notch, the pocket-dots way
The launcher's contents (search, results, app grid, commands, clipboard
history and emoji) move into LauncherView, which the launcher window
hosts normally and the notch hosts in notch mode. In the notch it is one
more face of the same shape: the search sits in the band beside the
clock, sized to the band so it never clips, and the notch springs wider
and then down to fit whatever is below (springs as on pocket-dots, scaled
by the notch speed settings). The bar window grows tall only while it is
open, with input still masked to the shapes. The separate window, the
hand-over between them and the compact search are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:19:04 +01:00
mxandClaude Opus 5.5 415b1b3cd6 Grow the notch launcher down once you search
The empty launcher stays in the widened notch, now laid out exactly
like the launcher window's bar. Typing (or the magnifying glass / Down)
hands over to the launcher window, which opens at the notch's size with
the text already in it and only grows down with the results; clearing
the search shrinks it back into the notch. The query and browse state
are shared through ShellState, keys typed during the hand-over carry
across, and the bar keeps its keyboard claim so focus returns on its own.
The launcher window's open state is read from plain properties so it
never maps for a frame on a stale value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:09:46 +01:00
mxandClaude Opus 5.5 1f029922ec Start the notch search's focus grab after the bar takes the keyboard
Started together, Hyprland cleared the grab at once and closed the
search, so SUPER+D did nothing visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:02:09 +01:00
mxandClaude Opus 5.5 5e56abd877 Open the launcher inside the notch in notch mode
The launcher now works like a notification there: the notch pill widens
at its own height, the clock and now playing keep the left end, and a
search field with the top matches as a row of icons fills the right.
Enter launches the highlighted match, Tab and arrows move along the row,
Escape clears then closes, and a click elsewhere closes it. The bar
window takes the keyboard while it is open. Clipboard history and emoji
still open the launcher window, which now only shows for those modes.
NotchGlance moves to components so the launcher and notch can share it
without importing each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 15:00:05 +01:00
mxandClaude Opus 5.5 bb429cb9d9 Open the launcher like a notification in the notch
The clock and now playing no longer fade out: they stay at the left end
of the launcher, with the search to the right of a divider, as the
notification banner does. The bar's pill stays up until the launcher has
drawn a few frames over it, and returns just before the launcher shrinks
home, so opening and closing never show an empty frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:53:27 +01:00
mxandClaude Opus 5.5 af81bf9c90 Keep the notch's colour on the launcher
The launcher used the open notch's fill, so with "Glassy when open" it
turned back to glass. It now keeps the docked notch's colour by default;
notch.launcherMatch ("Launcher keeps notch colour", shown under the
glassy toggle) can turn it off to follow the open notch again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:49:07 +01:00
mxandClaude Opus 5.5 52a0e29959 Grow the launcher out of the notch like the notch panel
In notch mode the launcher now morphs from the collapsed notch with the
notch's own curve and open/close speeds: the shape stays solid, width
leads the height, and the search fades in once it is mostly open. The
notch's time and media fade out as it grows and back in as it closes,
and the pill stays hidden until the launcher has shrunk home. The pill's
contents move to NotchGlance so both can draw them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:46:39 +01:00
mxandClaude Opus 5.5 f65c475455 Show notifications by widening the notch in notch mode
The collapsed notch grows sideways for a new notification: the clock and
media stay at the left end and the banner fills the right, in the notch's
own fill. Left click runs the default action, right click moves it to the
notch's list, hover holds it. The drop-down banners stay off in notch mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:51:13 +01:00
137 changed files with 2876 additions and 1041 deletions

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ unless they provide the tested dependencies. Newer versions must be validated;
- Floating, configurable left/center/right bar on each screen.
- Cog and centered settings surface, active-monitor selection, Escape/outside dismissal.
- Workspaces 1–9, occupied/urgent states and animated active indicator.
- Workspaces 1–9, occupied/urgent states and animated active indicator. Hovering another workspace shows it live in the bar popout, laid out as on its monitor; click it to go there (Settings → Bar → Preview on hover).
- Clock, shared glass controls, custom/system accent, watched Matugen palette input.
- Actual StatusNotifier tray entries with glass DBusMenu menus and recursive submenus.
- 400 ms hover intent, immediate right-click, left/middle activation and scroll forwarding.
+108 -26
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Shapes
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import "../components"
import "../notch"
@@ -18,14 +19,22 @@ PanelWindow {
readonly property int outerMargin: BarDrawers.margin
// The window reaches below the bar (input is masked to the bar) so the
// HyprGlass layer edge is not on the bar's bottom edge, where drawers join.
implicitHeight: BarDrawers.bottom + BarDrawers.overhang
// While the launcher is open in the notch, the window is tall enough for
// it to grow down; input stays masked to the shapes.
readonly property bool tall: notch && (notchPill.searching || notchPill.height > BarDrawers.bottom + 1)
implicitHeight: tall ? Math.ceil(BarDrawers.bottom + notchPill.maxBodyHeight + 40) : BarDrawers.bottom + BarDrawers.overhang
// Notch mode splits the bar into a left island, the centre notch and a
// right island; only those take input.
readonly property bool notch: ShellState.notchMode
// The islands share the notch's centre line (the notch runs from the top
// edge to the bar's bottom), so they line up with its clock.
readonly property int islandY: Math.round((BarDrawers.bottom - BarDrawers.height) / 2)
mask: Region {
item: root.notch ? leftIsland : panel
Region { item: root.notch ? notchPill : null; intersection: Intersection.Combine }
Region { item: root.notch ? rightIsland : null; intersection: Intersection.Combine }
Region { item: root.notch && innerLeft.shown ? innerLeft : null; intersection: Intersection.Combine }
Region { item: root.notch && innerRight.shown ? innerRight : null; intersection: Intersection.Combine }
}
color: Theme.transparent
// Reserve the bar itself (margin + height), not the overhang below it, so
@@ -33,6 +42,29 @@ PanelWindow {
exclusionMode: ExclusionMode.Normal
exclusiveZone: BarDrawers.bottom
WlrLayershell.namespace: "glassMxrph-bar"
// The notch's search takes the keyboard while it is open on this screen;
// a click anywhere else closes it.
readonly property bool searching: notch && ShellState.notchLauncher && ScreenService.current(ShellState.launcherScreen) === screen
WlrLayershell.keyboardFocus: searching ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
// The grab starts once the bar holds the keyboard; started together with
// the focus change, Hyprland clears it at once and the search closes.
property bool grabbing: false
onSearchingChanged: {
grabbing = false;
if (searching)
grabStart.restart();
}
Timer {
id: grabStart
interval: 150
onTriggered: root.grabbing = root.searching
}
HyprlandFocusGrab {
windows: [root]
active: root.grabbing
onCleared: if (root.grabbing)
ShellState.launcherOpen = false
}
Component.onCompleted: TrayService.registerBar(root)
Component.onDestruction: TrayService.unregisterBar(root)
GlassPanel {
@@ -76,34 +108,84 @@ PanelWindow {
}
}
// Notch mode -------------------------------------------------------------
GlassPanel {
id: leftIsland
// No bar behind the modules in notch mode: they float on their own.
color: Theme.transparent
border.width: 0
// Side islands: "float" leaves the modules on the wallpaper, "pill" puts
// them on rounded pills and "notch" hangs them from the top edge like the
// centre notch. Both use the notch's fill.
readonly property string islandStyle: ConfigService.ready ? ConfigService.data.notch.islandStyle : "float"
component Island: GlassPanel {
id: island
property alias row: islandRow
property string side
readonly property bool hanging: root.islandStyle === "notch"
color: root.islandStyle === "pill" ? Theme.notchFill : Theme.transparent
border.width: root.islandStyle === "pill" ? 1 : 0
plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0
x: root.outerMargin
y: root.outerMargin
width: leftRow.implicitWidth + 12
height: BarDrawers.height
radius: BarDrawers.radius
ModuleRow { id: leftRow; position: "left"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "left"); barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
visible: root.notch && ConfigService.ready && ConfigService.data.notch[side].length > 0
// Hanging islands keep their ears on screen.
x: {
const inset = root.outerMargin + (hanging ? BarDrawers.ear : 0);
return side === "left" ? inset : root.width - inset - width;
}
GlassPanel {
id: rightIsland
// No bar behind the modules in notch mode: they float on their own.
color: Theme.transparent
border.width: 0
plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0
x: root.width - root.outerMargin - width
y: root.outerMargin
width: rightRow.implicitWidth + 12
y: root.islandY
width: islandRow.implicitWidth + (root.islandStyle === "float" ? 12 : 24)
height: BarDrawers.height
radius: BarDrawers.radius
ModuleRow { id: rightRow; position: "right"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "right"); barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter }
radius: root.islandStyle === "pill" ? height / 2 : BarDrawers.radius
DrawerShape {
z: -1
visible: island.hanging
x: -BarDrawers.ear
y: -island.y
bodyWidth: island.width
bodyHeight: BarDrawers.bottom
ear: BarDrawers.ear
radius: Math.min(Theme.radius, BarDrawers.bottom / 2)
fillColor: Theme.notchFill
}
ModuleRow {
id: islandRow
position: island.side
active: root.notch
modules: BarLayout.notchModules(root.screen ? root.screen.name : "", island.side)
barScreen: root.screen
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Island { id: leftIsland; side: "left" }
Island { id: rightIsland; side: "right" }
// Spots right beside the notch, one each side at the same distance. Always
// bare (no pill), they ride the notch's edges as it springs wider for media,
// and step aside while it is opened or widened for the launcher or a banner.
readonly property int innerGap: 10
readonly property bool notchBusy: ShellState.notchOpen || notchPill.searching || notchPill.showing
component InnerSlot: Item {
id: slot
property string side
readonly property bool used: root.notch && ConfigService.ready && (ConfigService.data.notch[side] || []).length > 0
readonly property bool shown: used && opacity > 0.01
visible: shown
opacity: used && !root.notchBusy ? 1 : 0
Behavior on opacity {
NumberAnimation {
duration: Theme.duration
easing.type: Easing.OutCubic
}
}
x: side === "innerLeft" ? notchPill.x - root.innerGap - width : notchPill.x + notchPill.width + root.innerGap
y: root.islandY
width: slotRow.implicitWidth
height: BarDrawers.height
ModuleRow {
id: slotRow
position: slot.side === "innerLeft" ? "left" : "right"
active: slot.used
modules: BarLayout.notchModules(root.screen ? root.screen.name : "", slot.side)
barScreen: root.screen
anchors.verticalCenter: parent.verticalCenter
}
}
InnerSlot { id: innerLeft; side: "innerLeft" }
InnerSlot { id: innerRight; side: "innerRight" }
NotchPill {
id: notchPill
barScreen: root.screen
@@ -112,6 +194,6 @@ PanelWindow {
width: implicitWidth
height: implicitHeight
// The open notch window draws over this spot on its own screen.
visible: root.notch && !(ShellState.notchWindow && ShellState.notchWindow.visible && ShellState.notchWindow.screen === root.screen) && !(ShellState.launcherOpen && ScreenService.current(ShellState.launcherScreen) === root.screen) && !(ShellState.wallpaperWindow && ShellState.wallpaperWindow.visible && ShellState.wallpaperWindow.screen === root.screen)
visible: root.notch && !(ShellState.notchWindow && ShellState.notchWindow.visible && ShellState.notchWindow.screen === root.screen) && !(ShellState.wallpaperWindow && ShellState.wallpaperWindow.visible && ShellState.wallpaperWindow.screen === root.screen)
}
}
+27 -3
View File
@@ -5,6 +5,8 @@ import Quickshell.Wayland
import Quickshell.Widgets
import "../components"
import "../core"
import "../overview"
import "../services"
import "../theme"
// Bar hover popout. HyprGlass shapes glass from the layer box, so the surface is
// sized to the card and its geometry animates to morph between anchors.
@@ -16,7 +18,7 @@ PanelWindow {
readonly property var anchorWindow: anchorItem ? anchorItem.QsWindow.window : null
readonly property string kind: PopoutState.kind
// The hovered window's Wayland toplevel; falls back to the focused one.
readonly property var toplevel: PopoutState.payload || ToplevelManager.activeToplevel
readonly property var toplevel: kind === "window" ? PopoutState.payload || ToplevelManager.activeToplevel : null
// Anchors may name a wider placement item (the tray pill, the window list)
// so the drawer stays put while the pointer moves between its entries.
readonly property var anchorObject: anchorItem
@@ -26,8 +28,9 @@ PanelWindow {
readonly property point windowPoint: placementItem && anchorWindow ? placementItem.mapToItem(anchorWindow.contentItem, 0, 0) : Qt.point(0, 0)
readonly property point anchorPoint: Qt.point(windowPoint.x + windowOffsetX, windowPoint.y)
readonly property real availableWidth: screen ? screen.width : 1280
readonly property real targetWidth: Math.ceil(root.kind === "window" ? windowCard.implicitWidth : tip.implicitWidth)
readonly property real targetHeight: Math.ceil(root.kind === "window" ? windowCard.implicitHeight : tip.implicitHeight)
readonly property Item card: kind === "window" ? windowCard : kind === "workspace" ? workspaceCard : tip
readonly property real targetWidth: Math.ceil(card.implicitWidth)
readonly property real targetHeight: Math.ceil(card.implicitHeight)
readonly property real targetX: BarDrawers.clampX(anchorPoint.x + (placementItem ? placementItem.width / 2 : 0), targetWidth + 2 * BarDrawers.ear, availableWidth)
// Morph only while the drawer is out; a cold open grows in place.
readonly property bool morph: drawer.progress > 0.05 && Theme.duration > 0
@@ -93,6 +96,7 @@ PanelWindow {
drawerId: "popout"
screenName: root.screen ? root.screen.name : ""
screenX: root.animX
sourceScreenX: root.anchorPoint.x + (root.placementItem ? root.placementItem.width / 2 : 0)
onHoveredChanged: PopoutState.setPopoutHovered(hovered)
Text {
id: tip
@@ -111,6 +115,26 @@ PanelWindow {
}
}
}
// A hovered workspace in the bar, live.
WorkspacePreview {
id: workspaceCard
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
workspaceId: root.kind === "workspace" ? PopoutState.payload || 0 : 0
live: root.active && root.kind === "workspace"
opacity: root.kind === "workspace" ? 1 : 0
visible: opacity > 0
Behavior on opacity {
NumberAnimation {
duration: Theme.duration / 2
}
}
onChosen: {
const id = workspaceId;
PopoutState.close();
HyprlandService.focusWorkspace(id);
}
}
Column {
id: windowCard
objectName: "windowPreview"
+13
View File
@@ -0,0 +1,13 @@
import QtQuick
import "../../components"
import "../../services"
// Caffeine on the bar: keeps the system awake while lit.
BarToggle {
property var entry: ({})
objectName: "caffeineModule"
tip: "Caffeine"
glyph: CaffeineService.active ? "󰅶" : "󰛊"
on: CaffeineService.active
bare: entry.bare === true
onClicked: CaffeineService.toggle()
}
@@ -0,0 +1,20 @@
import QtQuick
import "../../components"
import "../../services"
// Night Light on the bar. Shows the provider's acknowledged state; while
// only the bar watches, the state is polled slowly.
BarToggle {
property var entry: ({})
readonly property var info: SystemService.state.nightLight || ({
available: false
})
objectName: "nightLightModule"
tip: "Night Light"
glyph: "󰖔"
on: !!info.enabled
bare: entry.bare === true
enabled: !!info.available && !SystemService.acting
onClicked: SystemService.action("nightLight", !info.enabled, false)
Component.onCompleted: SystemService.nightLightWatchers++
Component.onDestruction: SystemService.nightLightWatchers--
}
+7
View File
@@ -23,6 +23,13 @@ GlassPill {
// Omarchy widgets report emptiness through hasVisualContent instead.
readonly property var widgetObject: loader.item
readonly property bool shown: !!widget && (noctalia || widgetObject.hasVisualContent !== false) && widget.implicitWidth > 0
// A plugin can offer a "background" setting; "transparent" drops the
// pill so its widget sits straight on the bar, like the tray's option.
// The spots beside the notch drop it too.
readonly property bool bare: settings.background === "transparent" || entry.bare === true
color: bare ? "transparent" : Qt.alpha(Theme.surface, surfaceOpacity)
border.width: bare ? 0 : 1
plain: bare
implicitHeight: ModuleRegistry.pillHeight
implicitWidth: shown ? Math.ceil(widget.implicitWidth) + 8 : 0
visible: implicitWidth > 0
+2 -1
View File
@@ -7,6 +7,7 @@ import "../../core"
Item {
id: root
property var barScreen
property var entry: ({})
readonly property bool shown: TrayService.options.enabled && TrayService.items.length > 0
implicitWidth: shown ? row.implicitWidth + 12 : 0
implicitHeight: shown ? ModuleRegistry.pillHeight : 0
@@ -14,7 +15,7 @@ Item {
// The whole pill is hover space: gaps between icons keep a hover menu open.
readonly property bool hovered: hover.hovered
HoverHandler { id: hover }
GlassPill { anchors.fill: parent; visible: TrayService.options.background === "pill" }
GlassPill { anchors.fill: parent; visible: TrayService.options.background === "pill" && root.entry.bare !== true }
Row {
id: row; anchors.centerIn: parent; spacing: TrayService.options.spacing
Repeater {
+26 -1
View File
@@ -19,6 +19,10 @@ GlassPill {
// Workspaces shown on other monitors get a faint outline.
readonly property var visibleIds: Hyprland.monitors.values.map(m => m.activeWorkspace ? m.activeWorkspace.id : 0).filter(id => id > 0 && id !== activeId)
readonly property int count: ConfigService.data.bar.workspaces.count
// Hovering a workspace shows it live in the bar popout (off for copies,
// like the one in Settings).
property bool hoverPreview: true
readonly property bool previews: hoverPreview && ConfigService.data.bar.workspaces.preview !== false
readonly property string notchStyle: entry && entry.notch && ConfigService.data.notch ? ConfigService.data.notch.workspaceStyle : "bar"
readonly property string style: notchStyle && notchStyle !== "bar" ? notchStyle : ConfigService.data.bar.workspaces.style || "numbers"
readonly property bool textual: style === "numbers" || style === "roman" || style === "kanji"
@@ -205,12 +209,33 @@ GlassPill {
}
}
}
// The focused workspace is already on screen; the rest preview.
HoverHandler {
enabled: root.previews
onHoveredChanged: {
if (hovered)
PopoutState.hover(slot, slot.active ? "" : "workspace", "", slot.index + 1);
else
PopoutState.unhover(slot);
}
}
Connections {
target: slot
function onActiveChanged() {
if (slot.active && PopoutState.anchor === slot)
PopoutState.close();
}
}
MouseArea {
id: pelletArea
anchors.fill: parent
hoverEnabled: root.pacman
cursorShape: Qt.PointingHandCursor
onClicked: Hyprland.dispatch("hl.dsp.focus({ workspace = '" + (slot.index + 1) + "' })")
onClicked: {
if (PopoutState.anchor === slot)
PopoutState.close();
Hyprland.dispatch("hl.dsp.focus({ workspace = '" + (slot.index + 1) + "' })");
}
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
pragma Singleton
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import qs.compat.noctalia.Services.Power
import "../../../theme" as G
@@ -60,6 +60,11 @@ PanelWindow {
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: open ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
C.OutsideClick {
window: root
active: root.open
onOutside: root.api.closePanel(null)
}
MouseArea {
x: -20000
y: -20000
@@ -79,6 +84,7 @@ PanelWindow {
drawerId: "noctalia-panel-" + (root.api ? root.api.pluginId : "")
screenName: root.screen ? root.screen.name : ""
screenX: root.drawerX
sourceScreenX: root.fromBar ? root.anchorCenter : -1
focus: root.open
Keys.onEscapePressed: root.api.closePanel(null)
@@ -1,7 +1,7 @@
pragma Singleton
import Qt.labs.folderlistmodel
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import Quickshell.Io
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.noctalia.Commons
Item {
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.noctalia.Commons
Item {
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.noctalia.Commons
// Rounded group container using the variant surface color.
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.noctalia.Commons
Item {
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Services.UI
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import Quickshell
import "../Helpers/ColorsConvert.js" as ColorsConvert
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Services.UI
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,5 +1,5 @@
import QtQml
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import "../Helpers/ColorList.js" as ColorList
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Shapes
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import Quickshell.Widgets
import qs.compat.noctalia.Commons
@@ -1,5 +1,5 @@
import Qt.labs.folderlistmodel
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Templates as T
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import Quickshell.Widgets
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Effects
import QtQuick.Layouts
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Window
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Services.UI
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Templates as T
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Templates as T
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Effects
import QtQuick.Layouts
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Services.UI
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Shapes
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import qs.compat.noctalia.Commons
import qs.compat.noctalia.Widgets
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import QtQuick.Layouts
import qs.compat.noctalia.Commons
+1 -1
View File
@@ -1,5 +1,5 @@
pragma Singleton
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import "BorderGeometry.js" as Geometry
// Central border-spec factory for shell surfaces and controls. A spec carries
@@ -14,6 +14,8 @@ QtObject {
property color accent: G.Theme.accentVivid
property color urgent: G.Theme.urgent
property color muted: G.Theme.textSecondary
// Readable text on a solid accent fill (dark on a light accent).
property color accentText: G.Theme.accentText
// Kept for API compatibility; always empty here.
property var shellValues: ({})
+1 -1
View File
@@ -1,5 +1,5 @@
pragma Singleton
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell
import Quickshell.Io
import "../../../theme" as G
+9 -3
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.omarchy.Commons
// The button. One component for every clickable thing in the kit.
@@ -76,6 +76,11 @@ BorderSurface {
readonly property bool hot: mouseArea.containsMouse || hasCursor
readonly property bool _showFocusRing: focusable && activeFocus
readonly property color _selectedColor: Style.selectedStateColor(root.foreground, root.accent)
// glassMxrph: a resting selected button is a solid accent pill with the
// theme's accent text, like the shell's own segmented controls. Accent text
// on an accent tint was unreadable with light accents.
readonly property bool _solidSelected: selected && !hot && !mouseArea.pressed && !_showFocusRing && Qt.colorEqual(root.accent, Color.accent)
readonly property color _labelColor: _solidSelected ? Color.accentText : selected && !hot ? _selectedColor : root.foreground
readonly property var _tooltipBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", root.tooltipBorder, Color.tooltip.border, Math.max(1, Style.normalBorderWidth))
readonly property var _focusBorderSpec: Border.controlSpec("focus", root.foreground, root.accent)
readonly property var _hoverBorderSpec: Border.controlSpec("hover-cursor", root.foreground, root.accent)
@@ -111,6 +116,7 @@ BorderSurface {
color: mouseArea.pressed ? Style.pressedFillFor(root.foreground, root.accent)
: _showFocusRing ? Style.focusFillFor(root.foreground, root.accent)
: hot ? Style.hoverFillFor(root.foreground, root.accent)
: _solidSelected ? Color.accent
: selected ? Style.selectedFillFor(root.foreground, root.accent)
: active ? Style.selectedFillFor(root.foreground, root.accent)
: background
@@ -161,7 +167,7 @@ BorderSurface {
textFormat: Text.PlainText
visible: root.iconText !== ""
text: root.iconText
color: root.selected ? root._selectedColor : root.foreground
color: root._labelColor
font.family: root.fontFamily
font.pixelSize: root.iconSize
rotation: root.iconSpinning ? 0 : root.iconRotation
@@ -181,7 +187,7 @@ BorderSurface {
textFormat: Text.PlainText
visible: root.text !== ""
text: root.text
color: root.selected ? root._selectedColor : root.foreground
color: root._labelColor
font.family: root.fontFamily
font.pixelSize: root.fontSize
font.bold: root.selected
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// Mutually-exclusive row of Buttons — the form-style "pick one of N"
// pattern (bar position top/right/bottom/left, theme preset chips, etc.).
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
Item {
id: root
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// Shared visual chrome for keyboard-and-mouse-navigable items inside a panel.
// Contract: items must NOT read `containsMouse` for color/border. Mouse
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.omarchy.Commons
// Themed single-select dropdown. Trigger row paints with the kit's focus
@@ -134,8 +134,13 @@ PanelWindow {
}
}
// Keyboard mode: Hyprland routes every click to the exclusive layer, so
// outside clicks arrive here with out-of-bounds coordinates (see ControlCenter).
C.OutsideClick {
window: root
active: root.open && root.mode === "keyboard"
extraWindows: root.anchorWindow ? [root.anchorWindow] : []
onOutside: root.close()
}
// Keyboard mode: fallback outside-click catcher (see ControlCenter).
MouseArea {
x: -20000
y: -20000
@@ -160,6 +165,7 @@ PanelWindow {
drawerId: "plugin-popup-" + (root.owner && root.owner.moduleName ? root.owner.moduleName : "")
screenName: root.screen ? root.screen.name : ""
screenX: root.drawerX
sourceScreenX: root.centerOnBar ? -1 : root.anchorScreenPos.x + root.anchorW / 2
// Swallow clicks on the card so they never reach the outside catcher.
MouseArea {
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls as QQC
import QtQuick.Window
import Quickshell.Io
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls as QQC
import qs.compat.omarchy.Commons
Column {
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
Item {
id: root
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import Quickshell.Io
import qs.compat.omarchy.Commons
// Base item for plugin popup widgets. Many first-party plugins expose a bar
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// Small (22×22 by default) icon button used at the right edge of panel rows
// for inline actions — forget network, confirm passphrase, unpair device,
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
Item {
id: root
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// Small-caps-style label that introduces a panel section ("DNS provider",
// "Wi-Fi networks", "Output device", "Paired devices"). Sits between a
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// 1px horizontal divider for panel sections. The alpha-on-foreground tint
// keeps the rule legible against the panel background without competing
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
import "../../../theme" as G
Item {
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.omarchy.Commons
// Styled wrapper around Qt Quick Controls ToolTip. Drop-in: declare inside
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls as QQC
import qs.compat.omarchy.Commons
// Searchable single-select dropdown. Same trigger shape as Dropdown, but
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Layouts
import QtQuick.Shapes
import Quickshell
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import QtQuick.Controls
import qs.compat.omarchy.Commons
// Single-line text input with the kit's focus + selection styling. Inherits
+1 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
// Labeled toggle row: title + optional description on the left, a
// `ToggleSwitch` on the right. Clicking anywhere on the row emits `clicked()`;
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
import "../../../theme" as G
// Bare on/off switch: a track with a sliding knob and no label. This is the
@@ -1,4 +1,4 @@
import QtQuick
import QtQuick 6.8 // 6.12 added a QtQuick Color singleton that hides Commons.Color
import qs.compat.omarchy.Commons
import "../../../theme" as G
Item {
+61 -10
View File
@@ -21,17 +21,42 @@ Item {
// "slide" unrolls out of the bar; "drop" falls into place and away
// downwards; "fade" fades in place; "shrink" grows from / shrinks to nothing.
property string style: "slide"
// Notch mode has no bar to unroll from: attached drawers use NotchDrop
// instead, with the notch's own panel speeds. Opt out with `liquid: false`.
property bool liquid: ShellState.notchMode && attached
// Screen x of the icon the drawer belongs to; the drop comes out under it.
property real sourceScreenX: -1
// Fill and timing; notch mode passes the notch's own.
property color fillColor: Qt.alpha(Theme.surface, Theme.glassOpacity)
property real openDuration: Theme.duration * 1.8
property real closeDuration: Theme.duration
readonly property bool unrolls: style === "slide"
readonly property bool unrolls: style === "slide" && !liquid
property real progress: open ? 1 : 0
readonly property real revealed: unrolls ? Math.max(0, contentHeight * progress) : contentHeight
// Drop moves down on the way in and on the way out.
property real dropFrom: -1
onOpenChanged: dropFrom = open ? -1 : 1
readonly property bool shown: progress > 0.001
// Hyprland fades out a layer's last frame when it unmaps. A fast close can
// jump from a visible bead straight to 0, so the drop stays mapped for a
// few frames after closing to present an empty frame first.
readonly property bool shown: progress > 0.001 || holdEmpty
property bool holdEmpty: false
onOpenChanged: {
dropFrom = open ? -1 : 1;
holdEmpty = !open && liquid && progress > 0.001;
emptyFrames.stop();
}
onProgressChanged: if (holdEmpty && progress <= 0.001)
emptyFrames.restart()
Timer {
id: emptyFrames
interval: 60
onTriggered: root.holdEmpty = false
}
// NotchDrop's content fade: in once the panel has its size, out first.
readonly property real dropContent: {
const t = Math.min(1, Math.max(0, (progress - 0.82) / 0.18));
return t * t * (3 - 2 * t);
}
readonly property bool settled: !anim.running && open
// Input/hover region: the full body as soon as it opens (the pointer may
// reach the drawer before the reveal finishes), the visible part while closing.
@@ -40,12 +65,17 @@ Item {
// Content parent, for items reparented in at runtime.
readonly property alias container: inner
// Enter: emphasized decelerate; exit: emphasized accelerate (Material 3).
// Timing follows where the animation is heading, not `open`: both bindings
// depend on `open`, and the animation can start before the duration updates.
Behavior on progress {
id: motionBehavior
NumberAnimation {
id: anim
duration: root.open ? root.openDuration : root.closeDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: root.open ? [0.05, 0.7, 0.1, 1, 1, 1] : [0.3, 0, 0.8, 0.15, 1, 1]
readonly property bool opening: motionBehavior.targetValue > 0.5
duration: root.liquid ? (anim.opening ? Theme.notchPanelOpenDuration : Theme.notchPanelCloseDuration) : anim.opening ? root.openDuration : root.closeDuration
// NotchDrop eases each phase itself.
easing.type: root.liquid ? Easing.Linear : Easing.BezierSpline
easing.bezierCurve: anim.opening ? [0.05, 0.7, 0.1, 1, 1, 1] : [0.3, 0, 0.8, 0.15, 1, 1]
}
}
implicitWidth: contentWidth + 2 * ear
@@ -69,14 +99,32 @@ Item {
id: motion
width: root.width
height: root.height
opacity: root.style === "fade" || root.style === "drop" ? root.progress : root.style === "shrink" ? Math.min(1, root.progress * 1.5) : 1
scale: root.style === "shrink" ? Math.max(0.001, root.progress) : 1
opacity: root.liquid ? 1 : root.style === "fade" || root.style === "drop" ? root.progress : root.style === "shrink" ? Math.min(1, root.progress * 1.5) : 1
scale: !root.liquid && root.style === "shrink" ? Math.max(0.001, root.progress) : 1
transformOrigin: Item.Center
transform: Translate {
y: root.style === "drop" ? (1 - root.progress) * 28 * root.dropFrom * Math.max(0.3, Theme.intensity) : 0
y: !root.liquid && root.style === "drop" ? (1 - root.progress) * 28 * root.dropFrom * Math.max(0.3, Theme.intensity) : 0
}
Loader {
active: root.liquid
width: root.width
sourceComponent: NotchDrop {
width: root.width
progress: root.progress
bodyX: root.ear
bodyWidth: root.contentWidth
bodyHeight: root.contentHeight
sourceX: root.sourceScreenX < 0 ? -1 : root.sourceScreenX - root.screenX
topSpace: Math.max(0, root.y)
islandBottom: Math.round((BarDrawers.bottom - BarDrawers.height) / 2) + BarDrawers.height - root.y
fillColor: root.fillColor
screenName: root.screenName
screenX: root.screenX
}
}
DrawerShape {
id: shape
visible: !root.liquid
bodyWidth: root.contentWidth
bodyHeight: root.revealed
ear: BarDrawers.ear
@@ -94,7 +142,10 @@ Item {
width: root.contentWidth
height: root.contentHeight
y: root.revealed - root.contentHeight
opacity: root.unrolls ? Math.min(1, root.progress * 1.6) : 1
opacity: root.liquid ? root.dropContent : root.unrolls ? Math.min(1, root.progress * 1.6) : 1
transform: Translate {
y: root.liquid ? (1 - root.dropContent) * 6 : 0
}
}
}
}
+49
View File
@@ -0,0 +1,49 @@
import QtQuick
import "../core"
import "../theme"
// A bar module that is one glyph switching something on and off (Caffeine,
// Night Light). Lit in the accent colour while on. `bare` (the spots beside
// the notch) drops the pill and keeps only a soft hover circle.
Item {
id: root
property string glyph
property bool on: false
property bool bare: false
property string tip: ""
signal clicked
implicitWidth: ModuleRegistry.pillHeight
implicitHeight: ModuleRegistry.pillHeight
opacity: enabled ? 1 : 0.45
GlassPill {
anchors.fill: parent
visible: !root.bare
}
Rectangle {
anchors.centerIn: parent
width: parent.height - 6
height: width
radius: width / 2
color: root.on ? Qt.alpha(Theme.accent, 0.16) : Theme.hover
opacity: area.containsMouse || root.on ? 1 : 0
Behavior on opacity { NumberAnimation { duration: Theme.duration / 2 } }
}
Text {
anchors.centerIn: parent
text: root.glyph
color: root.on ? Theme.accent : Theme.text
font.pixelSize: Math.round(root.height * 0.46)
Behavior on color { ColorAnimation { duration: Theme.duration } }
}
scale: area.pressed ? 1 - 0.06 * Theme.intensity : 1
Behavior on scale { NumberAnimation { duration: Theme.duration / 2; easing.type: Easing.OutCubic } }
MouseArea {
id: area
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
Accessible.role: Accessible.CheckBox
Accessible.name: root.tip
Accessible.checked: root.on
}
+123
View File
@@ -0,0 +1,123 @@
import QtQuick
import "../theme"
// Hold-to-confirm overlay: accent liquid fills the parent shape while
// `holding` is true and emits completed() once full. Let go early and it
// drains. The glyph (or `inkSource`) turns the accent text colour where the
// liquid covers it, so the overlay sits on top of the button's own glyph.
Item {
id: root
property bool holding: false
property int duration: 800
property real radius: Math.min(width, height) / 2
property color color: Theme.accent
property color inkColor: Theme.accentText
// The default ink is a centred glyph matching the button's own.
property string glyph
property string fallback
property int glyphSize: Math.round(Math.min(width, height) * 0.5)
property int glyphWeight: Font.Normal
// Any transparent item the size of this one, e.g. a row of labels.
property Item inkSource: defaultInk
property real progress: 0
property real time: 0
// Stays full for a moment after completing, in case the action fails.
property bool latched: false
readonly property bool active: progress > 0
signal completed
// Let go before full.
signal cancelled
onHoldingChanged: {
if (latched)
return;
if (holding) {
drain.stop();
rise.from = progress;
rise.duration = Math.max(1, (1 - progress) * duration);
rise.start();
} else if (rise.running || progress > 0) {
rise.stop();
if (progress < 1)
cancelled();
root.empty();
}
}
function empty() {
drain.from = progress;
drain.duration = Theme.duration * 2.2 * progress;
drain.start();
}
NumberAnimation {
id: rise
target: root
property: "progress"
to: 1
easing.type: Easing.InOutSine
onFinished: if (root.progress >= 1) {
root.latched = true;
hold.restart();
root.completed();
}
}
NumberAnimation {
id: drain
target: root
property: "progress"
to: 0
easing.type: Easing.OutCubic
}
Timer {
id: hold
interval: 900
onTriggered: {
root.latched = false;
if (!root.holding)
root.empty();
}
}
FrameAnimation {
running: root.active && Theme.intensity > 0
onTriggered: root.time += frameTime
}
Text {
id: defaultInk
width: root.width
height: root.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: Icons.available && root.glyph ? root.glyph : root.fallback
font.family: Icons.available && root.glyph ? Icons.family : ""
font.pixelSize: root.glyphSize
font.weight: root.glyphWeight
color: "white"
}
ShaderEffectSource {
id: inkTexture
sourceItem: root.inkSource
hideSource: root.inkSource === defaultInk
live: true
visible: false
}
ShaderEffect {
anchors.fill: parent
visible: root.active
property point size: Qt.point(width, height)
property real radius: root.radius
property real level: root.progress
property real time: root.time
// Sloshes more while draining than while filling.
property real slosh: Math.max(1.2, root.height * 0.06) * Math.min(1, Theme.intensity) * (root.holding ? 1 : 1.6)
property vector4d fill: Qt.vector4d(root.color.r * root.color.a, root.color.g * root.color.a, root.color.b * root.color.a, root.color.a)
property vector4d ink: Qt.vector4d(root.inkColor.r * root.inkColor.a, root.inkColor.g * root.inkColor.a, root.inkColor.b * root.inkColor.a, root.inkColor.a)
property var glyph: inkTexture
fragmentShader: Qt.resolvedUrl("shaders/holdfill.frag.qsb")
Behavior on slosh {
NumberAnimation {
duration: Theme.duration
}
}
}
}
+124
View File
@@ -0,0 +1,124 @@
import QtQuick
import Quickshell
import "../services"
import "../theme"
// Notch mode's own panel animation (BarDrawer swaps to it while notch mode
// is on). There is no bar to unroll from, so a glass bead swells out under the
// clicked island icon on a tapered neck, works as a lens on the wallpaper
// while it hangs, then widens into the panel and lets go of the island.
// Drawer-local coordinates; `progress` runs linearly, the easing lives here.
Item {
id: root
property real progress: 0
property real bodyX: 0
property real bodyWidth: 300
property real bodyHeight: 200
// Drawer-local x of the icon the panel belongs to; -1 is the middle.
property real sourceX: -1
// Distance from the screen top to the drawer's top edge.
property real topSpace: 0
// Drawer-local y of the islands' bottom edge (negative: above the drawer).
property real islandBottom: -5
property real radius: Theme.radius
property color fillColor: Qt.alpha(Theme.surface, Theme.glassOpacity)
property color borderColor: Theme.border
property string screenName: ""
property real screenX: 0
y: -topSpace
height: topSpace + bodyHeight
visible: progress > 0.002
function clamp(x, a, b) {
return Math.min(b, Math.max(a, x));
}
function lerp(a, b, t) {
return a + (b - a) * t;
}
function sstep(a, b, x) {
const t = clamp((x - a) / (b - a), 0, 1);
return t * t * (3 - 2 * t);
}
function out3(t) {
return 1 - Math.pow(1 - clamp(t, 0, 1), 3);
}
readonly property var g: {
const p = progress, W = bodyWidth, H = bodyHeight, X = bodyX;
const panelR = Math.min(radius, W / 2, H / 2);
// Small panels (tooltips) get a smaller bead.
const bulbMax = Math.max(6, Math.min(40, W / 2 - 2, H / 2 - 2));
const top = islandBottom - 3;
const sx = clamp(sourceX < 0 ? X + W / 2 : sourceX, X + bulbMax + 2, X + W - bulbMax - 2);
const a = out3(p / 0.4); // bead swells and sinks
const b = clamp((p - 0.3) / 0.62, 0, 1); // bead becomes the panel
const eb = out3(b);
const release = sstep(0.8, 0.95, p); // the neck lets go
// The bead shrinks all the way back into the island, so the last frame
// before the layer unmaps is empty (Hyprland fades that frame out).
const grow = sstep(0.015, 0.12, p);
const bulbR = Math.max(0.01, lerp(0, bulbMax, a) * grow);
const hang = Math.max(4, Math.min(66, H - bulbMax - 2 - top));
const beadY = top + lerp(4, hang, a);
// A small sideways swell as it settles, kept inside the ears.
const swell = Math.sin(clamp((b - 0.55) / 0.45, 0, 1) * Math.PI) * 0.03;
const halfW = Math.min(lerp(bulbR, W / 2, eb) * (1 + swell), W / 2 + X - 1);
const halfH = lerp(bulbR, H / 2, eb);
const cx = lerp(sx, X + W / 2, eb), cy = lerp(beadY, H / 2, eb);
return {
stem: Qt.vector4d(sx, top, lerp(6, 11, a) * grow * (1 - release), lerp(bulbR * 0.9, 10, eb) * (1 - release)),
stemH: lerp(beadY, 12, eb) - top,
box: Qt.vector4d(cx, cy, halfW, halfH),
boxR: Math.min(lerp(bulbR, panelR, eb), halfW, halfH),
melt: lerp(20, 6, release),
// Only the bead is a lens; it clears before the panel takes shape.
lens: Qt.vector4d(cx, cy, Math.min(Math.max(halfW, halfH), bulbMax * 1.4), 1 - sstep(0.3, 0.52, p))
};
}
// The wallpaper under this screen, for the lens. Loaded only while the drop
// is out; the pixmap cache keeps it for the next opening.
readonly property var screenObj: Quickshell.screens.find(s => s.name === screenName) || null
readonly property string wallPath: {
if (!screenName || !ConfigService.ready)
return "";
return WallpaperService.observed[screenName] || ConfigService.data.wallpaper.byMonitor[screenName] || "";
}
Image {
id: wallImage
visible: false
asynchronous: true
cache: true
sourceSize.width: 1280
source: root.visible && root.wallPath ? "file://" + root.wallPath : ""
}
readonly property vector4d cover: {
const iw = wallImage.implicitWidth, ih = wallImage.implicitHeight;
const sw = screenObj ? screenObj.width : 1920, sh = screenObj ? screenObj.height : 1080;
if (iw <= 0 || ih <= 0)
return Qt.vector4d(0, 0, 0, 0);
const sc = Math.max(sw / iw, sh / ih), w = iw * sc, h = ih * sc;
return Qt.vector4d(1 / w, 1 / h, (w - sw) / 2 / w, (h - sh) / 2 / h);
}
ShaderEffect {
anchors.fill: parent
opacity: root.sstep(0.005, 0.04, root.progress)
property point size: Qt.point(width, height)
property real topY: -root.topSpace
property vector4d stem: root.g.stem
property real stemH: root.g.stemH
property vector4d box: root.g.box
property real boxR: root.g.boxR
property real melt: root.g.melt
property vector4d lens: root.g.lens
property vector4d fill: Qt.vector4d(root.fillColor.r * root.fillColor.a, root.fillColor.g * root.fillColor.a, root.fillColor.b * root.fillColor.a, root.fillColor.a)
property vector4d edge: Qt.vector4d(root.borderColor.r * root.borderColor.a, root.borderColor.g * root.borderColor.a, root.borderColor.b * root.borderColor.a, root.borderColor.a)
property vector4d cover: root.cover
property point screenOrigin: Qt.point(root.screenX, root.topSpace)
property real hasWall: wallImage.status === Image.Ready ? 1 : 0
property var wall: wallImage
fragmentShader: Qt.resolvedUrl("shaders/notchdrop.frag.qsb")
}
}
+63
View File
@@ -0,0 +1,63 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Widgets
import "../services"
import "../theme"
// What the collapsed notch shows: the time, plus cover art and a small
// visualizer while audio plays. Shared by the pill and by the launcher, which
// fades it out as it grows out of the notch.
Row {
id: root
property bool playing: MediaService.playing
spacing: 10
ClippingRectangle {
visible: root.playing
anchors.verticalCenter: parent.verticalCenter
width: 22
height: 22
radius: 6
color: Theme.fill
Image {
anchors.fill: parent
source: MediaService.artwork
sourceSize: Qt.size(44, 44)
fillMode: Image.PreserveAspectCrop
asynchronous: true
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: Qt.formatDateTime(clock.date, ConfigService.ready && !ConfigService.data.bar.clock.use24Hour ? "h:mm" : "HH:mm")
color: Theme.text
font.pixelSize: 14
font.weight: Font.DemiBold
font.features: {
"tnum": 1
}
}
Row {
visible: root.playing
anchors.verticalCenter: parent.verticalCenter
height: 16
spacing: 2
Repeater {
model: 8
Rectangle {
required property int index
// Every third Cava band, so the eight span the spectrum.
readonly property real level: CavaService.bars[index * 3] || 0
width: 3
height: Math.max(3, 16 * level)
y: 16 - height
radius: 1.5
color: Theme.accent
}
}
}
SystemClock {
id: clock
precision: SystemClock.Minutes
}
}
+45
View File
@@ -0,0 +1,45 @@
import QtQuick
import Quickshell
import Quickshell.Hyprland
import "../services"
// Closes an overlay when you click anywhere outside it. Hyprland does not
// route clicks outside a layer to it, even with exclusive keyboard focus, so
// a focus grab does it: clicking another window, the desktop or another
// monitor clears the grab. The bars count as inside, so the bar button that
// opened a panel still toggles it instead of reopening it.
//
// The grab starts once the overlay holds the keyboard; started together with
// the focus change, Hyprland clears it at once.
Item {
id: root
required property var window
property bool active: false
// More windows that count as inside (e.g. the bar a popup hangs from).
property var extraWindows: []
signal outside
property bool grabbing: false
function sync() {
grabbing = false;
if (active)
start.restart();
else
start.stop();
}
onActiveChanged: sync()
Component.onCompleted: sync()
Timer {
id: start
interval: 150
onTriggered: root.grabbing = root.active
}
HyprlandFocusGrab {
windows: [root.window].concat(TrayService.barWindows, root.extraWindows).filter((w, i, all) => !!w && all.indexOf(w) === i)
active: root.grabbing
onCleared: if (root.grabbing) {
root.grabbing = false;
root.outside();
}
}
}
@@ -0,0 +1,58 @@
#version 440
// Hold-to-confirm fill (HoldFill.qml): accent liquid rises inside a rounded
// shape while a button is held, with a wavy surface, a paler back wave and a
// lit meniscus. The glyph texture is inked in the accent text colour where the
// liquid covers it. Output is premultiplied.
// Rebuild holdfill.frag.qsb with scripts/build-shaders after editing.
layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform buf {
mat4 qt_Matrix;
float qt_Opacity;
vec2 size; // item size, px
float radius; // corner radius, px
float level; // 0 empty .. 1 full
float time; // seconds, drives the waves
float slosh; // wave amplitude, px
vec4 fill; // premultiplied liquid colour
vec4 ink; // premultiplied glyph colour under the liquid
};
layout(binding = 1) uniform sampler2D glyph;
float sdBox(vec2 p, vec2 h, float r) {
r = min(r, min(h.x, h.y));
vec2 q = abs(p) - h + r;
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;
}
void main() {
vec2 p = qt_TexCoord0 * size;
float shape = clamp(0.5 - sdBox(p - size * 0.5, size * 0.5, radius), 0.0, 1.0);
if (shape <= 0.0 || level <= 0.0) {
fragColor = vec4(0.0);
return;
}
// Waves calm down at the very bottom and top so it starts and ends flat.
float amp = slosh * smoothstep(0.0, 0.18, level) * (1.0 - smoothstep(0.82, 1.0, level));
float x = p.x / max(size.x, 1.0) * 6.2831853;
float base = mix(size.y + amp * 2.0, -amp * 2.0, level);
float front = base + amp * (sin(x * 1.3 + time * 4.2) * 0.65 + sin(x * 2.1 - time * 2.9) * 0.35);
float back = base - amp * 0.6 + amp * sin(x * 1.1 - time * 3.4 + 1.7);
float aFront = clamp(p.y - front + 0.5, 0.0, 1.0);
float aBack = clamp(p.y - back + 0.5, 0.0, 1.0) * 0.42;
// Deeper liquid is a touch darker; a bright band sits under the surface.
float depth = clamp((p.y - front) / max(size.y, 1.0), 0.0, 1.0);
vec3 col = fill.rgb * (1.0 - 0.16 * depth);
float meniscus = exp(-max(p.y - front, 0.0) / 1.6) * aFront;
col = mix(col, vec3(fill.a), 0.28 * meniscus);
vec4 c = vec4(fill.rgb, fill.a) * aBack;
c = c * (1.0 - aFront) + vec4(col, fill.a) * aFront;
float g = texture(glyph, qt_TexCoord0).a * aFront;
c = c * (1.0 - g * ink.a) + ink * g;
fragColor = c * shape * qt_Opacity;
}
Binary file not shown.
@@ -0,0 +1,96 @@
#version 440
// Notch-mode panel opening (NotchDrop.qml): a glass bead swells out of the
// island under the clicked icon on a tapered neck, flips the wallpaper behind
// it like a lens, then widens into the panel and the neck lets go.
// The shape is one signed distance field: an uneven capsule (the neck) melted
// into a rounded box (bead, then panel). Geometry comes from QML per frame.
// Output is premultiplied; HyprGlass adds its blur where alpha is above its
// mask threshold, so the lens and fill sit on top of the compositor glass.
// Rebuild notchdrop.frag.qsb with scripts/build-shaders after editing.
layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform buf {
mat4 qt_Matrix;
float qt_Opacity;
vec2 size; // item size, px
float topY; // drawer-local y of the item's top edge
vec4 stem; // neck: top x, top y, top radius, bottom radius
float stemH; // neck length
vec4 box; // bead/panel: centre x, y, half width, half height
float boxR;
float melt; // smooth-union width between neck and bead
vec4 lens; // centre x, y, radius, strength
vec4 fill; // premultiplied
vec4 edge; // premultiplied hairline
vec4 cover; // screen px -> wallpaper uv: scale xy, offset zw
vec2 screenOrigin; // screen position of drawer-local (0, 0)
float hasWall;
};
layout(binding = 1) uniform sampler2D wall;
float sdBox(vec2 p, vec2 c, vec2 h, float r) {
r = min(r, min(h.x, h.y));
vec2 q = abs(p - c) - h + r;
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;
}
// Vertical capsule with different end radii, axis pointing down (+y).
float sdNeck(vec2 p, float r1, float r2, float h) {
h = max(h, abs(r1 - r2) + 0.5);
p.x = abs(p.x);
float b = (r1 - r2) / h;
float a = sqrt(max(1.0 - b * b, 0.0));
float k = dot(p, vec2(-b, a));
if (k < 0.0)
return length(p) - r1;
if (k > a * h)
return length(p - vec2(0.0, h)) - r2;
return dot(p, vec2(a, b)) - r1;
}
float smin(float a, float b, float k) {
k = max(k, 0.001);
float h = max(k - abs(a - b), 0.0) / k;
return min(a, b) - h * h * k * 0.25;
}
float scene(vec2 p) {
float n = stem.z + stem.w > 0.05 ? sdNeck(p - stem.xy, stem.z, stem.w, stemH) : 1e5;
return smin(n, sdBox(p, box.xy, box.zw, boxR), melt);
}
vec3 wallAt(vec2 p) {
return texture(wall, (p + screenOrigin) * cover.xy + cover.zw).rgb;
}
void main() {
vec2 p = qt_TexCoord0 * size + vec2(0.0, topY);
float d = scene(p);
if (d > 1.5) {
fragColor = vec4(0.0);
return;
}
vec2 e = vec2(1.0, 0.0);
vec2 g = vec2(scene(p + e.xy) - scene(p - e.xy), scene(p + e.yx) - scene(p - e.yx));
g = length(g) > 1e-5 ? normalize(g) : vec2(0.0, 1.0); // points outwards
float depth = clamp(-d / 16.0, 0.0, 1.0);
float rim = pow(1.0 - depth, 2.2);
vec4 c = fill;
// The hanging bead is a lens: the wallpaper behind it, upside down.
float la = lens.w * hasWall * (1.0 - smoothstep(lens.z * 0.55, lens.z * 1.05, length(p - lens.xy)));
if (la > 0.002) {
vec2 q = lens.xy - (p - lens.xy) * 0.9 + g * rim * 10.0;
vec3 w = (wallAt(q) * 2.0 + wallAt(q + vec2(1.5, 0.0)) + wallAt(q - vec2(1.5, 0.0))
+ wallAt(q + vec2(0.0, 1.5)) + wallAt(q - vec2(0.0, 1.5))) / 6.0;
c = mix(c, vec4(w * 0.94, 1.0), la * 0.9);
}
// Light from the top left, and the bright lower lip of a drop.
float r6 = pow(1.0 - depth, 6.0);
float hl = r6 * (0.26 * max(0.0, dot(g, normalize(vec2(-0.6, -1.0))))
+ 0.42 * max(0.0, g.y) * (0.35 + 0.65 * lens.w));
c = clamp(c + vec4(hl, hl, hl, hl * 0.6), 0.0, 1.0);
// Hairline, as the other drawers have.
float line = smoothstep(1.2, 0.0, abs(d + 0.5));
c = mix(c, edge + c * (1.0 - edge.a), line);
fragColor = c * clamp(0.5 - d, 0.0, 1.0) * qt_Opacity;
}
Binary file not shown.
+9 -2
View File
@@ -59,7 +59,8 @@
},
"workspaces": {
"count": 9,
"style": "numbers"
"style": "numbers",
"preview": true
},
"cava": {
"bars": 12,
@@ -267,15 +268,21 @@
"mediaFirst": true,
"left": ["workspaces"],
"right": ["tray"],
"innerLeft": [],
"innerRight": [],
"strip": [],
"controls": [],
"opacity": 0,
"color": "",
"glassOnOpen": false,
"launcherMatch": true,
"openSpeed": 100,
"closeSpeed": 100,
"colorSpeed": 100,
"workspaceStyle": "bar"
"panelOpenSpeed": 100,
"panelCloseSpeed": 100,
"workspaceStyle": "bar",
"islandStyle": "float"
},
"dashboard": {
"enabled": true,
+25 -2
View File
@@ -2,14 +2,24 @@ import QtQuick
import "../components"
import "../theme"
// Round icon toggle; filled with the accent while on.
// Round icon toggle; filled with the accent while on. With `hold` it is a
// hold-to-confirm button instead: liquid fills it while held and held() fires
// once full; clicked() is not emitted.
Item {
id: root
property string glyph
property string fallback
property bool checked: false
property int size: 34
property bool hold: false
// Callers may withhold filling, e.g. until an action is pending.
property bool armed: true
readonly property bool holding: hold && armed && area.pressed && area.containsMouse
readonly property bool pressed: area.pressed
readonly property bool filled: fill.active
signal clicked
signal held
signal holdCancelled
implicitWidth: size
implicitHeight: size
opacity: enabled ? 1 : 0.45
@@ -32,12 +42,25 @@ Item {
easing.type: Easing.OutCubic
}
}
HoldFill {
id: fill
anchors.fill: parent
visible: root.hold
holding: root.holding
glyph: root.glyph
fallback: root.fallback
glyphSize: Math.round(root.size * 0.5)
glyphWeight: Font.DemiBold
onCompleted: root.held()
onCancelled: root.holdCancelled()
}
}
MouseArea {
id: area
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
onClicked: if (!root.hold)
root.clicked()
}
}
+8 -4
View File
@@ -245,10 +245,14 @@ PanelWindow {
}
}
// Hyprland routes every pointer event to a layer with exclusive keyboard
// focus, so clicks outside the panel arrive here with out-of-bounds
// coordinates. Qt Quick still delivers them to items extending past the
// window, so this catcher (behind the panel) dismisses on outside clicks.
OutsideClick {
window: root
active: ShellState.controlCenterOpen
onOutside: ShellState.controlCenterOpen = false
}
// Fallback for compositors that route every click to a layer with
// exclusive keyboard focus (out-of-bounds coordinates reach items that
// extend past the window); OutsideClick above covers Hyprland.
MouseArea {
objectName: "controlCenterOutside"
x: -20000
+59 -39
View File
@@ -7,8 +7,8 @@ import "../../services"
import "../../theme"
// Session actions as round buttons, wrapped to the tile. When they do not fit
// it becomes one power button that extends into a list. Confirmation for
// destructive actions extends below the tile.
// it becomes one power button that extends into a list. Destructive actions
// are held to confirm: accent liquid fills the button, then the action runs.
CCModule {
id: root
readonly property var actions: [
@@ -56,10 +56,9 @@ CCModule {
readonly property real buttonSize: labels || plain ? 34 : squeezed
readonly property real buttonWidth: labels ? 52 : buttonSize
readonly property bool fits: labels || plain || squeezed >= 24
readonly property bool pending: PowerService.pending !== ""
round: !fits
hovered: menuArea.containsMouse
extraHeight: (pending || (expanded && !fits)) && extension.item ? extension.implicitHeight + 20 : 0
extraHeight: expanded && !fits && extension.item ? extension.implicitHeight + 20 : 0
Component.onDestruction: PowerService.cancel()
function allowed(id) {
return (id === "lock" && ConfigService.ready && ConfigService.data.lock.enabled) || (!!SystemService.state.power && !!SystemService.state.power[id] && !SystemService.acting);
@@ -78,22 +77,41 @@ CCModule {
ColumnLayout {
id: action
required property var modelData
// A tap on a hold button says to hold it, in place of the label.
property bool hint: false
Layout.preferredWidth: root.buttonWidth
spacing: 3
Timer {
id: hintTimer
interval: 1600
onTriggered: action.hint = false
}
CCToggle {
objectName: "power-" + action.modelData.id
Layout.alignment: Qt.AlignHCenter
size: root.buttonSize
glyph: action.modelData.glyph
fallback: action.modelData.label.charAt(0)
checked: PowerService.pending === action.modelData.id
hold: PowerService.needsHold(action.modelData.id)
armed: PowerService.pending === action.modelData.id
enabled: root.allowed(action.modelData.id)
onClicked: PowerService.request(action.modelData.id)
Accessible.name: action.modelData.label
onPressedChanged: if (hold) {
if (pressed)
PowerService.request(action.modelData.id);
else if (armed)
PowerService.cancel();
}
onHeld: PowerService.confirm()
onHoldCancelled: {
action.hint = true;
hintTimer.restart();
}
Accessible.name: hold ? "Hold to " + action.modelData.label.toLowerCase() : action.modelData.label
}
Text {
visible: root.labels
text: action.modelData.label
text: action.hint ? "Hold" : action.modelData.label
color: Theme.textSecondary
font.pixelSize: 10
elide: Text.ElideRight
@@ -140,8 +158,8 @@ CCModule {
x: 10
y: root.baseHeight + 6
width: root.width - 20
active: root.pending || (root.expanded && !root.fits)
sourceComponent: root.pending ? confirm : menu
active: root.expanded && !root.fits
sourceComponent: menu
}
Component {
id: menu
@@ -152,12 +170,23 @@ CCModule {
Rectangle {
id: item
required property var modelData
readonly property bool hold: PowerService.needsHold(modelData.id)
property bool hint: false
Layout.fillWidth: true
implicitHeight: 30
radius: 8
enabled: root.allowed(modelData.id)
opacity: enabled ? 1 : 0.45
color: itemArea.containsMouse ? Theme.hover : Theme.transparent
Timer {
id: rowHint
interval: 1600
onTriggered: item.hint = false
}
// Transparent, so it doubles as the ink mask for the fill.
Item {
id: rowContent
anchors.fill: parent
RowLayout {
anchors.fill: parent
anchors.leftMargin: 8
@@ -170,52 +199,43 @@ CCModule {
color: Theme.text
}
Text {
text: item.modelData.label
text: item.hint ? "Hold to " + item.modelData.label.toLowerCase() : item.modelData.label
color: Theme.text
font.pixelSize: 12
elide: Text.ElideRight
Layout.fillWidth: true
}
}
}
HoldFill {
anchors.fill: parent
visible: item.hold
radius: item.radius
inkSource: rowContent
holding: item.hold && itemArea.pressed && itemArea.containsMouse && PowerService.pending === item.modelData.id
onCompleted: PowerService.confirm()
onCancelled: {
item.hint = true;
rowHint.restart();
}
}
MouseArea {
id: itemArea
objectName: "power-" + item.modelData.id
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: PowerService.request(item.modelData.id)
onClicked: if (!item.hold)
PowerService.request(item.modelData.id)
onPressedChanged: if (item.hold) {
if (pressed)
PowerService.request(item.modelData.id);
else if (PowerService.pending === item.modelData.id)
PowerService.cancel();
}
}
}
}
}
Component {
id: confirm
ColumnLayout {
spacing: 8
Text {
text: "Confirm " + PowerService.pending + "? Unsaved work may be lost."
color: Theme.text
font.pixelSize: 12
wrapMode: Text.Wrap
Layout.fillWidth: true
}
RowLayout {
Layout.alignment: Qt.AlignRight
spacing: 8
GlassButton {
objectName: "powerCancel"
text: "Cancel"
onClicked: PowerService.cancel()
}
GlassButton {
objectName: "powerConfirm"
text: "Confirm"
accented: true
enabled: !SystemService.acting
onClicked: PowerService.confirm()
}
}
}
}
}
+6 -3
View File
@@ -16,8 +16,9 @@ Singleton {
return [];
return hasOwn(screenName) ? screens[screenName].modules : ConfigService.data.bar.modules;
}
// Entries for a notch module list ("left", "right" or "strip"). Each reuses
// the module's bar entry for its options when the layout has one.
// Entries for a notch module list ("left", "right", "innerLeft",
// "innerRight" or "strip"). Each reuses the module's bar entry for its
// options when the layout has one.
function notchModules(screenName, key) {
if (!ConfigService.ready || !ConfigService.data.notch)
return [];
@@ -28,7 +29,9 @@ Singleton {
id: id,
enabled: true,
notch: true,
position: key === "right" ? "right" : key === "left" ? "left" : "center"
// The spots beside the notch never draw pills.
bare: key === "innerLeft" || key === "innerRight",
position: key === "right" || key === "innerRight" ? "right" : key === "left" || key === "innerLeft" ? "left" : "center"
}));
}
// Saves to the screen's own layout when it has one, else the shared layout.
Loaded 100 of 137 files, more files were not shown because too many files have changed in this diff. Show more