Based on6b71b580de/bin/timerand6b71b580de/bin/_timer.
This commit is contained in:
parent
c676972d0b
commit
e5ae3a4be7
4 changed files with 43 additions and 0 deletions
19
packages/_timer.nix
Normal file
19
packages/_timer.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue