48 lines
1.1 KiB
QML
48 lines
1.1 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import Quickshell.Wayland
|
|
import Quickshell.Widgets
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import qs
|
|
import qs.settings
|
|
import qs.widgets
|
|
|
|
Rectangle {
|
|
id: root
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
acceptedButtons: Qt.AllButtons
|
|
}
|
|
clip: true
|
|
color: Colors.base00
|
|
Process {
|
|
id: getSchemes
|
|
property list<string> schemes
|
|
running: true
|
|
command: ["tinty", "list"]
|
|
stdout: SplitParser {
|
|
onRead: text => {
|
|
getSchemes.schemes.push(text);
|
|
}
|
|
}
|
|
}
|
|
ListView {
|
|
id: schemeList
|
|
orientation: ListView.Horizontal
|
|
anchors.fill: root
|
|
model: getSchemes.schemes
|
|
delegate: Rectangle {
|
|
id: container
|
|
required property string modelData
|
|
color: Colors.base01
|
|
height: 30
|
|
implicitWidth: schemeName.width + 16
|
|
StyledText {
|
|
id: schemeName
|
|
text: container.modelData
|
|
}
|
|
}
|
|
}
|
|
}
|