mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2026-09-29 20:04:21 +00:00
21 lines
546 B
QML
21 lines
546 B
QML
import QtQuick
|
|
import Quickshell
|
|
|
|
Block {
|
|
id: root
|
|
|
|
required property var service
|
|
property bool connected: service.connection !== "Disconnected"
|
|
signal detailsRequested(var anchorItem)
|
|
|
|
blockColor: connected ? Theme.secondary : Theme.urgent
|
|
interactive: true
|
|
text: connected ? "\uf1eb " + service.connection : "Disconnected !"
|
|
onClicked: mouse => {
|
|
if (mouse.button === Qt.LeftButton)
|
|
detailsRequested(root);
|
|
else
|
|
Quickshell.execDetached(["nm-connection-editor"]);
|
|
}
|
|
}
|