nix-config/packages/_timer.nix
Oliver Davies e5ae3a4be7
All checks were successful
/ check (push) Successful in 1m40s
Add timer script
Based on
6b71b580de/bin/timer
and
6b71b580de/bin/_timer.
2025-07-11 01:31:02 +01:00

19 lines
294 B
Nix

{ pkgs }:
pkgs.writeShellApplication {
name = "_timer";
runtimeInputs = with pkgs; [
coreutils
libnotify
];
text = ''
mins=$1
message=''${2:-Time out!}
sleep $((mins * 60))
notify-send -t 0 "''${message}" "Your timer of $mins min is over" -u normal
'';
}