mirror of
https://github.com/kmein/niveum
synced 2026-03-23 13:21:06 +01:00
format
This commit is contained in:
@@ -6,20 +6,24 @@
|
||||
coreutils,
|
||||
noteDirectory ? "~/state/obsidian",
|
||||
currentDates ? false,
|
||||
obsidian-vim
|
||||
obsidian-vim,
|
||||
}:
|
||||
writers.writeDashBin "notemenu" ''
|
||||
set -efu
|
||||
PATH=$PATH:${
|
||||
lib.makeBinPath [rofi findutils coreutils]
|
||||
lib.makeBinPath [
|
||||
rofi
|
||||
findutils
|
||||
coreutils
|
||||
]
|
||||
}
|
||||
|
||||
cd ${noteDirectory}
|
||||
note_file=$({
|
||||
${lib.optionalString currentDates ''
|
||||
echo $(date -I).md
|
||||
echo $(date -I -d yesterday).md
|
||||
''}
|
||||
echo $(date -I).md
|
||||
echo $(date -I -d yesterday).md
|
||||
''}
|
||||
find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
|
||||
Reference in New Issue
Block a user