diff --git a/nvim/.config/nvim/after/ftplugin/markdown.lua b/nvim/.config/nvim/after/ftplugin/markdown.lua index 50d5511..ac9769d 100644 --- a/nvim/.config/nvim/after/ftplugin/markdown.lua +++ b/nvim/.config/nvim/after/ftplugin/markdown.lua @@ -11,12 +11,19 @@ if require("core.util").is_available("zk") and require("zk.util").notebook_root( map("n", "", "lua vim.lsp.buf.definition()", { silent = true }) end --- execute code cells -if vim.fn.mapcheck("cc") == "" then - map("n", "cc", require("mdeval").eval_code_block, { silent = true, desc = "evaluate code block" }) -end -if vim.fn.mapcheck("cx") == "" then - map("n", "cx", require("mdeval").eval_clean_results, { silent = true, desc = "clear code results" }) +if require("core.util").is_available("mdeval") then + -- execute code cells + if vim.fn.mapcheck("cc") == "" then + map("n", "cc", require("mdeval").eval_code_block, { silent = true, desc = "evaluate code block" }) + end + if vim.fn.mapcheck("cx") == "" then + map( + "n", + "cx", + require("mdeval").eval_clean_results, + { silent = true, desc = "clear code results" } + ) + end end -- jump to beginning of previous/ next cell code diff --git a/qutebrowser/config/freedirect/freedirect.py b/qutebrowser/config/freedirect/freedirect.py index b18e3f0..0b2999c 100644 --- a/qutebrowser/config/freedirect/freedirect.py +++ b/qutebrowser/config/freedirect/freedirect.py @@ -65,10 +65,22 @@ default_services = [ ), Service(source=["quora.com"], target=["quetre"]), Service(source=["google.com"], target=["whoogle"]), - Service(source=["genius.com"], target=["dumb"]), Service(source=["translate.google.com"], target=["lingva", "simplytranslate"]), Service(source=["deepl.com"], target=["simplytranslate"]), Service(source=["bandcamp.com"], target=["tent"]), + Service( + custom_targets=True, + source=["genius.com"], + target=[ + "dumb.privacydev.net", + "dumb.privacydev.net", + "dm.vern.cc", + "sing.whatever.social", + "dumb.nunosempere.com", + "dumb.lunar.icu", + "dumb.esmailelbob.xyz", + ], + ), Service( custom_targets=True, source=["pinterest.com"], diff --git a/terminal/.config/vifm/favicons.vifm b/terminal/.config/vifm/favicons.vifm index e44f644..dc59c3d 100644 --- a/terminal/.config/vifm/favicons.vifm +++ b/terminal/.config/vifm/favicons.vifm @@ -6,7 +6,7 @@ " Specific directories set classify+=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::/, \  ::.git/::/, - \  ::.config/,,Makefile::/, + \  ::.config/::/, \  ::Desktop/::/, \  ::Documents/::/, \  ::Development/::/, @@ -24,7 +24,7 @@ set classify+=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../:: \  ::node_modules/::/' " Specific files -set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::/, +set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,Makefile::, \  ::favicon.*,,README,,readme::, \  ::.vim,,.vimrc,,.gvimrc,,.vifm::, \  ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::, @@ -45,7 +45,7 @@ set classify+='λ ::*.ml,,*.mli::, \  ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::, \  ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::, \  ::*.mustasche::, - \  ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg::, + \  ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.yaml,,*.cfg::, \  ::*.rss::, \  ::*.coffee::, \  ::*.twig::, diff --git a/vcs/jj/config/jj/config.toml b/vcs/jj/config/jj/config.toml index 174fd04..520db74 100644 --- a/vcs/jj/config/jj/config.toml +++ b/vcs/jj/config/jj/config.toml @@ -9,9 +9,10 @@ key = "73BA40D5AFAF49C9" [git] sign-on-push = true subprocess = true -private-commits = "description(glob:'wip:*') | description(glob:'private:*')" # refuse to push WIP commits +private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')" # refuse to push WIP commits [ui] +default-command = "log" diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"] pager = "delta" @@ -39,3 +40,4 @@ log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | tru "downstream(x,y)" = "(x::y) & y" "branches" = "downstream(trunk(), bookmarks()) & mine()" "curbranch" = "latest(branches::@- & branches)" +"githead" = "::git_head()" diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index b6046b4..8e1c841 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -14,20 +14,17 @@ alias jds="jj describe" alias jc="jj commit" # finding out the current snapshot -js() { - if [ "$#" -eq 0 ]; then - jj status - else - jj show "$*" - fi -} +alias js="jj status" alias jw="jj show" alias jd="jj diff" # for describe-and-edit workflows # https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-edit-workflow.html alias je="jj edit" -alias jee="jj next --edit" +alias jen="jj next --edit" +alias jep="jj prev --edit" +alias jenn="jj next" +alias jepp="jj prev" # for squash-and-go workflows # https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-squash-workflow.html @@ -36,16 +33,19 @@ alias jsi="jj squash --interactive" # oops buttons alias ju="jj undo" -# for damn,-forgot-to-split-this-commit workflow -# Creates a new commit before with your selected changes, lets you describe it and carry on -alias ji="jj new -B@ --no-edit && jj squash --interactive && jj edit '@-' && jj describe && jj edit '@+'" +# allows you to split the current change into multiple +alias ji="jj split" +# quickly get rid of a change +alias jab="jj abandon" # revset info +alias J="jj log -r 'all()'" # mirror default command being log alias jl="jj log -T builtin_log_oneline" -alias jL="jj log -r 'all()'" +alias JL="jj log -T builtin_log_oneline -r 'all()'" alias jlo="jj log --summary" -alias jLO="jj log --summary -r 'all()'" +alias JLO="jj log --summary -r 'all()'" alias jloo="jj log --patch" +alias JLOO="jj log --patch -r 'all()'" alias jol="jj op log" jlf() { jj log -r "description($*)" @@ -64,7 +64,9 @@ alias jrb="jj rebase" # 'branching' bookmark work alias jb="jj bookmark" -alias jbm="jj bookmark set main" +jbm() { + jj bookmark set -r "${1:-@}" main +} # remote work alias jrv="jj git remote list" diff --git a/writing/jrnl/config/jrnl/jrnl.yaml b/writing/jrnl/config/jrnl/jrnl.yaml index 14741d0..20dc11c 100644 --- a/writing/jrnl/config/jrnl/jrnl.yaml +++ b/writing/jrnl/config/jrnl/jrnl.yaml @@ -11,7 +11,7 @@ highlight: true indent_character: '|' journals: default: - journal: ~/documents/records/jrnl.md + journal: ~/documents/notes/journal/jrnl.md linewrap: 79 tagsymbols: + template: false diff --git a/writing/zk/config/sh/alias.d/zk.sh b/writing/zk/config/sh/alias.d/zk.sh index 998e0c3..344b589 100644 --- a/writing/zk/config/sh/alias.d/zk.sh +++ b/writing/zk/config/sh/alias.d/zk.sh @@ -1,19 +1,35 @@ #!/usr/bin/env sh # +_zk_wiki() { + zk --notebook-dir="$WIKIROOT" "$@" +} + n() { if [ $# -eq 0 ]; then - zk edit -i + _zk_wiki edit -i else - zk "${@}" + _zk_wiki "${@}" fi } -# open notes with my vim zettelkasten plugin -# TODO better implementation conditional on zk.nvim & zettelkasten existing -# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow -if command -v nvim >/dev/null 2>&1; then - alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"' -fi +# We have a local wiki +if [ -n "${WIKIROOT}" ]; then + # open notes with my vim zettelkasten plugin + # TODO better implementation conditional on zk.nvim & zettelkasten existing + # nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow + if command -v nvim >/dev/null 2>&1; then + alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"' + fi -alias ncd='pushd $WIKIROOT' + alias ncd='cd $WIKIROOT' + nn() { # 'new note' + _zk_wiki new "$@" + } + nnl() { # 'new note log' + _zk_wiki log "$@" + } + nnd() { # 'new note draft' + _zk_wiki draft "$@" + } +fi