From 50f0d2173ed31026f23b670c9b87c8824126dd9d Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Sat, 16 Aug 2025 19:51:03 +0530 Subject: [PATCH] feat: Remove the hyprmonitors-curl --- home-manager-module.nix | 45 ----------------------------------------- 1 file changed, 45 deletions(-) diff --git a/home-manager-module.nix b/home-manager-module.nix index 8217a63..aeeafe6 100644 --- a/home-manager-module.nix +++ b/home-manager-module.nix @@ -164,50 +164,5 @@ in { hyprmonitors-logs = "journalctl --user -u hyprmonitors.service -f"; hyprmonitors-test = "curl http://${cfg.host}:${toString cfg.port}/health"; }; - - # Add some helper scripts - home.packages = mkIf cfg.enable [ - (pkgs.writeShellScriptBin "hyprmonitors-curl" '' - #!/usr/bin/env bash - # Helper script for testing hyprmonitors API - - BASE_URL="http://${cfg.host}:${toString cfg.port}" - - case "$1" in - health) - curl -s "$BASE_URL/health" | ${pkgs.jq}/bin/jq - ;; - status) - curl -s "$BASE_URL/monitors/status" | ${pkgs.jq}/bin/jq - ;; - on) - if [ -n "$2" ]; then - curl -s -X POST "$BASE_URL/monitors/$2/on" | ${pkgs.jq}/bin/jq - else - curl -s -X POST "$BASE_URL/monitors/on" | ${pkgs.jq}/bin/jq - fi - ;; - off) - if [ -n "$2" ]; then - curl -s -X POST "$BASE_URL/monitors/$2/off" | ${pkgs.jq}/bin/jq - else - curl -s -X POST "$BASE_URL/monitors/off" | ${pkgs.jq}/bin/jq - fi - ;; - *) - echo "Usage: hyprmonitors-curl {health|status|on [monitor]|off [monitor]}" - echo "" - echo "Examples:" - echo " hyprmonitors-curl health" - echo " hyprmonitors-curl status" - echo " hyprmonitors-curl on" - echo " hyprmonitors-curl off" - echo " hyprmonitors-curl on DP-1" - echo " hyprmonitors-curl off HDMI-A-1" - exit 1 - ;; - esac - '') - ]; }; }