diff --git a/home/misterio/features/cli/default.nix b/home/misterio/features/cli/default.nix index 0da66a6c..676c735d 100644 --- a/home/misterio/features/cli/default.nix +++ b/home/misterio/features/cli/default.nix @@ -38,5 +38,7 @@ nix-inspect # See which pkgs are in your PATH ltex-ls # Spell checking LSP + + tly # Tally counter ]; } diff --git a/home/misterio/features/desktop/hyprland/default.nix b/home/misterio/features/desktop/hyprland/default.nix index eaa6080d..98f4f9d9 100644 --- a/home/misterio/features/desktop/hyprland/default.nix +++ b/home/misterio/features/desktop/hyprland/default.nix @@ -122,8 +122,9 @@ "SUPER,Print,exec,${grimblast} --notify copy window" "ALT,Print,exec,${grimblast} --notify copy area" # Tally counter - "SUPER,z,exec,${tly} add && ${gtk-play} -i dialog-information" # Add new entry - "SUPERCONTROL,z,exec,${tly} undo && ${gtk-play} -i dialog-warning" # Undo last entry + "SUPER,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} add && ${gtk-play} -i dialog-information" # Add new entry + "SUPERCONTROL,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} undo && ${gtk-play} -i dialog-warning" # Undo last entry + "SUPERCONTROLSHIFT,z,exec,${tly} reset && ${gtk-play} -i complete" # Reset "SUPERSHIFT,z,exec,${notify-send} -t 1000 $(${tly} time)" # Show current time ] ++ diff --git a/pkgs/tly/default.nix b/pkgs/tly/default.nix index 67c02ded..ac9eb696 100644 --- a/pkgs/tly/default.nix +++ b/pkgs/tly/default.nix @@ -1,8 +1,9 @@ # Tally counter, also used as stopwatch # tly [list-name] -{ lib, writeShellApplication }: (writeShellApplication { +{ lib, writeShellApplication, coreutils, gnugrep, bc }: (writeShellApplication { name = "tly"; + runtimeInputs = [ coreutils gnugrep bc ]; text = builtins.readFile ./tly.sh; }) // { meta = with lib; {