local accounts = {}

local status, gmailuser = pipe_from(
                              'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2')
local status, gmailpass = pipe_from(
                              'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1')
-- Setup an imap account called gmail
accounts.gmail = IMAP {
    server = "imap.gmail.com",
    username = gmailuser,
    password = gmailpass,
    ssl = "auto"
}

return accounts
