diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix index bf215cb7..04a4318d 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/scripts/waybar-scripts.nix @@ -6,6 +6,7 @@ text = '' #!/usr/bin/env bash CLASS=`tailscale status --json | jq -r '.BackendState'` + TEXT="󰌆" # Known values: Running, Stopped # Expected Output: @@ -14,11 +15,11 @@ if [ $CLASS == "Running" ]; then IP=`tailscale status --json | jq -r '.TailscaleIPs[0]'` ALT="IP: $IP" - printf '{"class": %s", "alt": %s}' "$CLASS", "$ALT" + printf '{"text": %s,"class": %s", "alt": %s}\n' "$TEXT" "$CLASS" "$ALT" fi if [ $CLASS == "Stopped" ]; then ALT="Tailscale is not running" - printf '{"class": %s", "alt": %s}' "$CLASS", "$ALT" + printf '{"text": %s,"class": %s", "alt": %s}\n' "$TEXT" "$CLASS" "$ALT" fi ''; };