topside-arch 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +217 -2
- package/contrib/aur/.SRCINFO +20 -0
- package/contrib/aur/PKGBUILD +35 -0
- package/contrib/aur/topside-arch.install +28 -0
- package/contrib/icons/hicolor/scalable/apps/topside.svg +28 -0
- package/contrib/systemd/topside.service +10 -0
- package/contrib/themes/sakura.json +31 -0
- package/dist/adapters/claude/attach.js +92 -0
- package/dist/adapters/claude/hook-event.js +173 -0
- package/dist/adapters/claude/one-shot.js +30 -0
- package/dist/adapters/claude/settings.js +78 -0
- package/dist/adapters/claude/usage.js +76 -0
- package/dist/adapters/codex/codex.js +73 -0
- package/dist/adapters/codex/patch.js +39 -0
- package/dist/adapters/codex/usage.js +77 -0
- package/dist/adapters/pi/extension.js +271 -0
- package/dist/adapters/pi/risk-gate.js +256 -0
- package/dist/cli/commands.js +615 -0
- package/dist/cli/hook-log.js +32 -0
- package/dist/cli/main.js +100 -0
- package/dist/daemon/preview.js +70 -0
- package/dist/daemon/processes.js +105 -0
- package/dist/daemon/server.js +437 -0
- package/dist/daemon/session-state.js +179 -0
- package/dist/daemon/store.js +176 -0
- package/dist/dms/setup.js +137 -0
- package/dist/hosts/hosts.js +39 -0
- package/dist/jump/jump.js +199 -0
- package/dist/pill/config.js +92 -0
- package/dist/pill/launch.js +38 -0
- package/dist/sekaipop/setup.js +267 -0
- package/dist/service/unit.js +77 -0
- package/dist/shared/ancestry.js +27 -0
- package/dist/shared/client.js +29 -0
- package/dist/shared/package.js +25 -0
- package/dist/shared/paths.js +69 -0
- package/dist/shared/protocol.js +35 -0
- package/dist/shared/qml-lib.js +33 -0
- package/dist/shared/result.js +6 -0
- package/dist/shared/terminal.js +42 -0
- package/dist/themes/themes.js +84 -0
- package/package.json +49 -4
- package/shell/core/AgentIcon.qml +24 -0
- package/shell/core/AppLogo.qml +48 -0
- package/shell/core/ApprovalRow.qml +197 -0
- package/shell/core/BoardDetail.qml +336 -0
- package/shell/core/BoardList.qml +419 -0
- package/shell/core/BoardNotice.qml +189 -0
- package/shell/core/CardButton.qml +55 -0
- package/shell/core/CardHeader.qml +46 -0
- package/shell/core/ChalkBoard.qml +99 -0
- package/shell/core/CompletionCard.qml +106 -0
- package/shell/core/FlapText.qml +110 -0
- package/shell/core/KeyCap.qml +72 -0
- package/shell/core/Mascot.qml +13 -0
- package/shell/core/MascotBadge.qml +40 -0
- package/shell/core/MascotEffect.qml +40 -0
- package/shell/core/Paper.qml +54 -0
- package/shell/core/PixelGrid.qml +40 -0
- package/shell/core/QuestionRow.qml +161 -0
- package/shell/core/SessionRow.qml +257 -0
- package/shell/core/Stamp.qml +62 -0
- package/shell/core/StatusDots.qml +33 -0
- package/shell/core/Surface.qml +32 -0
- package/shell/core/Tag.qml +22 -0
- package/shell/core/TerminalIcon.qml +34 -0
- package/shell/core/Theme.qml +100 -0
- package/shell/core/TicketDetail.qml +657 -0
- package/shell/core/TicketList.qml +717 -0
- package/shell/core/TicketNotice.qml +198 -0
- package/shell/core/TopsideClient.qml +201 -0
- package/shell/core/UsageLine.qml +106 -0
- package/shell/core/agents.js +79 -0
- package/shell/core/board.js +132 -0
- package/shell/core/hiding.js +68 -0
- package/shell/core/pixels.js +542 -0
- package/shell/core/qmldir +30 -0
- package/shell/core/sounds.js +31 -0
- package/shell/core/themes.js +195 -0
- package/shell/core/ticket.js +170 -0
- package/shell/dms-plugin/TopsideSettings.qml +696 -0
- package/shell/dms-plugin/TopsideWidget.qml +554 -0
- package/shell/dms-plugin/plugin.json +14 -0
- package/shell/pill.qml +279 -0
- package/shell/sekaipop-plugin/Bar.qml +150 -0
- package/shell/sekaipop-plugin/Card.qml +296 -0
- package/shell/sekaipop-plugin/Floating.qml +74 -0
- package/shell/sekaipop-plugin/ListWindow.qml +156 -0
- package/shell/sekaipop-plugin/Popup.qml +70 -0
- package/shell/sekaipop-plugin/Service.qml +418 -0
- package/shell/sekaipop-plugin/ShellLook.qml +43 -0
- package/shell/sekaipop-plugin/StyledCard.qml +194 -0
- package/shell/sekaipop-plugin/place.js +28 -0
- package/shell/sekaipop-plugin/plugin.json +109 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Layouts
|
|
3
|
+
|
|
4
|
+
// A question Claude asked (AskUserQuestion), laid out as Topside's question
|
|
5
|
+
// card: the session's row, "Claude asks", then each question with its
|
|
6
|
+
// options numbered from 1. The terminal shows it too and the first answer
|
|
7
|
+
// wins. One single-choice question answers on click; several questions or a
|
|
8
|
+
// multi-choice one wait for Send.
|
|
9
|
+
ColumnLayout {
|
|
10
|
+
id: card
|
|
11
|
+
required property var question
|
|
12
|
+
property var session: null
|
|
13
|
+
// Show ⌃1…⌃9 beside the options: only where the keys work.
|
|
14
|
+
property bool shortcuts: false
|
|
15
|
+
signal answered(var answers)
|
|
16
|
+
signal openTerminal()
|
|
17
|
+
|
|
18
|
+
readonly property var asked: question.questions || []
|
|
19
|
+
readonly property bool instant: asked.length === 1 && !asked[0].multiSelect
|
|
20
|
+
// picked[i] is the list of labels chosen for question i.
|
|
21
|
+
property var picked: asked.map(() => [])
|
|
22
|
+
readonly property bool complete: picked.every(labels => labels.length > 0)
|
|
23
|
+
|
|
24
|
+
function pick(index, label) {
|
|
25
|
+
const q = asked[index];
|
|
26
|
+
const next = picked.slice();
|
|
27
|
+
const current = next[index];
|
|
28
|
+
next[index] = q.multiSelect
|
|
29
|
+
? (current.includes(label) ? current.filter(l => l !== label) : current.concat([label]))
|
|
30
|
+
: [label];
|
|
31
|
+
picked = next;
|
|
32
|
+
if (instant) submit();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function submit() {
|
|
36
|
+
const answers = {};
|
|
37
|
+
asked.forEach((q, i) => answers[q.question] = picked[i].join(", "));
|
|
38
|
+
answered(answers);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
spacing: 10
|
|
42
|
+
|
|
43
|
+
CardHeader {
|
|
44
|
+
session: card.session
|
|
45
|
+
Layout.fillWidth: true
|
|
46
|
+
onJump: card.openTerminal()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Row {
|
|
50
|
+
spacing: 7
|
|
51
|
+
Text {
|
|
52
|
+
font.family: Theme.font
|
|
53
|
+
text: "💬"
|
|
54
|
+
color: Theme.ask
|
|
55
|
+
font.pixelSize: Theme.s(12)
|
|
56
|
+
}
|
|
57
|
+
Text {
|
|
58
|
+
font.family: Theme.font
|
|
59
|
+
text: "Claude asks"
|
|
60
|
+
color: Theme.ask
|
|
61
|
+
font.pixelSize: Theme.s(12)
|
|
62
|
+
font.weight: Font.DemiBold
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Repeater {
|
|
67
|
+
model: card.asked
|
|
68
|
+
delegate: ColumnLayout {
|
|
69
|
+
id: block
|
|
70
|
+
required property var modelData
|
|
71
|
+
required property int index
|
|
72
|
+
spacing: 6
|
|
73
|
+
Layout.fillWidth: true
|
|
74
|
+
|
|
75
|
+
Text {
|
|
76
|
+
font.family: Theme.font
|
|
77
|
+
text: block.modelData.question + (block.modelData.multiSelect ? " (pick any)" : "")
|
|
78
|
+
color: Theme.fg
|
|
79
|
+
font.pixelSize: Theme.s(15)
|
|
80
|
+
font.weight: Font.DemiBold
|
|
81
|
+
wrapMode: Text.Wrap
|
|
82
|
+
Layout.fillWidth: true
|
|
83
|
+
Layout.bottomMargin: 4
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
Repeater {
|
|
87
|
+
model: block.modelData.options
|
|
88
|
+
delegate: Surface {
|
|
89
|
+
id: option
|
|
90
|
+
required property var modelData
|
|
91
|
+
required property int index
|
|
92
|
+
readonly property bool chosen: card.picked[block.index].includes(modelData.label)
|
|
93
|
+
Layout.fillWidth: true
|
|
94
|
+
implicitHeight: 38
|
|
95
|
+
color: hover.hovered || chosen ? Theme.bgRaised : Theme.surface
|
|
96
|
+
border.color: chosen ? Theme.ask : Theme.line
|
|
97
|
+
|
|
98
|
+
Behavior on color { ColorAnimation { duration: 120 } }
|
|
99
|
+
|
|
100
|
+
Row {
|
|
101
|
+
x: 10
|
|
102
|
+
spacing: 10
|
|
103
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
104
|
+
Rectangle {
|
|
105
|
+
width: 22
|
|
106
|
+
height: 22
|
|
107
|
+
radius: Theme.chipRadius
|
|
108
|
+
color: Qt.rgba(Theme.ask.r, Theme.ask.g, Theme.ask.b, option.chosen ? 0.35 : 0.14)
|
|
109
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
110
|
+
Text {
|
|
111
|
+
anchors.centerIn: parent
|
|
112
|
+
text: option.index + 1
|
|
113
|
+
color: Theme.ask
|
|
114
|
+
font.family: Theme.monoFont
|
|
115
|
+
font.pixelSize: Theme.s(11)
|
|
116
|
+
font.weight: Font.Bold
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
Text {
|
|
120
|
+
font.family: Theme.font
|
|
121
|
+
text: option.modelData.label
|
|
122
|
+
color: Theme.fg
|
|
123
|
+
font.pixelSize: Theme.s(14)
|
|
124
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Text {
|
|
129
|
+
font.family: Theme.font
|
|
130
|
+
visible: card.shortcuts && block.index === 0 && option.index < 9
|
|
131
|
+
text: "⌃" + (option.index + 1)
|
|
132
|
+
color: Theme.fgFaint
|
|
133
|
+
font.pixelSize: Theme.s(11)
|
|
134
|
+
font.weight: Font.Medium
|
|
135
|
+
anchors.right: parent.right
|
|
136
|
+
anchors.rightMargin: 12
|
|
137
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
HoverHandler {
|
|
141
|
+
id: hover
|
|
142
|
+
cursorShape: Qt.PointingHandCursor
|
|
143
|
+
}
|
|
144
|
+
TapHandler {
|
|
145
|
+
onTapped: card.pick(block.index, option.modelData.label)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
CardButton {
|
|
153
|
+
visible: !card.instant
|
|
154
|
+
opacity: card.complete ? 1 : 0.4
|
|
155
|
+
enabled: card.complete
|
|
156
|
+
label: "Send"
|
|
157
|
+
style: "light"
|
|
158
|
+
Layout.alignment: Qt.AlignRight
|
|
159
|
+
onClicked: card.submit()
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Controls
|
|
3
|
+
import QtQuick.Layouts
|
|
4
|
+
import Quickshell
|
|
5
|
+
|
|
6
|
+
// One session, laid out as Topside's SessionRow: the mascot with its effect
|
|
7
|
+
// in a gutter, then three lines. The first holds the heading, then the
|
|
8
|
+
// agent's mark, the terminal's icon and the age; the second your last prompt;
|
|
9
|
+
// the third the status, with a jump button on the right while the pointer is
|
|
10
|
+
// on the row. Under the pointer the row lights up; a click jumps to its
|
|
11
|
+
// terminal. Hovering the heading shows the folder. Hiding asks first
|
|
12
|
+
// (VIA-PARITY §29): the row it was asked from shows the question with Keep
|
|
13
|
+
// and Hide N in its last line, and every row it would take is tinted red
|
|
14
|
+
// and reads "Will hide".
|
|
15
|
+
Item {
|
|
16
|
+
id: row
|
|
17
|
+
required property var session
|
|
18
|
+
signal activated()
|
|
19
|
+
signal hideFolder()
|
|
20
|
+
signal hidePrompt()
|
|
21
|
+
// The host can hide sessions (the DMS widget); the pill can't yet.
|
|
22
|
+
property bool canHide: false
|
|
23
|
+
// An open hide question asked from this row: its text and count.
|
|
24
|
+
property string hideQuestion: ""
|
|
25
|
+
property int hideCount: 0
|
|
26
|
+
// The open hide question would take this row.
|
|
27
|
+
property bool willHide: false
|
|
28
|
+
signal hideConfirmed()
|
|
29
|
+
signal hideKept()
|
|
30
|
+
// What "hide like this" stores: the first prompt's first line, the title
|
|
31
|
+
// without the "…" a cut title ends in.
|
|
32
|
+
readonly property string promptKey: (session.title || "").replace(/…$/, "")
|
|
33
|
+
|
|
34
|
+
readonly property real gutter: 54
|
|
35
|
+
|
|
36
|
+
readonly property string folder: (session.cwd || "").split("/").filter(p => p !== "").pop() || ""
|
|
37
|
+
// A session that hasn't had a prompt yet is titled after its folder.
|
|
38
|
+
// The session's own name (/rename) heads the row; the folder otherwise.
|
|
39
|
+
readonly property string lead: session.name || folder
|
|
40
|
+
readonly property string heading: !session.title || session.title === lead || session.title === folder ? lead : lead + " · " + session.title
|
|
41
|
+
readonly property string statusLine: session.status === "done" ? "Done · click to jump"
|
|
42
|
+
: session.status === "waiting" ? "Waiting for you"
|
|
43
|
+
: session.status === "working" ? (session.activity || "Working…")
|
|
44
|
+
// The session can't report yet: Codex before /hooks, or pi and omp
|
|
45
|
+
// sessions open since before the extension was installed.
|
|
46
|
+
: session.untracked ? row.untrackedLine
|
|
47
|
+
: "Idle"
|
|
48
|
+
readonly property string untrackedLine: session.agent === "pi" ? "Not tracked yet: run /reload in pi"
|
|
49
|
+
: session.agent === "omp" ? "Not tracked yet: restart omp"
|
|
50
|
+
: session.id.indexOf("pid-") === 0 ? "Not tracked yet: run /hooks in Codex" : "Not tracked: run /hooks in Codex"
|
|
51
|
+
readonly property bool hovered: rowHover.hovered
|
|
52
|
+
property string hint: ""
|
|
53
|
+
|
|
54
|
+
// The age only needs minute precision.
|
|
55
|
+
property real now: Date.now()
|
|
56
|
+
Timer {
|
|
57
|
+
interval: 30000
|
|
58
|
+
running: true
|
|
59
|
+
repeat: true
|
|
60
|
+
onTriggered: row.now = Date.now()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function age(since) {
|
|
64
|
+
const minutes = Math.max(0, Math.floor((now - since) / 60000));
|
|
65
|
+
if (minutes < 1) return "<1m";
|
|
66
|
+
if (minutes < 60) return minutes + "m";
|
|
67
|
+
return Math.floor(minutes / 60) + "h";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
implicitWidth: gutter + lines.implicitWidth
|
|
71
|
+
implicitHeight: lines.implicitHeight + 12
|
|
72
|
+
|
|
73
|
+
// Lights up under the pointer, reaching past the row as Topside's does.
|
|
74
|
+
Rectangle {
|
|
75
|
+
anchors.fill: parent
|
|
76
|
+
anchors.leftMargin: -10
|
|
77
|
+
anchors.rightMargin: -10
|
|
78
|
+
radius: Theme.rowRadius
|
|
79
|
+
color: row.willHide ? Qt.rgba(Theme.reminder.r, Theme.reminder.g, Theme.reminder.b, 0.14)
|
|
80
|
+
: Qt.rgba(Theme.fg.r, Theme.fg.g, Theme.fg.b, row.hovered ? 0.07 : 0)
|
|
81
|
+
Behavior on color {
|
|
82
|
+
ColorAnimation { duration: 120 }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
MascotBadge {
|
|
87
|
+
agent: row.session.agent
|
|
88
|
+
status: row.session.status
|
|
89
|
+
cell: 2
|
|
90
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ColumnLayout {
|
|
94
|
+
id: lines
|
|
95
|
+
x: row.gutter
|
|
96
|
+
width: parent.width - row.gutter
|
|
97
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
98
|
+
spacing: 3
|
|
99
|
+
|
|
100
|
+
RowLayout {
|
|
101
|
+
spacing: 8
|
|
102
|
+
Layout.fillWidth: true
|
|
103
|
+
|
|
104
|
+
Text {
|
|
105
|
+
font.family: Theme.font
|
|
106
|
+
text: row.heading
|
|
107
|
+
color: Theme.fg
|
|
108
|
+
font.pixelSize: Theme.title
|
|
109
|
+
font.weight: Font.DemiBold
|
|
110
|
+
elide: Text.ElideRight
|
|
111
|
+
Layout.fillWidth: true
|
|
112
|
+
|
|
113
|
+
HoverHandler {
|
|
114
|
+
id: headingHover
|
|
115
|
+
}
|
|
116
|
+
ToolTip.visible: headingHover.hovered
|
|
117
|
+
ToolTip.delay: 500
|
|
118
|
+
ToolTip.text: (row.session.cwd || "").replace(Quickshell.env("HOME"), "~")
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
RowLayout {
|
|
122
|
+
spacing: 6
|
|
123
|
+
AgentIcon {
|
|
124
|
+
agent: row.session.agent
|
|
125
|
+
size: 18
|
|
126
|
+
}
|
|
127
|
+
TerminalIcon {
|
|
128
|
+
program: row.session.terminal ? row.session.terminal.program : ""
|
|
129
|
+
size: 18
|
|
130
|
+
}
|
|
131
|
+
Tag {
|
|
132
|
+
text: row.age(row.session.startedAt || row.session.updatedAt)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
Text {
|
|
138
|
+
font.family: Theme.font
|
|
139
|
+
visible: (row.session.lastPrompt || "") !== ""
|
|
140
|
+
text: "You: " + row.session.lastPrompt
|
|
141
|
+
color: Theme.fgDim
|
|
142
|
+
font.pixelSize: Theme.content
|
|
143
|
+
elide: Text.ElideRight
|
|
144
|
+
Layout.fillWidth: true
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// The status, with the jump button on its right. As tall with the button
|
|
148
|
+
// as without, so a row doesn't grow under the pointer.
|
|
149
|
+
RowLayout {
|
|
150
|
+
visible: row.hideQuestion === ""
|
|
151
|
+
spacing: 6
|
|
152
|
+
Layout.fillWidth: true
|
|
153
|
+
Layout.preferredHeight: 20
|
|
154
|
+
|
|
155
|
+
Text {
|
|
156
|
+
font.family: Theme.font
|
|
157
|
+
text: row.hint !== "" ? row.hint : row.willHide ? "Will hide" : row.statusLine
|
|
158
|
+
color: row.hint !== "" ? Theme.fg
|
|
159
|
+
: row.willHide ? Theme.reminder
|
|
160
|
+
: row.session.status === "waiting" ? Qt.rgba(Theme.waiting.r, Theme.waiting.g, Theme.waiting.b, 0.85)
|
|
161
|
+
: row.session.status === "done" ? Theme.done
|
|
162
|
+
: Theme.fgFaint
|
|
163
|
+
font.pixelSize: Theme.content
|
|
164
|
+
elide: Text.ElideRight
|
|
165
|
+
horizontalAlignment: row.hint !== "" ? Text.AlignRight : Text.AlignLeft
|
|
166
|
+
Layout.fillWidth: true
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Buttons on the row under the pointer: hide by folder, hide by
|
|
170
|
+
// prompt (once the session has one), then ↗, which jumps like a click
|
|
171
|
+
// on the row. Each one's help takes the status line.
|
|
172
|
+
RowButton {
|
|
173
|
+
visible: row.hovered && row.canHide
|
|
174
|
+
glyph: "⊘"
|
|
175
|
+
help: "Hide sessions in " + row.folder
|
|
176
|
+
onHoveringChanged: row.hint = hovering ? help : ""
|
|
177
|
+
onTapped: row.hideFolder()
|
|
178
|
+
}
|
|
179
|
+
RowButton {
|
|
180
|
+
visible: row.hovered && row.canHide && (row.session.lastPrompt || "") !== ""
|
|
181
|
+
glyph: "≈"
|
|
182
|
+
help: "Hide sessions like “" + row.promptKey + "”"
|
|
183
|
+
onHoveringChanged: row.hint = hovering ? help : ""
|
|
184
|
+
onTapped: row.hidePrompt()
|
|
185
|
+
}
|
|
186
|
+
RowButton {
|
|
187
|
+
visible: row.hovered
|
|
188
|
+
glyph: "↗"
|
|
189
|
+
help: "Jump to its terminal"
|
|
190
|
+
onHoveringChanged: row.hint = hovering ? help : ""
|
|
191
|
+
onTapped: row.activated()
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// The hide question asked from this row, in place of its status.
|
|
196
|
+
RowLayout {
|
|
197
|
+
visible: row.hideQuestion !== ""
|
|
198
|
+
spacing: 6
|
|
199
|
+
Layout.fillWidth: true
|
|
200
|
+
Text {
|
|
201
|
+
font.family: Theme.font
|
|
202
|
+
text: row.hideQuestion
|
|
203
|
+
color: Theme.reminder
|
|
204
|
+
font.pixelSize: Theme.content
|
|
205
|
+
wrapMode: Text.Wrap
|
|
206
|
+
Layout.fillWidth: true
|
|
207
|
+
}
|
|
208
|
+
RowButton {
|
|
209
|
+
glyph: "Keep"
|
|
210
|
+
onTapped: row.hideKept()
|
|
211
|
+
}
|
|
212
|
+
RowButton {
|
|
213
|
+
glyph: "Hide " + row.hideCount
|
|
214
|
+
onTapped: row.hideConfirmed()
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
HoverHandler {
|
|
220
|
+
id: rowHover
|
|
221
|
+
cursorShape: Qt.PointingHandCursor
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
TapHandler {
|
|
225
|
+
onTapped: row.activated()
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
component RowButton: Rectangle {
|
|
229
|
+
id: button
|
|
230
|
+
property string glyph
|
|
231
|
+
property string help
|
|
232
|
+
signal tapped()
|
|
233
|
+
readonly property bool hovering: buttonHover.hovered
|
|
234
|
+
|
|
235
|
+
implicitWidth: Math.max(26, glyphText.implicitWidth + 12)
|
|
236
|
+
implicitHeight: 20
|
|
237
|
+
radius: Theme.chipRadius
|
|
238
|
+
color: Qt.rgba(Theme.fg.r, Theme.fg.g, Theme.fg.b, buttonHover.hovered ? 0.24 : 0.17)
|
|
239
|
+
Text {
|
|
240
|
+
id: glyphText
|
|
241
|
+
font.family: Theme.font
|
|
242
|
+
anchors.centerIn: parent
|
|
243
|
+
text: button.glyph
|
|
244
|
+
color: Theme.fg
|
|
245
|
+
opacity: buttonHover.hovered ? 0.95 : 0.7
|
|
246
|
+
font.pixelSize: Theme.s(12)
|
|
247
|
+
font.weight: Font.DemiBold
|
|
248
|
+
}
|
|
249
|
+
HoverHandler {
|
|
250
|
+
id: buttonHover
|
|
251
|
+
cursorShape: Qt.PointingHandCursor
|
|
252
|
+
}
|
|
253
|
+
TapHandler {
|
|
254
|
+
onTapped: button.tapped()
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import "ticket.js" as Ticket
|
|
3
|
+
|
|
4
|
+
// A rubber stamp to answer a ticket with: its word in a box of ink, a little
|
|
5
|
+
// crooked. The pointer inks it in. `sub` is a quiet hint beside the word
|
|
6
|
+
// (the shortcut).
|
|
7
|
+
Rectangle {
|
|
8
|
+
id: stamp
|
|
9
|
+
property string label: ""
|
|
10
|
+
property string sub: ""
|
|
11
|
+
property color ink: Ticket.ink
|
|
12
|
+
property real tilt: -1
|
|
13
|
+
property int size: 12
|
|
14
|
+
signal clicked()
|
|
15
|
+
// A row of stamps sizes them all to its widest (TicketDetail.qml).
|
|
16
|
+
readonly property bool isKey: true
|
|
17
|
+
|
|
18
|
+
implicitWidth: row.implicitWidth + Math.round(size * 1.4)
|
|
19
|
+
implicitHeight: row.implicitHeight + Math.round(size * 0.8)
|
|
20
|
+
radius: 4
|
|
21
|
+
color: hover.hovered ? ink : "transparent"
|
|
22
|
+
border.width: 2
|
|
23
|
+
border.color: ink
|
|
24
|
+
rotation: tilt
|
|
25
|
+
scale: tap.pressed ? 0.93 : 1
|
|
26
|
+
Behavior on scale {
|
|
27
|
+
NumberAnimation { duration: 80 }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Row {
|
|
31
|
+
id: row
|
|
32
|
+
anchors.centerIn: parent
|
|
33
|
+
spacing: Math.round(stamp.size * 0.5)
|
|
34
|
+
Text {
|
|
35
|
+
id: word
|
|
36
|
+
text: stamp.label.toUpperCase()
|
|
37
|
+
color: hover.hovered ? Ticket.paper : stamp.ink
|
|
38
|
+
font.family: Theme.monoFont
|
|
39
|
+
font.pixelSize: stamp.size
|
|
40
|
+
font.weight: Font.Bold
|
|
41
|
+
font.letterSpacing: stamp.size / 9
|
|
42
|
+
}
|
|
43
|
+
Text {
|
|
44
|
+
visible: stamp.sub !== ""
|
|
45
|
+
anchors.baseline: word.baseline
|
|
46
|
+
text: stamp.sub
|
|
47
|
+
color: hover.hovered ? Ticket.paper : stamp.ink
|
|
48
|
+
opacity: 0.6
|
|
49
|
+
font.family: Theme.monoFont
|
|
50
|
+
font.pixelSize: Math.round(stamp.size * 0.8)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
HoverHandler {
|
|
55
|
+
id: hover
|
|
56
|
+
cursorShape: Qt.PointingHandCursor
|
|
57
|
+
}
|
|
58
|
+
TapHandler {
|
|
59
|
+
id: tap
|
|
60
|
+
onTapped: stamp.clicked()
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Effects
|
|
3
|
+
|
|
4
|
+
// Topside's sign: three status dots side by side (working, waiting, done),
|
|
5
|
+
// each with a soft glow in its own color, as on the Mac app's icon. Drawn
|
|
6
|
+
// straight on the host's surface, without the icon's black notch, so it
|
|
7
|
+
// sits in any bar and follows the theme. Offline, all three are red.
|
|
8
|
+
Row {
|
|
9
|
+
id: dots
|
|
10
|
+
property real size: 8
|
|
11
|
+
property bool offline: false
|
|
12
|
+
|
|
13
|
+
spacing: Math.round(size * 0.5)
|
|
14
|
+
|
|
15
|
+
Repeater {
|
|
16
|
+
model: dots.offline ? [Theme.reminder, Theme.reminder, Theme.reminder] : [Theme.working, Theme.waiting, Theme.done]
|
|
17
|
+
delegate: Rectangle {
|
|
18
|
+
required property color modelData
|
|
19
|
+
width: dots.size
|
|
20
|
+
height: width
|
|
21
|
+
radius: width / 2
|
|
22
|
+
color: modelData
|
|
23
|
+
layer.enabled: true
|
|
24
|
+
layer.effect: MultiEffect {
|
|
25
|
+
shadowEnabled: true
|
|
26
|
+
shadowColor: Qt.rgba(modelData.r, modelData.g, modelData.b, 0.6)
|
|
27
|
+
shadowBlur: 0.6
|
|
28
|
+
shadowHorizontalOffset: 0
|
|
29
|
+
shadowVerticalOffset: 0
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
|
|
3
|
+
// A card's face: fill, outline and corners from Theme, plus a hard drop
|
|
4
|
+
// shadow when the look has one (shadowOffset > 0). The shadow is a plain
|
|
5
|
+
// offset rectangle behind the face, so it needs no shader. What goes inside
|
|
6
|
+
// lands on the face, which clips it.
|
|
7
|
+
Item {
|
|
8
|
+
default property alias content: face.data
|
|
9
|
+
property alias color: face.color
|
|
10
|
+
property alias border: face.border
|
|
11
|
+
property alias radius: face.radius
|
|
12
|
+
|
|
13
|
+
Rectangle {
|
|
14
|
+
visible: Theme.shadowOffset > 0
|
|
15
|
+
x: Theme.shadowOffset
|
|
16
|
+
y: Theme.shadowOffset
|
|
17
|
+
width: parent.width
|
|
18
|
+
height: parent.height
|
|
19
|
+
radius: face.radius
|
|
20
|
+
color: Theme.shadowColor
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Rectangle {
|
|
24
|
+
id: face
|
|
25
|
+
anchors.fill: parent
|
|
26
|
+
radius: Theme.cardRadius
|
|
27
|
+
color: Theme.surface
|
|
28
|
+
border.color: Theme.line
|
|
29
|
+
border.width: Theme.lineWidth
|
|
30
|
+
clip: true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
|
|
3
|
+
// A small label on a raised square: the terminal's name, the session's age.
|
|
4
|
+
Rectangle {
|
|
5
|
+
property alias text: label.text
|
|
6
|
+
property color foreground: Theme.fgDim
|
|
7
|
+
|
|
8
|
+
implicitWidth: label.implicitWidth + 14
|
|
9
|
+
implicitHeight: 20
|
|
10
|
+
radius: Theme.chipRadius
|
|
11
|
+
color: Theme.bgRaised
|
|
12
|
+
|
|
13
|
+
Text {
|
|
14
|
+
id: label
|
|
15
|
+
font.family: Theme.font
|
|
16
|
+
anchors.centerIn: parent
|
|
17
|
+
color: parent.foreground
|
|
18
|
+
font.pixelSize: Theme.s(11)
|
|
19
|
+
font.weight: Font.Medium
|
|
20
|
+
font.features: { "tnum": 1 }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import Quickshell
|
|
3
|
+
import "agents.js" as Agents
|
|
4
|
+
|
|
5
|
+
// The terminal's own icon from its desktop entry; its name as a tag when no
|
|
6
|
+
// entry is installed.
|
|
7
|
+
Item {
|
|
8
|
+
id: root
|
|
9
|
+
property string program: ""
|
|
10
|
+
property real size: 18
|
|
11
|
+
readonly property var terminal: Agents.terminal(program)
|
|
12
|
+
readonly property var entry: terminal.desktop !== "" ? (DesktopEntries.byId(terminal.desktop) ?? DesktopEntries.heuristicLookup(terminal.desktop)) : null
|
|
13
|
+
readonly property string iconPath: entry && entry.icon ? Quickshell.iconPath(entry.icon, true) : ""
|
|
14
|
+
|
|
15
|
+
visible: program !== ""
|
|
16
|
+
implicitWidth: iconPath !== "" ? size : tag.implicitWidth
|
|
17
|
+
implicitHeight: size
|
|
18
|
+
|
|
19
|
+
Image {
|
|
20
|
+
visible: root.iconPath !== ""
|
|
21
|
+
anchors.fill: parent
|
|
22
|
+
source: root.iconPath
|
|
23
|
+
sourceSize.width: root.size * 2
|
|
24
|
+
sourceSize.height: root.size * 2
|
|
25
|
+
smooth: true
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Tag {
|
|
29
|
+
id: tag
|
|
30
|
+
visible: root.iconPath === ""
|
|
31
|
+
text: root.terminal.name
|
|
32
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
33
|
+
}
|
|
34
|
+
}
|