From 29d1a2453df3bb668625bc92ca9744716e7863ef Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 31 Aug 2023 08:56:12 +0200 Subject: [PATCH 01/15] papis: Differentiate between emgs and academia Moved my old study library to the more descriptive emgs library to differentiate from newly added studies under the academia library. Both can still be accessed through the main library. --- writing/.config/papis/config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/writing/.config/papis/config b/writing/.config/papis/config index 7318dec..e04bbb4 100644 --- a/writing/.config/papis/config +++ b/writing/.config/papis/config @@ -1,6 +1,6 @@ [settings] #opentool = zathura -#picktool = fzf +picktool = papis-tui default-library = master file-browser = vifm ref-format = {doc[author_list][0][family]}{doc[year]} @@ -28,6 +28,9 @@ editmore = vi [master] dir = ~/documents/library +[emgs] +dir = ~/documents/library/emgs + [academia] dir = ~/documents/library/academia From 248f171f48bc2ec0a4b1d36160a047ed6ee07e14 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 31 Aug 2023 12:20:08 +0200 Subject: [PATCH 02/15] papis: Improve tui table view rendering Show read status, tags, attached documents and notes in a swift overview - trying to somewhat mimic the JabRef table view since I like it quite a lot. --- writing/.config/papis/papistui.yaml | 46 +++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/writing/.config/papis/papistui.yaml b/writing/.config/papis/papistui.yaml index 2570a70..0fce280 100644 --- a/writing/.config/papis/papistui.yaml +++ b/writing/.config/papis/papistui.yaml @@ -5,10 +5,11 @@ documentlist: marked-icon: "" multilinestyle: rows: - - "{doc.alias('type')} {doc['ref']} {doc.forfile('')}" + # TODO: show if already note attached; have info window display note content? + - "{doc.alias('type')} {doc['ref']}{' 󰘓 ' if doc['file'] else ''} {doc.alias('readstatus')}" - "{doc.html_escape['title']}" - "{doc.html_escape['author']}" - - "{doc.foreach('tags', '({})', split = ', ', sep = ' ')}" + - "{doc.foreach('tags', '({})', split = ', ', sep = ' ')}" tablestyle: separator: " " headerstyle: "underline|bold" @@ -16,26 +17,48 @@ documentlist: cursorrowstyle: "black_white|bold" columns: - { - header: " #", - content: "{doc.alias('type')} {str(len(doc.get_files()) if len(doc.get_files()) > 0 else '')}", - width: 3, + header: "󰑇", + content: "{'󰗠' if doc['readstatus'] == 'read' else '󰗡' if doc['readstatus'] == 'skimmed' else ' '}", + width: 1, } - - { header: "Reference", content: "@{doc['ref']}", width: 15 } + - { + header: "", + content: "{'󰎚' if doc['notes'] else '󰎛' if doc['note'] else ' '}", + width: 1, + } + - { + header: "󰉺", + content: "{doc.alias('type')}", + width: 1, + } + - { header: "Authors", content: "{doc['author']}", width: 25 } - { header: "Year", content: "{str(doc['year'])}", width: 4 } - - { header: "Authors", content: "{doc['author']}", width: 20 } - - { header: "Title", content: "{doc['title']}", width: 200 } + - { header: "Title", content: "{doc['title']}", width: 125 } + - { header: "Reference", content: "{doc['ref']}", width: 15 } + - { + header: "󰘓", + content: "{str(len(doc.get_files()) if len(doc.get_files()) > 0 else '')}", + width: 1, + } + - { header: "Tags", content: "{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}", width: 35 } aliases: type: { article: "", book: "", incollection: "󰪧", - inbook: '', + inbook: "", software: "", presentation: "󰐨", thesis: "", - _default_: "", + _default_: "", } + readstatus: + { + read: "󰗠", + skimmed: "󰗡" + } + keymappings: q: quit "?": help @@ -81,7 +104,7 @@ infowindow: commandline: search: - keyword_aliases: {a: 'author:', t: 'title:', y: 'year:', k: 'tags:'} + keyword_aliases: { a: "author:", t: "title:", y: "year:", k: "tags:" } statusbar: left: @@ -92,4 +115,3 @@ statusbar: search: " {info['mode_upper']} " right: default: "{info['sortkeys']} {info['idx']} < {info['marked']} < {info['view']} < {info['items']} " - From 01405b943829958331e07b6660c2aa153868be16 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 31 Aug 2023 12:23:34 +0200 Subject: [PATCH 03/15] papis: Change key bindings Unified key bindings roughly to localleader=, anything with `,` in front will affect the current documents somehow (e.g. mark them read, add a tag, ..). jumpto=' prepending with `'` will affect the current view (e.g. limit to unread documents, limit to entries with notes, ..). Sorting can be done with `S`, like in vifm. Display style can be toggled to table with `T`. --- writing/.config/papis/papistui.yaml | 73 ++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/writing/.config/papis/papistui.yaml b/writing/.config/papis/papistui.yaml index 0fce280..3d074ec 100644 --- a/writing/.config/papis/papistui.yaml +++ b/writing/.config/papis/papistui.yaml @@ -62,7 +62,8 @@ documentlist: keymappings: q: quit "?": help - S: toggle_style + T: toggle_style + S: cmd "sort " /: search_mode : scroll_down : scroll_up @@ -74,29 +75,87 @@ keymappings: k: scroll_up o: open -r "pdf$" O: open -d - r: view_reset - R: reload - e: edit - n: papis edit -n papis_id:{doc['papis_id']} + b: browse + B: browse -k doi + R: view_reset + : reload + e: + - edit + - edit info + n: + - papis edit -n papis_id:{doc['papis_id']} + - edit notes + "'n": + - search "notes:.+" + - limit to entries with notes + "'u": + - search "readstatus:read OR readstatus:skimmed" + - limit to unread entries + "'r": + - search "NOT readstatus:read AND NOT readstatus:skimmed" + - limit to read entries " ": mark_selected mm: mark_selected M: mark_down + J: mark_down mu: unmark_all mv: mark_view - t: cmd "tag " + ",r": + - papis update -s readstatus read papis_id:{doc['papis_id']} + - set readstatus read + ",k": + - papis update -s readstatus skimmed papis_id:{doc['papis_id']} + - set readstatus skimmed + ",u": + - papis update -s readstatus "" papis_id:{doc['papis_id']} + - set readstatus unread + ",t": cmd "tag " i: - info_toggle - "Toggle info window" I: - info_cycle - "Cycle info windows" + : info_scroll_up + : info_scroll_down + # all require 'clip' script to be available on PATH + yy: + - copy_to_clipboard "[@{doc['ref']}]" + - yank pandoc-styled reference + ss: + - vim_send "[@{doc['ref']}]" + - send vim pandoc-styled reference + yl: + - copy_to_clipboard "\\cite\{{doc['ref']}\}" + - yank latex-styled reference + sl: + - vim_send "\\cite\{{doc['ref']}\}" + - send vim latex-styled reference + yr: + - copy_to_clipboard "{format_reference(doc,style='apa')}" + - yank apa-styled reference + sr: + - vim_send "{format_reference(doc,style='apa')}" + - send vim apa-styled reference + yt: + - copy_to_clipboard "{doc['title']}" + - yank title + yu: + - copy_to_clipboard "{doc['url']}" + - yank url + yd: + - copy_to_clipboard "{doc['doi']}" + - yank doi # TODO look into https://github.com/supersambo/papis-tui vim-send mappings infowindow: default_on: False views: + doc: + content: "author: {doc['author'].strip()}\n title: {doc['title'].strip()}\n tags:{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}" + height: 8 apa: - content: "{format_reference(doc)}" + content: "{format_reference(doc,style='apa')}" abstract: content: "{doc['abstract']}" linewrap: True From dd133aa85ba9116abf110aad994beac7bc1b53ac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 31 Aug 2023 12:25:01 +0200 Subject: [PATCH 04/15] sh: Change PATH local binary order Prepend local binary directory to path instead of appending. In effect makes user-local binaries overwrite system-wide binaries. --- sh/.config/sh/xdg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index 45407b5..38bbd99 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -35,7 +35,7 @@ export XDG_VIDEOS_DIR="$HOME/videos" test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects" test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" # anything on BIN_HOME should be executable form anywhere -export PATH="$PATH:$XDG_BIN_HOME" +export PATH="$XDG_BIN_HOME:$PATH" ## Applications that can be set through environment variables export ANDROID_HOME="$XDG_DATA_HOME/android" From 62beaae3e9bf19faecec5b80ae459d706f98fbd6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 31 Aug 2023 12:26:14 +0200 Subject: [PATCH 05/15] papis: Rename main library to 'main' Mimicking my move from master branches to main, now my overall general library also resides in 'main' instead of 'master'. No real visible change, but unifies the wording for everything. --- writing/.config/papis/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/writing/.config/papis/config b/writing/.config/papis/config index e04bbb4..0742dc7 100644 --- a/writing/.config/papis/config +++ b/writing/.config/papis/config @@ -1,7 +1,7 @@ [settings] #opentool = zathura picktool = papis-tui -default-library = master +default-library = main file-browser = vifm ref-format = {doc[author_list][0][family]}{doc[year]} @@ -25,7 +25,7 @@ mark-opener = zathura -P {mark[value]} [tui] editmore = vi -[master] +[main] dir = ~/documents/library [emgs] From bb06274c4922efb4b4ec92e7fba5f252b2ac422a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:12:17 +0200 Subject: [PATCH 06/15] bootstrap: Add bbt plugin to papis install Added my custom bbt-formatter to the papis installation created on this machine. It is injected through pipx. --- bootstrap/packages_stable.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/packages_stable.tsv b/bootstrap/packages_stable.tsv index c449b4a..07c8f23 100644 --- a/bootstrap/packages_stable.tsv +++ b/bootstrap/packages_stable.tsv @@ -203,7 +203,7 @@ offpunk-git Fork of the command-line Gemini client AV-98 with added offline capa oh-my-zsh-git A community-driven framework for managing your zsh configuration. Includes 180+ optional plugins and over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community A os-prober Utility to detect other OSes on a set of drives R pacman-contrib Contributed scripts and tools for pacman systems R -papis Papis is a powerful and highly extensible command-line based document and bibliography manager. P whoosh,papis-zotero,papis-scihub,git+https://git.martyoeh.me/Marty/papis-extract.git,git+https://github.com/supersambo/papis-tui +papis Papis is a powerful and highly extensible command-line based document and bibliography manager. P whoosh,papis-zotero,papis-scihub,git+https://git.martyoeh.me/Marty/papis-extract.git,git+https://github.com/supersambo/papis-tui,pybtex-apa-style,git+https://git.martyoeh.me/Marty/papis-bbt-formatter.git parallel A shell tool for executing jobs in parallel R parsec-bin Remotely connect to a gaming pc for a low latency remote computing experience A paru-bin Feature packed AUR helper A From 580f8e14526558b3fdd58fe2f629a5fa894ce5f9 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:14:49 +0200 Subject: [PATCH 07/15] kanshi: Add profiles for triple-/single-display Added a profile for having all my screens display something when docked (when usually the internal screen is turned off) as well as to *only* display the internal screen even when connected to the dock (should the need ever arise). --- desktop/.config/kanshi/config | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/desktop/.config/kanshi/config b/desktop/.config/kanshi/config index 111d1a2..0aaded9 100644 --- a/desktop/.config/kanshi/config +++ b/desktop/.config/kanshi/config @@ -12,6 +12,20 @@ profile docked { exec notify-send "💻 Display changed" "Applying docked Goldstar profile" } +profile dockedall { + output "LG Electronics W2442 0x000075FD" position 1920,0 + output "LG Electronics W2442 0x000075E1" position 0,0 + output eDP-1 enable position 960,1080 + exec notify-send "💻 Display changed" "Applying docked 3-screen profile" +} + +profile portable { + output "LG Electronics W2442 0x000075FD" disable + output "LG Electronics W2442 0x000075E1" disable + output eDP-1 enable position 0,0 + exec notify-send "💻 Display changed" "Applying portable profile" +} + profile portable { output eDP-1 enable position 0,0 exec notify-send "💻 Display changed" "Applying portable profile" From 3562007bc81c128684e83d0c7e4a52ba1680447f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:17:20 +0200 Subject: [PATCH 08/15] beets: Remove acousticbrainz plugin With the sunsetting of acousticbrainz I think it is time to confront reality and remove the plugin. Was a lot of fun to play around with and create playlists from that followed music beats, mood or similar but ultimately it slowed down importing a lot and I never earnestly used it for anything. --- multimedia/.config/beets/config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/multimedia/.config/beets/config.yaml b/multimedia/.config/beets/config.yaml index 9dee535..03b417d 100644 --- a/multimedia/.config/beets/config.yaml +++ b/multimedia/.config/beets/config.yaml @@ -60,7 +60,6 @@ match: rec_gap_thresh: 0.25 plugins: - - acousticbrainz - bandcamp - chroma - deezer From 60ae2e43c3801d53ad6ddd864d619a11f7fd1466 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:18:19 +0200 Subject: [PATCH 09/15] nvim: Switch signature help to cmp plugin Simply switched signature help. Need to extensively test, but to be perfectly honest the previous sig help plugin did not work all the time either. --- nvim/.config/nvim/lazy-lock.json | 2 +- nvim/.config/nvim/lua/plugins/config/cmp.lua | 1 + nvim/.config/nvim/lua/plugins/ide.lua | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 21b6c68..c51d68e 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -12,6 +12,7 @@ "cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, @@ -34,7 +35,6 @@ "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, "lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" }, "lsp-setup.nvim": { "branch": "main", "commit": "64542fb0da06414cdfaa0c5236b743679bb7ba7f" }, - "lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "magma-nvim-goose": { "branch": "main", "commit": "9a626aab63361d027541d023707f82e28d7f872c" }, "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, diff --git a/nvim/.config/nvim/lua/plugins/config/cmp.lua b/nvim/.config/nvim/lua/plugins/config/cmp.lua index bf1ac57..ccb80af 100644 --- a/nvim/.config/nvim/lua/plugins/config/cmp.lua +++ b/nvim/.config/nvim/lua/plugins/config/cmp.lua @@ -43,6 +43,7 @@ cmp.setup({ }, sources = { { name = "nvim_lsp" }, + { name = "nvim_lsp_signature_help" }, { name = "otter" }, { name = "luasnip", keyword_length = 2 }, { name = "pandoc_references" }, diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index 32c9a69..1fe0a9e 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -13,8 +13,6 @@ return { backends = { "treesitter", "lsp", "markdown", "man" }, }, }, - -- show a signature whenever editing a function or similar - { "ray-x/lsp_signature.nvim", config = true, event = "VeryLazy" }, { "junnplus/lsp-setup.nvim", dependencies = { @@ -66,6 +64,7 @@ return { "hrsh7th/cmp-calc", "hrsh7th/cmp-cmdline", "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp-signature-help", "dmitmel/cmp-digraphs", "jc-doyle/cmp-pandoc-references", "kdheepak/cmp-latex-symbols", From c7393c9114f3a9a9e1f2cc70267d75b806fbfc8a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:20:04 +0200 Subject: [PATCH 10/15] nvim: Move between git conflict hunks with ][H Since we move between git chunks with ]h/[h, we may as well move between git *conflict* chunks (should there be any) with ]H and [H mirroring the diagnostics/error setup situation. --- nvim/.config/nvim/lua/plugins/git.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua index 21e7deb..3c52bad 100644 --- a/nvim/.config/nvim/lua/plugins/git.lua +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -11,8 +11,8 @@ return { vim.keymap.set("n", "hO", "(git-conflict-theirs)", { desc = "Conflict use theirs" }) vim.keymap.set("n", "hm", "(git-conflict-both)", { desc = "Conflict use both" }) vim.keymap.set("n", "hM", "(git-conflict-none)", { desc = "Conflict use none" }) - vim.keymap.set("n", "[x", "(git-conflict-prev-conflict)", { desc = "Prev git conflict" }) - vim.keymap.set("n", "]x", "(git-conflict-next-conflict)", { desc = "Next git conflict" }) + vim.keymap.set("n", "[H", "(git-conflict-prev-conflict)", { desc = "Prev git conflict" }) + vim.keymap.set("n", "]H", "(git-conflict-next-conflict)", { desc = "Next git conflict" }) end, lazy = false, -- TODO needs to be force refreshed in lazy loaded mode unfortunately }, From f31b1b29ed793a1285616323234d03ad97f98b16 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:20:25 +0200 Subject: [PATCH 11/15] nvim: Enable marksman lsp for quarto files --- nvim/.config/nvim/lua/plugins/config/lsp.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/config/lsp.lua b/nvim/.config/nvim/lua/plugins/config/lsp.lua index 294b615..b2d611d 100644 --- a/nvim/.config/nvim/lua/plugins/config/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/config/lsp.lua @@ -29,7 +29,9 @@ local servers = { }, }, }, - marksman = {}, + marksman = { + filetypes = { "markdown", "quarto" }, + }, pyright = {}, ruff_lsp = {}, serve_d = {}, From 061e3412532dbaef7aaa224ec5b5be822aa79c38 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:22:03 +0200 Subject: [PATCH 12/15] nvim: Remove speed-reading plugin The 'bionic-reading' mode, I have never used successfully. It distracts rather than enabling me to move over text more quickly. --- nvim/.config/nvim/lazy-lock.json | 1 - nvim/.config/nvim/lua/plugins/prose.lua | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index c51d68e..bf409e1 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -24,7 +24,6 @@ "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" }, "dressing.nvim": { "branch": "master", "commit": "c0b67f3e2950adc07b555d3e73e38275b4a585ce" }, - "easyread.nvim": { "branch": "main", "commit": "0b07e315a4cd7d700c4a794bdddbec79fdc2628b" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "friendly-snippets": { "branch": "main", "commit": "377d45475b49e37460a902d6d569d2093d4037d0" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" }, diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 4e44578..695a6c1 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -6,13 +6,6 @@ return { { "folke/zen-mode.nvim", config = true, event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs) { "folke/twilight.nvim", event = "VeryLazy" }, - -- enable 'speed-reading' mode (bionic reading) - { - "JellyApple102/easyread.nvim", - config = true, - ft = writing_ft, - cmd = "EasyreadToggle", - }, { "andrewferrier/wrapping.nvim", config = function() @@ -26,8 +19,8 @@ return { { "lukas-reineke/headlines.nvim", dependencies = "nvim-treesitter/nvim-treesitter", - config = true, - ft = writing_ft, + config = true, + ft = writing_ft, }, -- generate an auto-updating html preview for md files { From 6e60101b9b875ede2e73e7efea7864d30687f5af Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:23:23 +0200 Subject: [PATCH 13/15] papis: Improve tui rendering and add priority maps We render the priority of an entry in both table and multiline mode, with priority >=1 being highest, >=3 being medium and everything >5 being low priority. We also have some maps for quickly setting the priority of an entry from the tui: `,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5). Lastly, I quickly added some to-dos that require the input of the maintainer or some work in a fork, so I don't forget. I also should not forget that I implemented some of them locally already and am using them. --- writing/.config/papis/papistui.yaml | 39 +++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/writing/.config/papis/papistui.yaml b/writing/.config/papis/papistui.yaml index 3d074ec..da07300 100644 --- a/writing/.config/papis/papistui.yaml +++ b/writing/.config/papis/papistui.yaml @@ -1,12 +1,22 @@ +# current issues/requests +# - [ ] call arbitrary shell command +# - [ ] non-blocking opening of files +# - [ ] distinguish in config between aliases for multiline/table +# - [ ] update view after more operations +# - if I call an 'update' command (e.g. set new tag or read status), it will not update in list until 'edit' command invoked and rebuilding the list +# - two selection additions: +# - [ ] select all in view +# - [ ] limit view to currently selected +# base: vimflavour: nvim documentlist: defaultstyle: multiline - marked-icon: "" + marked-icon: "󰁔" multilinestyle: rows: # TODO: show if already note attached; have info window display note content? - - "{doc.alias('type')} {doc['ref']}{' 󰘓 ' if doc['file'] else ''} {doc.alias('readstatus')}" + - "{' ' if 'priority' not in doc or doc['priority'] > 3 else '󱝇 ' if doc['priority'] <= 1 else '󱝇 '}{doc.alias('type')} {doc['ref']} {doc.alias('readstatus')} {' 󰘓 ' if doc['notes'] else ''}" - "{doc.html_escape['title']}" - "{doc.html_escape['author']}" - "{doc.foreach('tags', '({})', split = ', ', sep = ' ')}" @@ -16,6 +26,11 @@ documentlist: rowstyle: "white_bg" cursorrowstyle: "black_white|bold" columns: + - { + header: "󱝇", + content: "{'' if 'priority' not in doc or doc['priority'] > 3 else '󰝥' if doc['priority'] <= 1 else '󰝦'}", + width: 1, + } - { header: "󰑇", content: "{'󰗠' if doc['readstatus'] == 'read' else '󰗡' if doc['readstatus'] == 'skimmed' else ' '}", @@ -46,11 +61,12 @@ documentlist: { article: "", book: "", - incollection: "󰪧", inbook: "", - software: "", + incollection: "󰪧", + software: "󰅩", presentation: "󰐨", thesis: "", + techreport: "󰁰", _default_: "", } readstatus: @@ -90,16 +106,17 @@ keymappings: - limit to entries with notes "'u": - search "readstatus:read OR readstatus:skimmed" - - limit to unread entries + - limit to read entries "'r": - search "NOT readstatus:read AND NOT readstatus:skimmed" - - limit to read entries + - limit to unread entries " ": mark_selected mm: mark_selected M: mark_down J: mark_down mu: unmark_all mv: mark_view + ",t": cmd "tag " ",r": - papis update -s readstatus read papis_id:{doc['papis_id']} - set readstatus read @@ -109,7 +126,15 @@ keymappings: ",u": - papis update -s readstatus "" papis_id:{doc['papis_id']} - set readstatus unread - ",t": cmd "tag " + ",ph": + - papis update -s priority 1 papis_id:{doc['papis_id']} + - set priority high + ",pm": + - papis update -s priority 2 read papis_id:{doc['papis_id']} + - set priority medium + ",pl": + - papis update -s priority 3 read papis_id:{doc['papis_id']} + - set priority low i: - info_toggle - "Toggle info window" From dc78a5b67afcabf34d959c5a212c3ec0959c3355 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:28:25 +0200 Subject: [PATCH 14/15] papis: Update config to use bbt formatter Using my custom bbt-formatter for reference keys. --- writing/.config/papis/config | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/writing/.config/papis/config b/writing/.config/papis/config index 0742dc7..319d124 100644 --- a/writing/.config/papis/config +++ b/writing/.config/papis/config @@ -1,12 +1,17 @@ [settings] -#opentool = zathura -picktool = papis-tui default-library = main +formater = bbt +local-config-file = .papis.config + +# opentool = zathura +picktool = papis-tui +mark-opener = zathura -P {mark[value]} file-browser = vifm -ref-format = {doc[author_list][0][family]}{doc[year]} # edit info.yaml as new papers are added add-edit = True +# ref-format = {doc[author_list][0][family]}{doc[year]} +ref-format = bbt add-folder-name = {doc[author_list][0][family]}-{doc[title]} add-file-name = {doc[author_list][0][family]}{doc[year]} header-format-file = ~/.config/papis/headerformat @@ -20,8 +25,6 @@ default-query-string = * notes-name = notes.md notes-template = {doc[author_list][0][family]}{doc[year]}--{doc[title]} -mark-opener = zathura -P {mark[value]} - [tui] editmore = vi @@ -42,3 +45,8 @@ dir = ~/documents/library/cs [ee] dir = ~/documents/library/ee + +[plugins.bbt-formatter] +full-year = True +title-words = 2 +title-chars = 20 From 6254c92bd317c9639e674a29dbbe61112952fe21 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 16 Sep 2023 11:29:22 +0200 Subject: [PATCH 15/15] chore: Update qutebrowser redirects, nvim spellfiles --- nvim/.config/nvim/spell/de.utf-8.add | 1 + nvim/.config/nvim/spell/en.utf-8.add | 1 + qutebrowser/.config/qutebrowser/redirects.py | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 nvim/.config/nvim/spell/de.utf-8.add diff --git a/nvim/.config/nvim/spell/de.utf-8.add b/nvim/.config/nvim/spell/de.utf-8.add new file mode 100644 index 0000000..fb8fe37 --- /dev/null +++ b/nvim/.config/nvim/spell/de.utf-8.add @@ -0,0 +1 @@ +Mitgliedern diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index 5d507bf..f5605bc 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -185,3 +185,4 @@ GitLab Gitea caramelization Maillard +individualities diff --git a/qutebrowser/.config/qutebrowser/redirects.py b/qutebrowser/.config/qutebrowser/redirects.py index 635f658..42ee797 100644 --- a/qutebrowser/.config/qutebrowser/redirects.py +++ b/qutebrowser/.config/qutebrowser/redirects.py @@ -180,8 +180,6 @@ redirects = { "wiki-en": { "source": ["en.wikipedia.org"], "target": [ - "wiki.adminforge.de", - "wiki.froth.zone", "wiki.slipfox.xyz", "wikiless.funami.tech", "wikiless.org",