Rename wiki to zk (zettelkasten)

master
Hektor Misplon 2023-05-01 15:34:27 +02:00
parent 5fd5686fd4
commit ead293ba46
8 changed files with 24 additions and 22 deletions

View File

@ -54,7 +54,7 @@ alias path="echo -e ${PATH//:/\\n}" # Pretty print path variables
alias feh="feh -B black --scale-down --auto-zoom" alias feh="feh -B black --scale-down --auto-zoom"
alias fm='pcmanfm' alias fm='pcmanfm'
alias v="nvim" alias v="nvim"
alias w="nvim +WikiIndex" alias zk="nvim +WikiIndex"
alias g='git' alias g='git'
alias lm='xbacklight -set' alias lm='xbacklight -set'
alias py='python' alias py='python'

View File

@ -112,3 +112,6 @@ export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
# Conda {{{ # Conda {{{
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh [ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh
# }}} # }}}
# Zettelkasten {{{
export ZK_PATH="$HOME/.zk"

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
cd "$HOME/.wiki" || echo "No .vimwiki directory found"
git a "$HOME/.wiki"
git cm 'Update'
git push

4
.bin/save-zk Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd "$ZK_PATH" || echo "No zettelkasten directory found"
git a . && git commit -m "Update" && git push

View File

@ -5,13 +5,14 @@ session="main"
tmux attach-session -t $session || tmux new-session -s $session \; \ tmux attach-session -t $session || tmux new-session -s $session \; \
rename-window todo \; \ rename-window todo \; \
send-keys -t 0 "task" C-m \; \ send-keys -t 0 "task" C-m \; \
new-window -n wiki \; \ new-window -n zk \; \
send-keys -t 0 "vim $HOME/.wiki/index.md" C-m \; \ send-keys -t 0 "nvim $ZK_PATH/index.md" C-m \; \
new-window -n music \; \ new-window -n music \; \
send-keys -t 0 "ncspot" C-m \; \ send-keys -t 0 "ncspot" C-m \; \
new-window -n term \; \ new-window -n term \; \
new-window -n make \; \ new-window -n make \; \
split-window -h \; \ split-window -h \; \
send-keys -t 0 'cd "$HOME/.wiki" && ./entr' C-m \; \ split-window -h \; \
send-keys -t 1 'cd "$HOME/.wiki" && live-server . --watch *.html' C-m \; \ send-keys -t 0 'cd "$ZK_PATH" && ./entr' C-m \; \
send-keys -t 1 'cd "$ZK_PATH" && live-server . --watch=*.html' C-m \; \
select-window -t 2 \; select-window -t 2 \;

10
.gitignore vendored
View File

@ -83,8 +83,8 @@ dkms.conf
# Dotenv # Dotenv
.env .env
.wiki/* .zk/*
!.wiki/Makefile !.zk/Makefile
!.wiki/pandoc.css !.zk/pandoc.css
!.wiki/scripts/ !.zk/scripts/
!.wiki/filters/ !.zk/filters/

View File

@ -149,7 +149,7 @@
"svelte.enable-ts-plugin": true, "svelte.enable-ts-plugin": true,
// Add BibTex file for coc-bibtex autocompletion // Add BibTex file for coc-bibtex autocompletion
"list.source.bibtex.files": ["~/.wiki/references.bib", "./*.bib"], "list.source.bibtex.files": ["~/.zk/references.bib", "./*.bib"],
"bibtex.silent": true, "bibtex.silent": true,
// Adjust floating menus // Adjust floating menus

10
.vimrc
View File

@ -352,17 +352,17 @@ let g:pandoc#syntax#conceal#cchar_overrides = { "atx": " ", "li": "·" }
" `euclio/vim-markdown-composer` {{{ " `euclio/vim-markdown-composer` {{{
let g:markdown_composer_custom_css = ['file:///home/h/.wiki/pandoc.css'] let g:markdown_composer_custom_css = ['file:///home/h/.zk/pandoc.css']
let g:markdown_composer_external_renderer='pandoc -f markdown+latex_macros-yaml_metadata_block -t html5 --mathjax --bibliograph /home/h/.wiki/references.bib --citeproc --lua-filter=/home/h/.wiki/lua-filters/diagram-generator/diagram-generator.lua --lua-filter=/home/h/.wiki/filters/html-links.lua --lua-filter=/home/h/.wiki/filters/tikz.lua' let g:markdown_composer_external_renderer='pandoc -f markdown+latex_macros-yaml_metadata_block -t html5 --mathjax --bibliograph /home/h/.zk/references.bib --citeproc --lua-filter=/home/h/.wiki/lua-filters/diagram-generator/diagram-generator.lua --lua-filter=/home/h/.wiki/filters/html-links.lua --lua-filter=/home/h/.zk/filters/tikz.lua'
let g:markdown_composer_autostart = 0 let g:markdown_composer_autostart = 0
" }}} " }}}
" `lervag/wiki.vim` {{{ " `lervag/wiki.vim` {{{
" Only load wiki.vim for wiki directory " Only load wiki.vim for zk directory
let g:wiki_global_load=0 let g:wiki_global_load=0
let g:wiki_root='~/.wiki' let g:wiki_root='~/.zk'
let g:wiki_index_name='index' let g:wiki_index_name='index'
let g:wiki_zotero_root='~/doc/Zotero' let g:wiki_zotero_root='~/doc/Zotero'
let g:wiki_filetypes=['md'] let g:wiki_filetypes=['md']
@ -495,7 +495,7 @@ au FileType javascript set mps+==:;
au BufNewFile,BufRead */.vscode/*.json setlocal filetype=jsonc au BufNewFile,BufRead */.vscode/*.json setlocal filetype=jsonc
" Hacky way to pass on active note to script for automated for HTML preview " Hacky way to pass on active note to script for automated for HTML preview
au BufEnter /home/h/.wiki/*.md silent exe '!echo %:t > /home/h/.local/share/nvim/plugged/bro/current-page' au BufEnter /home/h/.zk/*.md silent exe '!echo %:t > /home/h/.local/share/nvim/plugged/bro/current-page'
" }}} " }}}