Skip to content

Instantly share code, notes, and snippets.

@tscherf
Last active April 5, 2021 09:29
Show Gist options
  • Save tscherf/d46b822c60c60c40a2544233802dcac5 to your computer and use it in GitHub Desktop.
Save tscherf/d46b822c60c60c40a2544233802dcac5 to your computer and use it in GitHub Desktop.
neomutt_and_fzf
#!/usr/bin/env bash

fzf_command="/usr/bin/fzf"

# looks for mailbox in ~/Maildir/work and ~/Maildir/personal/ 
fd_command="find $HOME/Maildir/ -maxdepth 2 -type d"

folder="$($fd_command | $fzf_command)"

echo "push 'c$folder<enter>'"
macro macro index '<space>' ':source ~/.mutt/fzffolder|<return>'
bind index,pager \CP sidebar-prev                                                                                                                                                                                   
bind index,pager \CN sidebar-next                                                                                                                                                                                   
bind index,pager \CO sidebar-open                                                                                                                                                                                   
bind index,pager \CU sidebar-page-up                                                                                                                                                                                
bind index,pager \CD sidebar-page-down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment