summaryrefslogtreecommitdiff
path: root/quickshell/.config
diff options
context:
space:
mode:
Diffstat (limited to 'quickshell/.config')
-rw-r--r--quickshell/.config/quickshell/shell.qml12
1 files changed, 7 insertions, 5 deletions
diff --git a/quickshell/.config/quickshell/shell.qml b/quickshell/.config/quickshell/shell.qml
index 8ce5869..1281878 100644
--- a/quickshell/.config/quickshell/shell.qml
+++ b/quickshell/.config/quickshell/shell.qml
@@ -178,6 +178,7 @@ PanelWindow {
color: "#FFC500"
font.family: "Source Code Pro"
font.pixelSize: 14
+ visible: text !== ""
}
Text {
@@ -194,6 +195,7 @@ PanelWindow {
color: root.fg
font.family: "Source Code Pro"
font.pixelSize: 14
+ visible: text !== ""
}
}
@@ -207,21 +209,21 @@ PanelWindow {
Process {
id: wlanProc
- command: ["sh", "-c", "WIFACE=$(ip -o link show up | grep -oP 'wl[^:]+' | head -1); EIFACE=$(ip -o link show up | grep -oP 'en[^:]+' | head -1); if [ -n \"$WIFACE\" ]; then SSID=$(iwgetid -r 2>/dev/null); IP=$(ip -4 -o addr show $WIFACE 2>/dev/null | cut -d' ' -f7 | cut -d/ -f1); echo \"wifi $WIFACE $SSID $IP\"; elif [ -n \"$EIFACE\" ]; then IP=$(ip -4 -o addr show $EIFACE 2>/dev/null | cut -d' ' -f7 | cut -d/ -f1); echo \"eth $EIFACE $IP\"; else echo disconnected; fi"]
+ command: ["sh", "-c", "WIFACE=$(ip -o link show up | grep -oP 'wl[^:]+' | head -1); EIFACE=$(ip -o link show up | grep -oP 'en[^:]+' | head -1); if [ -n \"$WIFACE\" ]; then SSID=$(iwgetid -r 2>/dev/null); if [ -n \"$SSID\" ]; then IP=$(ip -4 -o addr show $WIFACE 2>/dev/null | cut -d' ' -f7 | cut -d/ -f1); echo \"wifi|$WIFACE|$SSID|$IP\"; else echo disconnected; fi; elif [ -n \"$EIFACE\" ]; then IP=$(ip -4 -o addr show $EIFACE 2>/dev/null | cut -d' ' -f7 | cut -d/ -f1); echo \"eth|$EIFACE|$IP\"; else echo disconnected; fi"]
stdout: StdioCollector {
onStreamFinished: {
- var parts = this.text.trim().split(" ")
+ var parts = this.text.trim().split("|")
var type = parts[0]
if (type === "wifi") {
wlanIcon.text = ""
- wlanIface.text = parts[1]
+ wlanIface.text = parts[1] || ""
wlanSsid.text = parts[2] || ""
wlanSsid.color = root.fg
wlanSsid.font.bold = true
wlanIp.text = parts[3] || ""
} else if (type === "eth") {
- wlanIcon.text = "ETH_ICON"
- wlanIface.text = parts[1]
+ wlanIcon.text = ""
+ wlanIface.text = parts[1] || ""
wlanSsid.text = ""
wlanIp.text = parts[2] || ""
} else {