From c975ed3ea6404375fe824f697be85474a9f18236 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 30 Jul 2026 20:16:16 +0530 Subject: feat(waybar): added custom usque module - Uses the newly added usque-warp script's subcommand status to get the status and device name and display it in the custom/usque module --- modules/desktop/waybar/bar/main.nix | 1 + modules/desktop/waybar/module/default.nix | 1 + modules/desktop/waybar/module/usque.nix | 17 +++++++++++++++++ modules/desktop/waybar/style.nix | 4 ++-- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 modules/desktop/waybar/module/usque.nix (limited to 'modules/desktop') diff --git a/modules/desktop/waybar/bar/main.nix b/modules/desktop/waybar/bar/main.nix index 276abd6..66a7fdd 100644 --- a/modules/desktop/waybar/bar/main.nix +++ b/modules/desktop/waybar/bar/main.nix @@ -13,6 +13,7 @@ "pulseaudio" "battery" "network" + "custom/usque" "memory" "cpu" "clock#time" diff --git a/modules/desktop/waybar/module/default.nix b/modules/desktop/waybar/module/default.nix index 25cdb14..28ee0ed 100644 --- a/modules/desktop/waybar/module/default.nix +++ b/modules/desktop/waybar/module/default.nix @@ -16,6 +16,7 @@ let "memory" = ./memory.nix; "network" = ./network.nix; "clock#time" = ./time.nix; + "custom/usque" = ./usque.nix; "pulseaudio" = ./volume.nix; "hyprland/window" = ./window.nix; "hyprland/workspaces" = ./workspaces.nix; diff --git a/modules/desktop/waybar/module/usque.nix b/modules/desktop/waybar/module/usque.nix new file mode 100644 index 0000000..bbcce17 --- /dev/null +++ b/modules/desktop/waybar/module/usque.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + mkIcon, + ... +}: +with config.scheme.withHashtag; +let + iconColor = base08; +in +{ + exec = "${lib.getExe config.scripts.usque-warp.package} status"; + interval = 5; + return-type = "json"; + hide-empty-text = true; + format = "${mkIcon iconColor "󰒃"} {}"; +} diff --git a/modules/desktop/waybar/style.nix b/modules/desktop/waybar/style.nix index 82aca19..25841d8 100644 --- a/modules/desktop/waybar/style.nix +++ b/modules/desktop/waybar/style.nix @@ -12,7 +12,7 @@ with config.scheme.withHashtag; } #workspaces, #window, #pulseaudio, #battery, #network, - #clock.time, #memory, #cpu, #clock.date { + #clock.time, #custom-usque, #memory, #cpu, #clock.date { background: ${base00}; margin: 0 5px; } @@ -23,7 +23,7 @@ with config.scheme.withHashtag; } #window, #pulseaudio, #battery, #network, - #clock.time, #memory, #cpu, #clock.date { + #clock.time, #custom-usque, #memory, #cpu, #clock.date { border: 1px solid ${base07}; color: ${base07}; padding: 0 10px; -- cgit v1.2.3