diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/communication/neomutt/.neomuttrc | 2 | ||||
| -rw-r--r-- | modules/communication/neomutt/default.nix | 8 | ||||
| -rw-r--r-- | modules/communication/neomutt/keybindings.nix | 10 | ||||
| -rw-r--r-- | modules/communication/neomutt/macros.nix | 18 | ||||
| -rw-r--r-- | modules/desktop/rofi/default.nix | 2 |
5 files changed, 11 insertions, 29 deletions
diff --git a/modules/communication/neomutt/.neomuttrc b/modules/communication/neomutt/.neomuttrc index 2f7ef00..1531b61 100644 --- a/modules/communication/neomutt/.neomuttrc +++ b/modules/communication/neomutt/.neomuttrc @@ -1,6 +1,6 @@ # Read messages in Neovim. `-` makes Neovim read the message from # stdin and -R prevents accidental edits to message content. -set pager = "@@PAGER@@ -R -n +'setlocal nolist | silent! 1,2g/^$/delete _ | nohlsearch | setlocal nomodified nomodifiable' -" +set pager = "@@PAGER@@" # Return directly to the index when Neovim exits and do not prepend # NeoMutt’s pager status line to the message passed to Neovim. set noprompt_after diff --git a/modules/communication/neomutt/default.nix b/modules/communication/neomutt/default.nix index e003c7f..018555f 100644 --- a/modules/communication/neomutt/default.nix +++ b/modules/communication/neomutt/default.nix @@ -37,7 +37,7 @@ let neomuttSyncScript neomuttSyncCompletion ]; - meta = neomuttSyncScript.meta or { }; + meta = neomuttSyncScript.meta; }; in { @@ -88,9 +88,9 @@ in vimKeys = false; unmailboxes = true; checkStatsInterval = 20; - extraConfig = - builtins.replaceStrings [ "@@PAGER@@" ] [ (lib.getExe config.development.nixvim.package) ] - (builtins.readFile ./.neomuttrc); + extraConfig = builtins.replaceStrings [ "@@PAGER@@" ] [ (lib.getExe config.web.chawan.package) ] ( + builtins.readFile ./.neomuttrc + ); }; }) (lib.mkIf (config.communication.neomutt.enable && config.terminal.kitty.enable) { diff --git a/modules/communication/neomutt/keybindings.nix b/modules/communication/neomutt/keybindings.nix index 7903d9a..80e33cd 100644 --- a/modules/communication/neomutt/keybindings.nix +++ b/modules/communication/neomutt/keybindings.nix @@ -9,7 +9,7 @@ let in { config.programs.neomutt.binds = lib.mkIf config.communication.neomutt.enable [ - # Index ------------------------------------------------------------------ + # Index (bind [ "index" ] "$" "noop") (bind [ "index" ] "g" "noop") (bind [ "index" ] "d" "noop") @@ -60,7 +60,7 @@ in (bind [ "index" ] "u" "undelete-message") (bind [ "index" ] "U" "undelete-thread") - # Pager ------------------------------------------------------------------ + # Pager # Messages open in Neovim via $pager. These bindings remain useful for # NeoMutt's internal pager, e.g. when it is used by a mailcap viewer. (bind [ "pager" ] "g" "noop") @@ -98,7 +98,7 @@ in (bind [ "pager" ] "dd" "delete-message") (bind [ "pager" ] "u" "undelete-message") - # Attachment menu -------------------------------------------------------- + # Attachment menu (bind [ "attach" ] "g" "noop") (bind [ "attach" ] "d" "noop") (bind [ "attach" ] ":" "noop") @@ -118,7 +118,7 @@ in (bind [ "attach" ] "dd" "delete-entry") (bind [ "attach" ] "u" "undelete-entry") - # Mailbox browser -------------------------------------------------------- + # Mailbox browser (bind [ "browser" ] "g" "noop") (bind [ "browser" ] ":" "noop") (bind [ "browser" ] "q" "noop") @@ -132,7 +132,7 @@ in (bind [ "browser" ] "\\Cd" "half-down") (bind [ "browser" ] "\\Cu" "half-up") - # Compose menu ----------------------------------------------------------- + # Compose menu (bind [ "compose" ] "g" "noop") (bind [ "compose" ] ":" "noop") (bind [ "compose" ] "q" "noop") diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index 884b6b9..4e5bf7b 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -3,16 +3,6 @@ { config.programs.neomutt.macros = lib.mkIf config.communication.neomutt.enable [ { - # Sync the mailbox and run the external neomutt-sync script - map = [ - "index" - "pager" - ]; - key = "gs"; - action = "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>neomutt-sync<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>"; - } - { - # Extract every URL from the message via urlscan into a picker menu map = [ "index" "pager" @@ -21,19 +11,11 @@ action = "<pipe-message>urlscan<enter>"; } { - # Pipe the selected attachment instead of the whole message - map = [ "attach" ]; - key = "gx"; - action = "<pipe-entry>${lib.getExe config.web.chawan.package} -T text/html <enter>"; - } - { - # Clear the current limit and show every message again map = [ "index" ]; key = "gF"; action = "<limit>all<enter>"; } { - # Save the mailbox and quit map = [ "index" ]; key = "ZZ"; action = "<sync-mailbox><quit>"; diff --git a/modules/desktop/rofi/default.nix b/modules/desktop/rofi/default.nix index bbf1aea..a15ce0a 100644 --- a/modules/desktop/rofi/default.nix +++ b/modules/desktop/rofi/default.nix @@ -39,7 +39,7 @@ in templateFileOrContent = fontExpandedThemeTemplate; fileExtension = ".rasi"; }}"; - extraConfig = { + settings = { modi = "drun"; show-icons = true; drun-display-format = "{name}"; |
