You've already forked dotfiles
instead of the custom one (works well enough), removing lazy loading of the plugin to allow calling from telekasten commands from nvim load, and adding ZSH functions to open a new note or today's note immediately.
31 lines
735 B
Plaintext
31 lines
735 B
Plaintext
### Custom functions
|
|
# Timing function for checking zsh load speed
|
|
function timezsh() {
|
|
shell=$SHELL
|
|
for i in $(seq 1 10)
|
|
do
|
|
ts=$(date +%s%N)
|
|
$SHELL -i -c exit
|
|
echo $((($(date +%s%N) - $ts)/1000000))ms
|
|
done
|
|
}
|
|
|
|
# Custom rsync move function that also removes empty directories that have their contents removed
|
|
# NOTE: This will delete *any* empty directories in the CWD
|
|
function rmv() {
|
|
rsync -avzhP --remove-source-files --ignore-existing "${@:1:$#-1}" "${@:$#}" && \
|
|
find ./* -depth -type d -empty -exec rmdir "{}" \;
|
|
}
|
|
|
|
function note() {
|
|
nvim -c ":Telekasten new_note"
|
|
}
|
|
|
|
function today() {
|
|
nvim -c ":Telekasten goto_today"
|
|
}
|
|
|
|
function path() {
|
|
echo -e ${PATH//:/\\n}
|
|
}
|