repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(quickshell): add nugu shell foundation

7747842181a5023b0a784a13af8ab8a20a74e3b2

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

+229 / −0 text lines

Diff layout

.gitignore

Modified

+3 / −0 text lines

3636.aider.chat.history.md
3737.*syncthing.*
3838.trash/
40# Quickshell LSP scratch/config generated by qs.
41**/.qmlls.ini

quickshell/nugu/Diagnostics.qml

Added
new file mode 100644

+76 / −0 text lines

1import QtQuick
2import QtQuick.Layouts
3import Quickshell
4
5PanelWindow {
6 id: panel
7
8 required property QtObject theme
9
10 anchors { top: true; left: true }
11 margins { top: 36; left: 10 }
12 exclusiveZone: -1
13 implicitWidth: 360
14 implicitHeight: 96
15 color: "transparent"
17 Rectangle {
18 anchors.fill: parent
19 radius: 7
20 color: `${panel.theme.ui.backdrop}ee`
21 border.width: 2
22 border.color: panel.theme.ui.accent
24 ColumnLayout {
25 anchors.fill: parent
26 anchors.margins: 12
27 spacing: 6
29 Text {
30 Layout.fillWidth: true
31 text: `Quickshell Nugu · ${panel.theme.mode}`
32 color: panel.theme.ui.important_global
33 font.family: "IBM Plex Mono"
34 font.pixelSize: 13
35 font.bold: true
36 elide: Text.ElideRight
37 }
39 RowLayout {
40 Layout.fillWidth: true
41 spacing: 8
43 Repeater {
44 model: [
45 panel.theme.ui.backdrop,
46 panel.theme.ui.normal,
47 panel.theme.ui.accent,
48 panel.theme.ui.focus,
49 panel.theme.warning,
50 panel.theme.error,
51 panel.theme.info
52 ]
54 Rectangle {
55 required property string modelData
56 Layout.preferredWidth: 34
57 Layout.preferredHeight: 22
58 radius: 4
59 color: modelData
60 border.width: 1
61 border.color: panel.theme.ui.unfocus
62 }
63 }
64 }
66 Text {
67 Layout.fillWidth: true
68 text: "IPC: qs -c nugu ipc call nugu toggleDiagnostics"
69 color: panel.theme.ui.minor
70 font.family: "IBM Plex Mono"
71 font.pixelSize: 11
72 elide: Text.ElideRight
73 }
74 }
75 }
76}

quickshell/nugu/README.md

Added
new file mode 100644

+28 / −0 text lines

1# Nugu Quickshell
2
3Named Quickshell config for Hypr companion replacement.
4
5Phase 1 is inert by default. It starts Quickshell, loads Nugu colors, and exposes diagnostics over IPC. It does not replace Ironbar or Mako.
6
7Run directly:
8
9```sh
10qs -p quickshell/nugu/shell.qml
11```
13Run named config after dorkfiles link:
15```sh
16qs -c nugu
17```
19Diagnostics:
21```sh
22qs -c nugu ipc call nugu showDiagnostics
23qs -c nugu ipc call nugu hideDiagnostics
24qs -c nugu ipc call nugu toggleDiagnostics
25qs -c nugu ipc call nugu reloadTheme
26qs -c nugu ipc call nugu setThemeMode light
27qs -c nugu ipc call nugu setThemeMode dark
28```

quickshell/nugu/Theme.qml

Added
new file mode 100644

+95 / −0 text lines

1import QtQuick
2import Quickshell
3import Quickshell.Io
4
5Item {
6 id: theme
7 visible: false
8
9 readonly property string modePath: `${Quickshell.env("HOME")}/.cache/nugu/mode`
10 readonly property string palettePath: Qt.resolvedUrl("../../hypr/generated/nugu.json")
12 property string mode: readMode()
13 property var palettes: readJson()
14 property var palette: palettes[mode] || palettes.dark
16 readonly property var content: palette.content
17 readonly property var ui: palette.ui
18 readonly property string error: palette.error
19 readonly property string warning: palette.warning
20 readonly property string info: palette.info
21 readonly property string debug: palette.debug
23 FileView {
24 id: paletteFile
25 path: theme.palettePath
26 blockLoading: true
27 printErrors: false
28 }
30 FileView {
31 id: modeFile
32 path: theme.modePath
33 blockLoading: true
34 printErrors: false
35 watchChanges: true
36 onFileChanged: {
37 reload()
38 }
39 }
41 function readJson() {
42 const text = paletteFile.text()
43 if (text.length === 0) {
44 return { "dark": fallbackDark(), "light": fallbackDark() }
45 }
46 return JSON.parse(text)
47 }
49 function readMode() {
50 const text = modeFile.text().trim()
51 return text === "light" ? "light" : "dark"
52 }
54 function reload(): void {
55 paletteFile.reload()
56 modeFile.reload()
57 palettes = readJson()
58 mode = readMode()
59 palette = palettes[mode] || palettes.dark
60 }
62 function setMode(next: string): void {
63 mode = next === "light" ? "light" : "dark"
64 palette = palettes[mode] || palettes.dark
65 }
67 function fallbackDark() {
68 return {
69 "debug": "#ed5eed",
70 "error": "#ec6376",
71 "warning": "#f0ee69",
72 "info": "#3ec5e3",
73 "content": {
74 "normal": "#ededed",
75 "backdrop": "#121212",
76 "accent": "#d151d1",
77 "minor": "#8b8b8b",
78 "focus": "#7ba1aa",
79 "unfocus": "#5d5d5d",
80 "important_local": "#b59ae4",
81 "important_global": "#dfd3f3"
82 },
83 "ui": {
84 "normal": "#dbdbdb",
85 "backdrop": "#242424",
86 "accent": "#d86dd8",
87 "minor": "#9d9d9d",
88 "focus": "#9aabae",
89 "unfocus": "#6f6f6f",
90 "important_local": "#c9b6eb",
91 "important_global": "#f3effb"
92 }
93 }
94 }
95}

quickshell/nugu/shell.qml

Added
new file mode 100644

+27 / −0 text lines

1import QtQuick
2import Quickshell
3import Quickshell.Io
4import "."
5
6Scope {
7 id: root
8
9 property bool diagnosticsVisible: false
11 Theme { id: theme }
13 IpcHandler {
14 target: "nugu"
16 function showDiagnostics(): void { root.diagnosticsVisible = true }
17 function hideDiagnostics(): void { root.diagnosticsVisible = false }
18 function toggleDiagnostics(): void { root.diagnosticsVisible = !root.diagnosticsVisible }
19 function reloadTheme(): void { theme.reload() }
20 function setThemeMode(mode: string): void { theme.setMode(mode) }
21 }
23 Diagnostics {
24 visible: root.diagnosticsVisible
25 theme: theme
26 }
27}