mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 09:36:46 +00:00
quickshell and hyprland additions
This commit is contained in:
32
.config/quickshell/nucleus-shell/plugins/PluginLoader.qml
Normal file
32
.config/quickshell/nucleus-shell/plugins/PluginLoader.qml
Normal file
@@ -0,0 +1,32 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.config
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property var plugins: []
|
||||
|
||||
function reload() {
|
||||
listPluginsProc.running = true
|
||||
}
|
||||
|
||||
Component.onCompleted: reload()
|
||||
|
||||
Process {
|
||||
id: listPluginsProc
|
||||
// List directories under ~/.config/nucleus-shell/plugins
|
||||
command: ["sh", "-c", "ls -1 ~/.config/nucleus-shell/plugins"]
|
||||
running: true
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
const names = text.split("\n").filter(s => s.trim() !== "")
|
||||
root.plugins = names
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user