2.2 KiB
2.2 KiB
Quickshell panel – agent guide
This repo is a Quickshell config: a Qt/QML Wayland panel (bar + widgets). It uses Quickshell APIs and a shared theme.
Layout
shell.qml– Entry. UsesBarand enablesQuickshell.watchFilesfor reload on change.Bar/– Panel window and bar UI:Bar.qml–PanelWindowwith aRowLayout; left/center/right sections useBarPill.BarPill.qml– Rounded container for a group of widgets (default propertycontent).
Theme/– SingletonTheme(Catppuccin Mocha): colors,barHeight,padding,spacing,fontPixelSize,fontFamily,sectionRadius, etc. All widgets and bar UI should useThemeonly (no hardcoded colors/sizes).Widgets/– Bar widgets. Each has aqmldirentry; Bar importsqs.Widgetsand instantiates them insideBarPills.
Conventions
- Theme – Use
import qs.Themeand referenceTheme.*for colors, fonts, and layout constants. - Widget root – Widgets are typically
ItemwithimplicitWidth/implicitHeightfrom a main child (e.g. aText). - Icons – Nerd Font codepoints in
Text(e.g."\uF017 "for clock). Font:Theme.fontFamily("Fira Code Nerd Font"). - Popup/panel – Widgets that open a popup (e.g. Clock, Tray) take
property var panelWindow: nulland receive the Bar’sPanelWindowfromBar.qml. - CLI data – Use Quickshell’s
ProcessplusStdioCollectoron stdout; use aTimerto refresh (e.g. every 30s). SeeMemoryWidget.qml. - Bar placement – To add/move widgets, edit
Bar/Bar.qml: left section, center (e.g. clock), or right section; each group lives in oneBarPill.
Adding a widget
- Add
YourWidget 1.0 YourWidget.qmltoWidgets/qmldir. - Implement the widget in
Widgets/YourWidget.qml(Item root, Theme, implicit size). - In
Bar/Bar.qml, addYourWidget {}inside the desiredBarPill(and setpanelWindow: panelif it needs a popup).
Tech
- Runtime: Quickshell (Qt 6, QML, Wayland). Entry is
shell.qml; pragmas at top (e.g.UseQApplication,Env QT_QPA_PLATFORM=wayland). - Modules:
qs.Bar,qs.Theme,qs.Widgets– each has aqmldirin its folder.