Skip to content

Instantly share code, notes, and snippets.

View flatcap's full-sized avatar
🥾
Hiking in Scotland

Richard Russon flatcap

🥾
Hiking in Scotland
View GitHub Profile
@flatcap
flatcap / aliases.sh
Created December 20, 2019 13:47
NeoMutt test reply/group-reply/compose-to-sender
alias m='/usr/bin/mutt -n -F test.rc -f test.mbox'
alias n='/usr/bin/neomutt -n -F test.rc -f test.mbox'
@flatcap
flatcap / README.txt
Last active March 2, 2023 14:29
NeoMutt desktop icon
Put neomutt.desktop in /usr/share/applications/
Put mimeapps.list in ~/.local/share/applications/mimeapps.list
Check association with: xdg-mime query default 'x-scheme-handler/mailto'
---
# set the association by command
xdg-mime default neomutt.desktop x-scheme-handler/mailto
unset record
set postpone = no
set editor="lorem-ipsum-generator -p1 | fmt >> %s"
macro index,pager <F1> "[email protected]<enter>test<enter>"

Some missing

  • 🇧🇷 :brazil:
  • 🇧🇬 :bulgaria:
  • 🇨🇳 :cn:
  • 🇨🇿 :czech_republic:
  • 🇩🇪 :de:
  • 🇩🇰 :denmark:
  • 🇪🇸 :es:
  • 🇪🇪 :estonia:
@flatcap
flatcap / imap-generator.sh
Created March 29, 2020 16:01
imap generator
#!/bin/bash
for a in 'imap' 'imaps'; do
for b in '' 'user@' '[email protected]@' 'user:pass@'; do
for c in 'host.com' '[12AB::EF89]'; do
for d in '' ':123'; do
for e in '' '/' '/path' '/path/one/two' '/path.one.two'; do
echo "$a://$b$c$d$e"
done
done
# dlopen test
CC = gcc
RM = rm -fr
SRC = foo1.c foo2.c foo3.c
OBJ = $(SRC:.c=.o)
OUT = foo1 foo2.so foo3.so dlopen
CFLAGS += -g
@flatcap
flatcap / functions.txt
Last active May 23, 2020 23:37
text entry analysis
61 functions that take user input
OP_MAIN_CHANGE_FOLDER "open a different folder"
OP_MAIN_CHANGE_FOLDER_READONLY "open a different folder in read only mode"
OP_MAIN_CHANGE_VFOLDER "open a different virtual folder"
OP_MAIN_CHANGE_GROUP "open a different newsgroup"
OP_MAIN_CHANGE_GROUP_READONLY "open a different newsgroup in read only mode"
mutt_buffer_enter_fname
OP_COPY_MESSAGE "copy a message to a file/mailbox"
@flatcap
flatcap / neomutt.ctags
Created August 10, 2020 12:43
universal ctags for NeoMutt (put in ~/.ctags.d)
# Ignore the INITVAL, so ctags can recognise the global variable
-D INITVAL(name)=
-D ARRAY_HEAD(name,type)=struct name {}
-D LIST_HEAD(name,type)=struct name {}
-D SLIST_HEAD(name,type)=struct name {}
-D STAILQ_HEAD(name,type)=struct name {}
-D TAILQ_HEAD(name,type)=struct name {}
@flatcap
flatcap / group.rc
Created January 18, 2021 12:16
neomutt group attachment test
set record = no
set postpone = no
set editor="lorem 1 | fmt >> %s"
set sendmail="sendmail.sh"
set smtp_url=""
macro index,pager <F1> "[email protected]<enter>test<enter>"
macro compose <F2> "abrowser.c<enter>abrowser.h<enter>acommands.c<enter>acommands.h<enter>aenriched.c<enter>aenriched.h<enter>"
macro compose <F3> "HjTjTjT"
@flatcap
flatcap / tests.txt
Created January 18, 2021 13:28
neomutt attachment group tests
Functions:
<group-alternatives>
<group-multilingual>
<ungroup>
The two 'group's should behave the same way, except that 'multilingual' will do extra checks.
Test cases
ten attachments (apple, banana, cherry, damson, elderberry, fig, guava, haw, ilama, jackfruit)