diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-17 11:08:49 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-17 11:08:49 +0200 |
| commit | c6fc5bbef45bcfa4f8d5e50ca7401aa1f5b6bc7d (patch) | |
| tree | 775fa89b284c68d30205c58d83fae55336676f60 /desktop/modules/qtmaildir/GeneralPage.qml | |
| parent | 8e9d8b9ac1b593032dea9eca312fa1495c0c8858 (diff) | |
| download | quickshell-c6fc5bbef45bcfa4f8d5e50ca7401aa1f5b6bc7d.tar.gz quickshell-c6fc5bbef45bcfa4f8d5e50ca7401aa1f5b6bc7d.zip | |
settings: qtmaildir's config, in four Mail pages
qtmaildir is configured through qtmaildir.conf alone, which it reads at
startup and never writes. Four settings pages under a new Mail group
edit it: Mail ([general], [sync], [completion]), Compose, Accounts (a
card per account, add and remove) and Tags & shortcuts ([tagcolors] and
[keys]). Fields save on Enter and unset when emptied, with qtmaildir's
defaults as placeholders and numbers range-checked; the pages say when
qtmaildir is running and a change waits for its restart.
Ini.js edits the file line by line so its comments survive. Headers are
only whole [name] lines: a section is never cut at the next "[", since
values such as [Gmail]/Bozze hold brackets, the trap AGENTS.md records.
The shortcut actions are copied from qtmaildir's KeyMap::knownActions()
rather than exported by it, since a CLI flag there would have meant
translations and a changelog entry; the field also takes free text, and
the copy is marked as a ponytail ceiling.
The settings sidebar now clips, which a list long enough to scroll
showed it did not: entries drew over the search box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/qtmaildir/GeneralPage.qml')
| -rw-r--r-- | desktop/modules/qtmaildir/GeneralPage.qml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/desktop/modules/qtmaildir/GeneralPage.qml b/desktop/modules/qtmaildir/GeneralPage.qml new file mode 100644 index 0000000..2eca3e7 --- /dev/null +++ b/desktop/modules/qtmaildir/GeneralPage.qml @@ -0,0 +1,68 @@ +// Copyright (C) 2026 Danilo M. <danix@danix.xyz> +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +import QtQuick +import "../.." + +// [general], [sync] and [completion]. Placeholders are qtmaildir's defaults, +// from its README. +Column { + spacing: 6 + Note {} + + Heading { text: "Startup" } + Setting { section: "general"; key: "startup_query"; label: "Startup query"; placeholder: "Unread" + hint: "A saved query or a built-in filter by name: Unread, Inbox, Important, Sent, Drafts, Trash, Spam." } + ChoiceSetting { section: "general"; key: "startup_account"; label: "Startup account"; fallbackLabel: "All accounts" + options: Qtm.accounts.map(a => ({ value: a, label: Qtm.get("account." + a, "label") || a })) } + Setting { section: "general"; key: "language"; label: "Language"; placeholder: "system" + hint: "A locale name, it or it_IT; system follows $LANG." } + + Heading { text: "Appearance" } + Setting { section: "general"; key: "toolbar_icon_size"; label: "Toolbar icon size"; placeholder: "24" + kind: "int"; min: 16; max: 64; hint: "Pixels, 16 to 64." } + Setting { section: "general"; key: "message_zoom"; label: "Message zoom"; placeholder: "1.0" + kind: "float"; min: 0.5; max: 3; hint: "The starting zoom, 0.5 to 3. Ctrl+wheel is remembered on its own." } + Setting { section: "general"; key: "date_format"; label: "Date format"; placeholder: "the system locale's short format" + hint: "A QDateTime pattern: yyyy-MM-dd hh:mm." } + Setting { section: "general"; key: "forward_prefixes"; label: "Forward prefixes" + hint: "Extra subject prefixes, comma-separated, added to Fwd, Fw, WG, ENC, RV, TR." } + + Heading { text: "Behaviour" } + Setting { section: "general"; key: "mark_read_delay_ms"; label: "Mark read after"; placeholder: "2000" + kind: "int"; min: -1; max: 600000; hint: "Milliseconds an opened thread stays unread. 0 at once, -1 never." } + BoolSetting { section: "general"; key: "completion_on_focus"; label: "Complete on focus"; fallback: false + hint: "open the completion popup when the empty query bar takes focus" } + + Heading { text: "Sync" } + Setting { section: "sync"; key: "command"; label: "Sync command" + placeholder: "unset: the Sync button is disabled" } + Setting { section: "sync"; key: "log"; label: "Sync log"; placeholder: "the path mailsync.sh writes" } + Setting { section: "general"; key: "auto_sync_delay_ms"; label: "Sync after tagging"; placeholder: "2000" + kind: "int"; min: -1; max: 600000; hint: "Milliseconds after the last tag change. 0 at once, -1 never." } + ChoiceSetting { section: "general"; key: "sync_on_exit"; label: "On quit with changes"; fallbackLabel: "Ask" + options: [{ value: "always", label: "Always sync" }, { value: "never", label: "Never" }] } + + Heading { text: "Contacts and calendar" } + Setting { section: "general"; key: "contacts_dir"; label: "Contacts"; placeholder: "off" + hint: "A vCard directory, e.g. ~/.local/share/vdirsyncer/contacts/. Not ~/.local/share/contacts/, Akonadi's." } + Setting { section: "general"; key: "calendars_dir"; label: "Calendars"; placeholder: "off" + hint: "The vdir root, e.g. ~/.local/share/calendars/." } + Setting { section: "general"; key: "default_calendar"; label: "Default calendar"; placeholder: "the first collection" + hint: "The collection's directory name, where new events go." } + Setting { section: "general"; key: "calendar_sync_command"; label: "Calendar sync" + placeholder: "flock -w 60 /tmp/vdirsyncer.lock vdirsyncer sync calendars" } + + Heading { text: "Advanced" } + Setting { section: "general"; key: "notmuch_config"; label: "notmuch config"; placeholder: "notmuch's own lookup" } + Setting { section: "completion"; key: "extra_mimetypes"; label: "Extra mimetypes" + hint: "Added after mimetype: in the query bar. type|description, comma-separated." } +} |
