This commit is contained in:
parent
722a5814fa
commit
2870a256da
4 changed files with 24 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
|||
time-until
|
||||
update-all-git-repos
|
||||
vix
|
||||
zet-new
|
||||
];
|
||||
|
||||
xdg.configFile."pam-gnupg".text = ''
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
unmounter
|
||||
update-all-git-repos
|
||||
vix
|
||||
zet-new
|
||||
];
|
||||
|
||||
xdg.configFile."pam-gnupg".text = ''
|
||||
|
|
|
@ -31,6 +31,7 @@ in
|
|||
unmounter = callPackage ./unmounter.nix { };
|
||||
update-all-git-repos = callPackage ./update-all-git-repos.nix { };
|
||||
vix = callPackage ./vix.nix { };
|
||||
zet-new = callPackage ./zet-new.nix { };
|
||||
|
||||
vimPlugins = prev.vimPlugins // vimPlugins;
|
||||
}
|
||||
|
|
21
packages/zet-new.nix
Normal file
21
packages/zet-new.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "zet-new";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
];
|
||||
|
||||
text = ''
|
||||
folder="''${ZET_DIR:-"$XDG_DOCUMENTS_DIR/wiki/zet"}"
|
||||
|
||||
mkdir -p "$folder"
|
||||
|
||||
note="$folder/$(date +%Y-%m-%d-%T | sed 's/[-:]//g').md"
|
||||
|
||||
printf "# %s\n\n\n" "$1" > "$note"
|
||||
|
||||
"$EDITOR" "+normal G" "$note"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue