Fix waybar and hyprland
This commit is contained in:
parent
53cea23814
commit
0629fabe3f
2 changed files with 7 additions and 7 deletions
|
@ -5,14 +5,14 @@
|
||||||
executable = true;
|
executable = true;
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
CLASS=`tailscale status --json | jq -r '.BackendState'`
|
CLASS=`tailscale status --json | fx . '.BackendState'`
|
||||||
# Known values: Running, Stopped
|
# Known values: Running, Stopped
|
||||||
|
|
||||||
# Expected Output:
|
# Expected Output:
|
||||||
# {"text": "$text", "alt": "$alt", "tooltip": "$tooltip", "class": "$class", "percentage": $percentage }
|
# {"text": "$text", "alt": "$alt", "tooltip": "$tooltip", "class": "$class", "percentage": $percentage }
|
||||||
# Different $Class depending on if TS is running or not
|
# Different $Class depending on if TS is running or not
|
||||||
if [ $CLASS == "Running" ]; then
|
if [ $CLASS == "Running" ]; then
|
||||||
IP=`tailscale status --json | jq -r '.TailscaleIPs[0]'`
|
IP=`tailscale status --json | fx . '.TailscaleIPs[0]'`
|
||||||
TOOLTIP="IP: $IP"
|
TOOLTIP="IP: $IP"
|
||||||
printf '{"class": "%s", "tooltip": "%s", "alt": "%s"}\n' "$CLASS" "$TOOLTIP" "$CLASS"
|
printf '{"class": "%s", "tooltip": "%s", "alt": "%s"}\n' "$CLASS" "$TOOLTIP" "$CLASS"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"mpris",
|
"mpris",
|
||||||
],
|
],
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"wlr/workspaces",
|
"hyprland/workspaces",
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
"status-icons": { "paused": "⏸" },
|
"status-icons": { "paused": "⏸" },
|
||||||
},
|
},
|
||||||
|
|
||||||
"wlr/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@
|
||||||
|
|
||||||
"network": {
|
"network": {
|
||||||
"format": "{ifname}",
|
"format": "{ifname}",
|
||||||
"format-wifi": " {essid}",
|
"format-wifi": " {essid}",
|
||||||
"format-ethernet": " {ipaddr}",
|
"format-ethernet": " {ipaddr}",
|
||||||
"format-disconnected": "", // An empty format will hide the module.
|
"format-disconnected": "", // An empty format will hide the module.
|
||||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
|
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
|
|
Loading…
Reference in a new issue