From 0629fabe3f59311e3c6bb11b64878412f2d91bf1 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 12 Nov 2023 22:45:05 +0900 Subject: [PATCH] Fix waybar and hyprland --- .../common/desktops/hyprland/common/waybar/scripts.nix | 6 +++--- .../desktops/hyprland/themes/gruvbox/waybar-conf.nix | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/home-manager/common/desktops/hyprland/common/waybar/scripts.nix b/home-manager/common/desktops/hyprland/common/waybar/scripts.nix index 86d3b45b..a192b7f8 100644 --- a/home-manager/common/desktops/hyprland/common/waybar/scripts.nix +++ b/home-manager/common/desktops/hyprland/common/waybar/scripts.nix @@ -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 @@ -23,4 +23,4 @@ ''; }; }; -} \ No newline at end of file +} diff --git a/home-manager/common/desktops/hyprland/themes/gruvbox/waybar-conf.nix b/home-manager/common/desktops/hyprland/themes/gruvbox/waybar-conf.nix index b46d958b..f4f364a4 100644 --- a/home-manager/common/desktops/hyprland/themes/gruvbox/waybar-conf.nix +++ b/home-manager/common/desktops/hyprland/themes/gruvbox/waybar-conf.nix @@ -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}%) ",