blob: 16f5e1d646d07dcb1b24964e5dcc8f6bcf1990cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env bash
set -e # we can now exit out from rofi, easily
# rofi available mail accounts
ACCOUNTSDIR=$HOME/.config/mutt/accounts
choices=''
first='0'
for account in "${ACCOUNTSDIR}"/*.muttrc; do
BASENAME=$(basename -- "${account}")
pick="${BASENAME%.muttrc}"
if [ $first -eq '0' ]; then
choices="${pick}"
first='1'
else
choices="${choices}\n${pick}"
fi
done
picked=$(echo -e "${choices}" | rofi -dmenu)
exec kitty -e neomutt -F "$HOME/.config/mutt/muttrc" -e "source /home/yigit/.config/mutt/accounts/${picked}.muttrc" -- "$@"
|