refactor(bar): modularize bar widgets and layout

This commit is contained in:
tux
2026-08-23 12:53:07 +05:30
parent 494420d241
commit 2f122a9487
12 changed files with 381 additions and 318 deletions

29
config/BarLayout.qml Normal file
View File

@@ -0,0 +1,29 @@
pragma Singleton
import Quickshell
import qs.ui
import qs.services
Singleton {
id: root
function widget(name: string): url {
return `${Quickshell.shellPath("modules/bar")}/${name}.qml`;
}
property var left: [
root.widget("LauncherButton"),
root.widget("BatteryIndicator"),
root.widget("CavaVisualizer")
]
property var center: [
root.widget("Workspaces")
]
property var right: [
root.widget("SystemTrayWidget"),
root.widget("ClockWidget"),
root.widget("GhostButton")
]
}