diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-07 21:19:28 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-08 16:09:23 +0200 |
| commit | d8d52f90ffce5db92675c624f32d497d2e15fceb (patch) | |
| tree | 8c3c6e86e797445501d8324553f2eab196ee4859 /.config | |
| parent | b3bf3fb2ee8605344a4e4d68807d0dfa22f48561 (diff) | |
| download | dotfiles-d8d52f90ffce5db92675c624f32d497d2e15fceb.tar.gz dotfiles-d8d52f90ffce5db92675c624f32d497d2e15fceb.zip | |
misc: add notes launcher
Diffstat (limited to '.config')
| -rw-r--r-- | .config/kglobalshortcutsrc | 3 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-notes.lua | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/.config/kglobalshortcutsrc b/.config/kglobalshortcutsrc index a6b23ad..f4d381e 100644 --- a/.config/kglobalshortcutsrc +++ b/.config/kglobalshortcutsrc @@ -274,6 +274,9 @@ _launch=Meta+Shift+B [services][foot.desktop] _launch=Meta+Shift+T +[services][net.local.notes.desktop] +_launch=Meta+Shift+N + [services][org.kde.dolphin.desktop] _launch=Meta+Shift+E diff --git a/.config/nvim/plugin/50-notes.lua b/.config/nvim/plugin/50-notes.lua index fec0dd2..59f582e 100644 --- a/.config/nvim/plugin/50-notes.lua +++ b/.config/nvim/plugin/50-notes.lua @@ -99,17 +99,19 @@ vim.api.nvim_create_autocmd("BufWritePost", { generate_tags() -vim.keymap.set("n", "<Leader>nn", function() +vim.api.nvim_create_user_command("NotesFindTags", function() require("fzf-lua").tags({ ctags_file = tagfile, cwd = notes_dir }) -end, { desc = "Fuzzy-find notes" }) - -vim.keymap.set("n", "<Leader>nf", function() +end, { desc = "Fuzzy-find notes (tag,name,section)" }) +vim.api.nvim_create_user_command("NotesFindFile", function() require("fzf-lua").files({ cwd = notes_dir }) -end, { desc = "Fuzzy-find notes file name" }) - -vim.keymap.set("n", "<Leader>ng", function() +end, { desc = "Fuzzy-find notes (name)" }) +vim.api.nvim_create_user_command("NotesFindGrep", function() require("fzf-lua").live_grep({ cwd = notes_dir }) -end, { desc = "Fuzzy-find notes content" }) +end, { desc = "Fuzzy-find notes (content)" }) + +vim.keymap.set("n", "<Leader>nn", vim.cmd.NotesFindTags, { desc = "Fuzzy-find notes" }) +vim.keymap.set("n", "<Leader>nf", vim.cmd.NotesFindFile, { desc = "Fuzzy-find notes file name" }) +vim.keymap.set("n", "<Leader>ng", vim.cmd.NotesFindGrep, { desc = "Fuzzy-find notes content" }) -- A note's path relative to the notes dir, without `.md`, or nil if not a note. local function note_name(path) |
