import QtQuick
import Quickshell.Io

// eww theme-widget
StatPill {
    property string themeInfo: ""
    text: themeInfo
    clickable: true

    onClicked:      launchTheme("next")
    onRightClicked: launchTheme("auto")

    function launchTheme(mode) {
        Qt.createQmlObject(
            'import Quickshell.Io; Process { command: ["bash","' +
            Qt.resolvedUrl("../hypr/theme-cycle.sh") +
            '","' + mode + '"]; running: true }', parent)
    }
}
