From a49b057bb6e5a3f6871acfa38798ec013940ff6b Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 19 Feb 2025 18:05:34 -0600 Subject: [PATCH] update hwylterm --- flake.nix | 22 ++++++++++------------ hyprman.nimble | 2 +- nimble.lock | 4 ++-- src/hyprman.nim | 18 +++++------------- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/flake.nix b/flake.nix index 3252a11..8050a3f 100644 --- a/flake.nix +++ b/flake.nix @@ -15,23 +15,21 @@ }: let inherit (nixpkgs.lib) genAttrs cleanSource; - supportedSystems = [ + systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; - forAllSystems = - f: - genAttrs supportedSystems ( - system: - f ( - import nixpkgs { - inherit system; - overlays = [ nim2nix.overlays.default ]; - } - ) + forSystem = + f: system: + f ( + import nixpkgs { + inherit system; + overlays = [ nim2nix.overlays.default ]; + } ); + forAllSystems = f: genAttrs systems (forSystem f); in { devShells = forAllSystems (pkgs: { @@ -48,7 +46,7 @@ pname = "hyprman"; version = "unstable"; src = cleanSource ./.; - nimbleDepsHash = "sha256-noqNxRnz8C7HTiqtO6u9+Oe9tC8C9cBSGSpIUrN5btU="; + nimbleDepsHash = "sha256-s1uyhpie+tqUmrlCTV6alGmJhY6roGNU8l2W7CpWQqA="; }; }); formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); diff --git a/hyprman.nimble b/hyprman.nimble index 20b6767..c74c422 100644 --- a/hyprman.nimble +++ b/hyprman.nimble @@ -13,4 +13,4 @@ bin = @["hyprman"] requires "nim >= 2.0.8" requires "yaml" requires "jsony" -requires "https://github.com/daylinmorgan/hwylterm#dbde9c9" +requires "https://github.com/daylinmorgan/hwylterm#1324ba54" diff --git a/nimble.lock b/nimble.lock index 0903a77..c82a43e 100644 --- a/nimble.lock +++ b/nimble.lock @@ -3,12 +3,12 @@ "packages": { "hwylterm": { "version": "0.1.0", - "vcsRevision": "dbde9c91e972e101c6e9da4ad87a0b2fa6d1bee8", + "vcsRevision": "1324ba54151eeb6c2a28d8236854ccfb9885b530", "url": "https://github.com/daylinmorgan/hwylterm", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "aa7def4e92d09001e407791bbe02f21c4d835158" + "sha1": "b5c3cc2e8ed4ce5514750d1216d0816cd4ef0dc7" } }, "jsony": { diff --git a/src/hyprman.nim b/src/hyprman.nim index 553f469..ad2d81f 100644 --- a/src/hyprman.nim +++ b/src/hyprman.nim @@ -13,12 +13,9 @@ hwylCli: settings Propagate, InferShort flags: [global] - config: - i configPath - T string - ? "path to config file" + c|config(string, "path to config file"): * (getConfigDir() / "hyprman" / "config.yml") - - c + i configPath S HideDefault preSub: config.load(configPath) @@ -26,14 +23,9 @@ hwylCli: [mako] ... "interact with mako" flags: - count: - T int - ? "# of notifications" - * 10 - json: - ? "output as json" - reverse: - ? "swap notification order" + count(10, int, "# of notifications") + json "outptut as json" + reverse "swap notification order" run: let history = getHistory(reverse, count) if json: echo $(%* history)