Files
dotfiles/quickshell/launcher/ResultRow.qml
T
nvrlandClaude Opus 5.5 18091a7109 theme: YoRHa dark — NieR:Automata interface on the space-1 wallpaper
Replaces the Persona x Mocha rice. NieR's menu language is kept whole —
plain rectangles, hairline rules, letter-spaced upright capitals, a square
marker on the current row, corner ticks round panels, and selection shown
by inverting the row — but the colours come from ~/.wallpapers/space-1.jpg
rather than from the game's beige: the grey-green void as the ground, the
suit's sage grey as text, the planet's white as the one accent, and the
hull's red indicator lights as the alarm.

The Persona geometry is switched off rather than ripped out: Theme.skew
and Theme.cut are 0, so P5Panel, Skew and Geom collapse to rectangles.
Overshoot easing, italics and black weights are gone shell-wide.

New, borrowed from caelestia's screen border: bar/Frame.qml draws the bar,
the rail and a thin left/bottom band as one hull on the bottom layer, with
the desktop as a rounded opening cut out of it. Frame also owns all four
exclusive zones, so the bar and rail are placed from the screen edge.

Hyprland moves to 1px borders lit from the planet white into grey, a soft
wide shadow and gaps measured from the opening. Alacritty, fish and dunst
get matching YoRHa palettes. Neovim, GTK/Qt and btop are still Mocha.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:10:53 +02:00

133 lines
4.3 KiB
QML

import QtQuick
import Quickshell
import Quickshell.Widgets
import "root:/config"
import "root:/components"
// One line in the result list. Rest is bare — no fill, no border — so a list of
// forty apps reads as a column of text rather than forty boxes. Only the
// selected row gets a slab, and it takes the full inverted treatment: white
// fill, black text. That is the strongest contrast the palette has, which is
// what the row you are about to launch should be wearing.
Item {
id: root
required property var entry
required property bool selected
property bool hovered: false
property string badge: ""
signal activated
signal pinRequested
implicitHeight: 46
// Selection slab. Leans like everything else; drawn as a Skew so the
// diagonals get analytic antialiasing instead of a pixel staircase.
Skew {
anchors.fill: parent
anchors.leftMargin: -Theme.padS
anchors.rightMargin: -Theme.padS
color: root.selected ? Theme.treatmentSelectedFill : "transparent"
opacity: root.selected ? 1 : 0
Behavior on opacity {
NumberAnimation { duration: Theme.durFast; easing.type: Easing.OutQuad }
}
}
// Hover is an accent tick in the gutter rather than a second slab, so
// pointing at a row cannot be mistaken for selecting it.
Skew {
anchors.verticalCenter: parent.verticalCenter
x: -Theme.padS
width: 3
height: root.hovered && !root.selected ? parent.height - 10 : 0
color: Theme.accent
Behavior on height {
NumberAnimation { duration: Theme.durFast; easing.type: Easing.OutCubic }
}
}
Row {
anchors.fill: parent
anchors.leftMargin: Theme.padM
anchors.rightMargin: Theme.padM
spacing: Theme.padM
IconImage {
anchors.verticalCenter: parent.verticalCenter
implicitSize: 26
asynchronous: true
source: root.entry.icon ? Quickshell.iconPath(root.entry.icon, true) : ""
visible: source !== ""
}
// Entries with no icon still need to occupy the same gutter, or their
// labels wander left and the column stops being a column.
Icon {
anchors.verticalCenter: parent.verticalCenter
width: 26
text: "󰣆"
color: root.selected ? Theme.treatmentSelectedText : Theme.muted
visible: !root.entry.icon && root.entry.kind !== "dmenu"
}
Column {
anchors.verticalCenter: parent.verticalCenter
width: parent.width - 26 - Theme.padM * 2 - trailing.width
spacing: -1
Text {
width: parent.width
text: root.entry.name
elide: Text.ElideRight
color: root.selected ? Theme.treatmentSelectedText : Theme.text
font.family: Theme.fontMono
font.pixelSize: Theme.fsBody
font.weight: root.selected ? Font.Bold : Theme.weightBody
renderType: Text.NativeRendering
}
Text {
width: parent.width
text: root.entry.sub
visible: text !== ""
elide: Text.ElideRight
color: root.selected ? Theme.alpha(Theme.ink, 0.6) : Theme.muted
font.family: Theme.fontMono
font.pixelSize: Theme.fsMicro
renderType: Text.NativeRendering
}
}
}
// Trailing hint: the key that fires this row. Only the selected row shows
// one, because a column of ⏎ glyphs tells you nothing.
Text {
id: trailing
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Theme.padM
text: root.selected ? root.badge : ""
color: Theme.alpha(Theme.ink, 0.55)
font.family: Theme.fontMono
font.pixelSize: Theme.fsMicro
font.letterSpacing: 2
renderType: Text.NativeRendering
}
HoverHandler {
onHoveredChanged: root.hovered = hovered
}
TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onTapped: (point, button) => {
if (button === Qt.RightButton) root.pinRequested();
else root.activated();
}
}
}