From df5c612ed3d926c76eaeb02e16042c43c6969510 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 25 May 2025 13:37:58 +0530 Subject: Add desktop file for aerc+term + some keybinds and pdf preview --- modules/email/aerc-binds.conf | 12 +++++++++--- modules/email/aerc.conf | 3 +++ modules/email/aerc.home.nix | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/email/aerc-binds.conf b/modules/email/aerc-binds.conf index 15d3a49..442c9ea 100644 --- a/modules/email/aerc-binds.conf +++ b/modules/email/aerc-binds.conf @@ -2,15 +2,15 @@ = :next-tab = :term ? = :help keys - = :prompt 'Quit?' quit - = :prompt 'Quit?' quit + = :prompt 'Quit? ' quit + = :prompt 'Quit? ' quit = :suspend [messages] -q = :prompt 'Quit?' quit +q = :prompt 'Quit? ' quit a = :read A = :unread @@ -102,6 +102,9 @@ $complete = = :prev-field = :prev-tab = :next-tab + = :prompt 'Quit? ' quit -f + = :attach -m ~ + = :preview @@ -113,6 +116,9 @@ $ex = = :next-field = :prev-tab = :next-tab + = :prompt 'Quit? ' quit -f + = :attach -m ~ + = :preview diff --git a/modules/email/aerc.conf b/modules/email/aerc.conf index 86982ae..5585d25 100644 --- a/modules/email/aerc.conf +++ b/modules/email/aerc.conf @@ -11,11 +11,14 @@ parse-http-links = true [compose] editor = nvim file-picker-cmd = lf -selection-path=%f +empty-subject-warning = true +no-attachment-warning = ^[^>]*attach(ed|ment) [filters] text/plain=bat -f --paging=never --file-name="$AERC_SUBJECT ($AERC_FROM)" --style=header,grid text/html=! w3m -I UTF-8 -T text/html text/*=bat -fP --file-name="$AERC_FILENAME" --style=plain +application/pdf=pdftotext - - [openers] image/*=sxiv {} diff --git a/modules/email/aerc.home.nix b/modules/email/aerc.home.nix index 7dcd99e..1ba4f7d 100644 --- a/modules/email/aerc.home.nix +++ b/modules/email/aerc.home.nix @@ -58,4 +58,20 @@ in { stylesets.default = theme; }; + + xdg.desktopEntries.aerc-window = { + name = "aerc"; + exec = "sensible-terminal -e aerc %u"; + terminal = false; + mimeType = ["x-scheme-handler/mailto"]; + genericName = "Mail Client"; + comment = "Launches the aerc email client"; + categories = ["Office" "Network" "Email" "ConsoleOnly"]; + type = "Application"; + icon = "utilities-terminal"; + settings = { + Keywords = "Email;Mail;IMAP;SMTP"; + Version = "1.0"; + }; + }; } -- cgit v1.3.1