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.
Files changed (95) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +217 -2
  3. package/contrib/aur/.SRCINFO +20 -0
  4. package/contrib/aur/PKGBUILD +35 -0
  5. package/contrib/aur/topside-arch.install +28 -0
  6. package/contrib/icons/hicolor/scalable/apps/topside.svg +28 -0
  7. package/contrib/systemd/topside.service +10 -0
  8. package/contrib/themes/sakura.json +31 -0
  9. package/dist/adapters/claude/attach.js +92 -0
  10. package/dist/adapters/claude/hook-event.js +173 -0
  11. package/dist/adapters/claude/one-shot.js +30 -0
  12. package/dist/adapters/claude/settings.js +78 -0
  13. package/dist/adapters/claude/usage.js +76 -0
  14. package/dist/adapters/codex/codex.js +73 -0
  15. package/dist/adapters/codex/patch.js +39 -0
  16. package/dist/adapters/codex/usage.js +77 -0
  17. package/dist/adapters/pi/extension.js +271 -0
  18. package/dist/adapters/pi/risk-gate.js +256 -0
  19. package/dist/cli/commands.js +615 -0
  20. package/dist/cli/hook-log.js +32 -0
  21. package/dist/cli/main.js +100 -0
  22. package/dist/daemon/preview.js +70 -0
  23. package/dist/daemon/processes.js +105 -0
  24. package/dist/daemon/server.js +437 -0
  25. package/dist/daemon/session-state.js +179 -0
  26. package/dist/daemon/store.js +176 -0
  27. package/dist/dms/setup.js +137 -0
  28. package/dist/hosts/hosts.js +39 -0
  29. package/dist/jump/jump.js +199 -0
  30. package/dist/pill/config.js +92 -0
  31. package/dist/pill/launch.js +38 -0
  32. package/dist/sekaipop/setup.js +267 -0
  33. package/dist/service/unit.js +77 -0
  34. package/dist/shared/ancestry.js +27 -0
  35. package/dist/shared/client.js +29 -0
  36. package/dist/shared/package.js +25 -0
  37. package/dist/shared/paths.js +69 -0
  38. package/dist/shared/protocol.js +35 -0
  39. package/dist/shared/qml-lib.js +33 -0
  40. package/dist/shared/result.js +6 -0
  41. package/dist/shared/terminal.js +42 -0
  42. package/dist/themes/themes.js +84 -0
  43. package/package.json +49 -4
  44. package/shell/core/AgentIcon.qml +24 -0
  45. package/shell/core/AppLogo.qml +48 -0
  46. package/shell/core/ApprovalRow.qml +197 -0
  47. package/shell/core/BoardDetail.qml +336 -0
  48. package/shell/core/BoardList.qml +419 -0
  49. package/shell/core/BoardNotice.qml +189 -0
  50. package/shell/core/CardButton.qml +55 -0
  51. package/shell/core/CardHeader.qml +46 -0
  52. package/shell/core/ChalkBoard.qml +99 -0
  53. package/shell/core/CompletionCard.qml +106 -0
  54. package/shell/core/FlapText.qml +110 -0
  55. package/shell/core/KeyCap.qml +72 -0
  56. package/shell/core/Mascot.qml +13 -0
  57. package/shell/core/MascotBadge.qml +40 -0
  58. package/shell/core/MascotEffect.qml +40 -0
  59. package/shell/core/Paper.qml +54 -0
  60. package/shell/core/PixelGrid.qml +40 -0
  61. package/shell/core/QuestionRow.qml +161 -0
  62. package/shell/core/SessionRow.qml +257 -0
  63. package/shell/core/Stamp.qml +62 -0
  64. package/shell/core/StatusDots.qml +33 -0
  65. package/shell/core/Surface.qml +32 -0
  66. package/shell/core/Tag.qml +22 -0
  67. package/shell/core/TerminalIcon.qml +34 -0
  68. package/shell/core/Theme.qml +100 -0
  69. package/shell/core/TicketDetail.qml +657 -0
  70. package/shell/core/TicketList.qml +717 -0
  71. package/shell/core/TicketNotice.qml +198 -0
  72. package/shell/core/TopsideClient.qml +201 -0
  73. package/shell/core/UsageLine.qml +106 -0
  74. package/shell/core/agents.js +79 -0
  75. package/shell/core/board.js +132 -0
  76. package/shell/core/hiding.js +68 -0
  77. package/shell/core/pixels.js +542 -0
  78. package/shell/core/qmldir +30 -0
  79. package/shell/core/sounds.js +31 -0
  80. package/shell/core/themes.js +195 -0
  81. package/shell/core/ticket.js +170 -0
  82. package/shell/dms-plugin/TopsideSettings.qml +696 -0
  83. package/shell/dms-plugin/TopsideWidget.qml +554 -0
  84. package/shell/dms-plugin/plugin.json +14 -0
  85. package/shell/pill.qml +279 -0
  86. package/shell/sekaipop-plugin/Bar.qml +150 -0
  87. package/shell/sekaipop-plugin/Card.qml +296 -0
  88. package/shell/sekaipop-plugin/Floating.qml +74 -0
  89. package/shell/sekaipop-plugin/ListWindow.qml +156 -0
  90. package/shell/sekaipop-plugin/Popup.qml +70 -0
  91. package/shell/sekaipop-plugin/Service.qml +418 -0
  92. package/shell/sekaipop-plugin/ShellLook.qml +43 -0
  93. package/shell/sekaipop-plugin/StyledCard.qml +194 -0
  94. package/shell/sekaipop-plugin/place.js +28 -0
  95. package/shell/sekaipop-plugin/plugin.json +109 -0
@@ -0,0 +1,100 @@
1
+ pragma Singleton
2
+
3
+ import QtQuick
4
+ import Quickshell
5
+ import Quickshell.Io
6
+ import "themes.js" as Themes
7
+
8
+ // Topside's theme in use. The host sets three things: `name` (one of
9
+ // themes.js), `mode` ("light", "dark" or "system") and `systemDark`, what the
10
+ // desktop prefers. `content` is the text size of a row's prompt and status
11
+ // lines, 10 to 14; titles are two larger. Sizes are pixels, which match the
12
+ // points Topside uses on the Mac.
13
+ QtObject {
14
+ id: theme
15
+ property string name: "topsideBlack"
16
+ property string mode: "dark"
17
+ property bool systemDark: true
18
+ property int content: 11
19
+
20
+ readonly property bool dark: mode === "light" ? false : mode === "system" ? systemDark : true
21
+ // A host's own neutrals ({ background, raised, text, muted }), or null for
22
+ // the theme's. The status colors always come from the theme.
23
+ property var neutrals: null
24
+ readonly property var colors: Themes.colors(name, dark, neutrals, custom)
25
+
26
+ // A name that isn't built in is a theme file of your own, read with
27
+ // themes.js `read` and watched, so saving the file shows at once. A file
28
+ // that is missing or can't be drawn reads as Topside Black.
29
+ readonly property bool builtIn: Themes.names.indexOf(name) >= 0
30
+ readonly property string themesDir: Quickshell.env("TOPSIDE_THEMES")
31
+ || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/topside/themes"
32
+ property var custom: null
33
+ readonly property var fileShape: custom ? custom.shape : ({})
34
+ property FileView file: FileView {
35
+ path: theme.builtIn || theme.name === "" ? "" : theme.themesDir + "/" + theme.name + ".json"
36
+ watchChanges: true
37
+ printErrors: false
38
+ onFileChanged: reload()
39
+ onLoaded: theme.custom = Themes.read(text()).theme
40
+ onLoadFailed: theme.custom = null
41
+ onPathChanged: if (path === "") theme.custom = null
42
+ }
43
+
44
+ readonly property color bg: colors.background
45
+ readonly property color surface: colors.surface
46
+ readonly property color bgRaised: colors.raised
47
+ readonly property color stroke: colors.stroke
48
+ readonly property color fg: colors.primary
49
+ readonly property color fgDim: colors.secondary
50
+ readonly property color fgFaint: colors.tertiary
51
+ readonly property color working: colors.working
52
+ readonly property color waiting: colors.waiting
53
+ readonly property color done: colors.done
54
+ readonly property color reminder: colors.reminder
55
+ readonly property color idle: colors.idle
56
+ readonly property color offline: colors.reminder
57
+ readonly property color ask: colors.working
58
+ readonly property color crimson: colors.crimson
59
+ readonly property color allow: colors.done
60
+ readonly property color deny: colors.reminder
61
+
62
+ readonly property int title: content + 2
63
+ readonly property int small: content - 1
64
+ property int radius: 18
65
+ property int pad: 10
66
+
67
+ // Shape and type. The defaults are Topside's own look; a host can set
68
+ // them to match the shell it sits in (docs/notes/hosts.md).
69
+ // A theme file's `shape` sets them too.
70
+ property string font: fileShape.font ?? Qt.application.font.family
71
+ property string monoFont: fileShape.monoFont ?? "monospace"
72
+ property int cardRadius: fileShape.cardRadius ?? 9 // request, question and completion cards
73
+ property int buttonRadius: fileShape.buttonRadius ?? 8
74
+ property int chipRadius: fileShape.chipRadius ?? 5 // tags, option numbers, row buttons
75
+ property int rowRadius: fileShape.rowRadius ?? 10 // a session row's highlight
76
+ property int panelRadius: fileShape.panelRadius ?? 14 // a host's own card face
77
+ property int lineWidth: fileShape.lineWidth ?? 1 // card outlines
78
+ property color line: stroke
79
+ property int shadowOffset: fileShape.shadowOffset ?? 0 // a hard drop shadow; 0 is none
80
+ property color shadowColor: Qt.rgba(0, 0, 0, 0.35)
81
+
82
+ function statusColor(status) {
83
+ if (status === "working") return working;
84
+ if (status === "waiting") return waiting;
85
+ if (status === "done") return done;
86
+ if (status === "reminder") return reminder;
87
+ return idle;
88
+ }
89
+
90
+ // A neutral between the background (0) and the text (1), as Topside's
91
+ // Palette.level, for button fills.
92
+ function level(amount) {
93
+ return Themes.mix(colors.background, colors.primary, Math.min(1, amount / 0.96));
94
+ }
95
+
96
+ // A text size given for the 11px default, scaled to the size in use.
97
+ function s(base) {
98
+ return Math.round(base * content / 11);
99
+ }
100
+ }