remove ws, fmt
This commit is contained in:
parent
5316f40967
commit
cd45c2d9cf
17 changed files with 96 additions and 97 deletions
|
|
@ -16,7 +16,7 @@ Row {
|
|||
command: ["swaync-client", "--subscribe-waybar"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
onRead: (line) => {
|
||||
onRead: line => {
|
||||
try {
|
||||
const d = JSON.parse(line);
|
||||
const cls = d.class ?? "";
|
||||
|
|
@ -30,8 +30,10 @@ Row {
|
|||
|
||||
Text {
|
||||
text: {
|
||||
if (root.inhibited) return root.count > 0 ? "" : "";
|
||||
if (root.dnd) return root.count > 0 ? "" : "";
|
||||
if (root.inhibited)
|
||||
return root.count > 0 ? "" : "";
|
||||
if (root.dnd)
|
||||
return root.count > 0 ? "" : "";
|
||||
return root.count > 0 ? "" : "";
|
||||
}
|
||||
color: M.Theme.base05
|
||||
|
|
@ -47,16 +49,21 @@ Row {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: (m) => {
|
||||
const cmd = m.button === Qt.RightButton
|
||||
? ["swaync-client", "--toggle-dnd", "--skip-wait"]
|
||||
: ["swaync-client", "--toggle-panel", "--skip-wait"];
|
||||
clicker.command = cmd;
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onTapped: {
|
||||
clicker.command = ["swaync-client", "--toggle-panel", "--skip-wait"];
|
||||
clicker.running = true;
|
||||
}
|
||||
}
|
||||
Process { id: clicker }
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onTapped: {
|
||||
clicker.command = ["swaync-client", "--toggle-dnd", "--skip-wait"];
|
||||
clicker.running = true;
|
||||
}
|
||||
}
|
||||
Process {
|
||||
id: clicker
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue