add primitive shit for theme switching

This commit is contained in:
lucy 2026-09-09 18:48:35 +02:00
commit 143889683b
6 changed files with 111 additions and 20 deletions

View file

@ -0,0 +1,48 @@
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
}
}
}
}