Skip to content

Smart/saved folders in dashboard page #16

@yousefakbar

Description

@yousefakbar

Add config options for smart/saved folders

Allow the user to add configuration for saved/smart folders with frequent/pre-saved queries and display them in the main Tags or notmuch-hello page

Example:

Add configuration options such as:

return {
    "yousefakbar/notmuch.nvim",
    opts = {
        notmuch_db_path = "/home/xxx/Documents/Mail",
        maildir_sync_cmd = "mbsync personal",
        keymaps = {
            sendmail = "<C-g><C-g>",
        },

        -- ADDED CONFIGURATION HERE --
        queries = {
          { name = "📤 Sent today", query = "tag:sent and date:today" },
          { name = "⚠️ IMPORTANT", query = "tag:flagged or tag:pr or tag:urgent" },
          { name = "⌛ Overdue (+3d)", query = "tag:inbox and date:..3d" },
        },
    },
}

Then in the dashboard notmuch-hello page, display/pin them at the top for easy use of frequent search queries:

Hints: <Enter>: Show threads | q: Close | r: Refresh | %: Refresh maildir | c: Count messages

Saved/Pinned:
-------------

📤 Sent today -- `tag:sent and date:today`
⚠️ IMPORTANT -- `tag:flagged or tag:pr or tag:urgent`
⌛ Overdue (+3d) -- `tag:inbox and date:..3d"`


Tags:
-----

inbox
unread
flagged
sent
.
.
.

With some extra cruft for displaying them nicely

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions