powermenu config in shell json
This commit is contained in:
parent
7935487295
commit
7ba6222105
2 changed files with 25 additions and 19 deletions
|
|
@ -1,9 +1,33 @@
|
|||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property PowerMenu powermenu: PowerMenu {}
|
||||
readonly property alias powermenu: adapter.powermenu
|
||||
|
||||
FileView {
|
||||
path: `${Paths.config}/shell.json`
|
||||
watchChanges: true
|
||||
onFileChanged: reload()
|
||||
|
||||
// onAdapterUpdated: writeAdapter()
|
||||
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
property var powermenu: PowerMenu {}
|
||||
}
|
||||
}
|
||||
|
||||
component PowerMenu: JsonObject {
|
||||
property list<PowerMenuItem> actions
|
||||
}
|
||||
|
||||
component PowerMenuItem: JsonObject {
|
||||
property string text
|
||||
property string command
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue