Create scripts to add to and edit daily todo files
All checks were successful
/ check (push) Successful in 1m21s
All checks were successful
/ check (push) Successful in 1m21s
This commit is contained in:
parent
3a8388b09f
commit
24fc8e6845
7 changed files with 66 additions and 0 deletions
13
pkgs/todos/todos-add.nix
Normal file
13
pkgs/todos/todos-add.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "todos-add";
|
||||
|
||||
text = ''
|
||||
TODOS_DIRECTORY="''${TODOS_DIRECTORY:-"$XDG_DOCUMENTS_DIR/todos"}"
|
||||
export TODOS_DIRECTORY
|
||||
|
||||
echo "$*" >> "$TODOS_DIRECTORY/$(date +%Y-%m-%d).txt"
|
||||
'';
|
||||
}
|
||||
|
12
pkgs/todos/todos-edit.nix
Normal file
12
pkgs/todos/todos-edit.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "todos-edit";
|
||||
|
||||
text = ''
|
||||
TODOS_DIRECTORY="''${TODOS_DIRECTORY:-"$XDG_DOCUMENTS_DIR/todos"}"
|
||||
export TODOS_DIRECTORY
|
||||
|
||||
"$EDITOR" "$TODOS_DIRECTORY/$(date +%Y-%m-%d).txt";
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue