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