45 lines
1.1 KiB
QML
45 lines
1.1 KiB
QML
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Hyprland
|
|
import Quickshell.Io
|
|
import "../../../colors"
|
|
import "../../../config"
|
|
|
|
MouseArea {
|
|
id: archButton
|
|
width: Math.max(bar.height, archButtonText.width+Config.spacing)
|
|
height: bar.height
|
|
hoverEnabled: true
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
archButtonScript.running = true
|
|
}
|
|
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
color: archButton.containsMouse ? Colors.tertiary : Qt.alpha(Colors.primaryContainer, 0.25)
|
|
radius: Config.radius
|
|
|
|
Text {
|
|
id: archButtonText
|
|
anchors.centerIn: parent
|
|
text: ""
|
|
font.pixelSize: Config.big_font_size(bar.height)
|
|
font.family: Config.font
|
|
color: archButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: archButtonScript
|
|
command: ["sh", "-c", "wofi --show drun"]
|
|
running: false
|
|
|
|
stdout: StdioCollector {
|
|
onStreamFinished: {
|
|
console.log("Opening wofi")
|
|
}
|
|
}
|
|
}
|
|
} |