Re: Feature request #293
> You could try something like: > > folder-hook . 'set status_format="-%r-Mutt: [$folder] %f [Msgs:%?M?%M/?%m%?n? > New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? > Inc:%b?%?B? Back:%B?%?l? %l?]---(%s/%?T?%T/?%S)-%>-(%P)---" > > This technique also allows using your own labels instead of $folder: > > folder-hook .'set my_account="default"' > folder-hook 'imap.gmail.com' 'set my_account="gmail"' > folder-hook 'imap.yahoo.com' 'set my_account="yahoo"' > > folder-hook . 'set status_format="-%r-Mutt: [$my_account] %f > [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? > Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?B? Back:%B?%?l? > %l?]---(%s/%?T?%T/?%S)-%>-(%P)---"' Thanks, Kevin, this works a treat. And of course I knew, at an intellectual level, that I can use variables inside of variables ...
Re: Feature request #293
On Sun, Apr 10, 2022 at 10:29:22AM +0100, ckeader wrote: I've completely unified my mutt config for several accounts and while it works very well, I cannot easily tell which account I'm connected to at the moment, and might not remember (yet) which macro switches to which account. The imap accounts generally just show "=INBOX" in the index status line. So I looked at the manual entry for status_format and found that there isn't any shortcut that can help identify the current account. Which is a bit surprising. You could try something like: folder-hook . 'set status_format="-%r-Mutt: [$folder] %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?B? Back:%B?%?l? %l?]---(%s/%?T?%T/?%S)-%>-(%P)---" This technique also allows using your own labels instead of $folder: folder-hook .'set my_account="default"' folder-hook 'imap.gmail.com' 'set my_account="gmail"' folder-hook 'imap.yahoo.com' 'set my_account="yahoo"' folder-hook . 'set status_format="-%r-Mutt: [$my_account] %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?B? Back:%B?%?l? %l?]---(%s/%?T?%T/?%S)-%>-(%P)---"' -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Feature request #293
Hi, I've completely unified my mutt config for several accounts and while it works very well, I cannot easily tell which account I'm connected to at the moment, and might not remember (yet) which macro switches to which account. The imap accounts generally just show "=INBOX" in the index status line. So I looked at the manual entry for status_format and found that there isn't any shortcut that can help identify the current account. Which is a bit surprising. To at least see what I'm using afer I switched to it, I currently use macro index,pager 'source ~/.mutt/account1!:set ?folder' which leaves a "folder=xxx" message below the status line. I came across https://gitlab.com/muttmua/mutt/-/issues/293 which, while bereft of detail, seems to request the feature I'm looking for - a means of identifying the currently active account in the status line. If anyone can point me to existing patches for status_format that add a new format string, I'd be more than happy to have a go at it myself. The wiki patchlist has one such patch, but it's listed for mutt 1.2/1.3 and I'm sure it would still apply to 2.2. Thanks.