Add timer script
All checks were successful
/ check (push) Successful in 1m40s

Based on
6b71b580de/bin/timer
and
6b71b580de/bin/_timer.
This commit is contained in:
Oliver Davies 2025-07-11 01:31:02 +01:00
parent c676972d0b
commit e5ae3a4be7
4 changed files with 43 additions and 0 deletions

19
packages/_timer.nix Normal file
View file

@ -0,0 +1,19 @@
{ 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
'';
}