Use a keyring to store some credentials
This commit is contained in:
parent
9ccb99ee15
commit
931979b5c6
4 changed files with 11 additions and 16 deletions
|
@ -13,8 +13,7 @@
|
|||
(require 'esh-proc)
|
||||
(require 'fill-column-indicator)
|
||||
(require 'magit)
|
||||
(require 'yasnippet)
|
||||
(require 'noflet))
|
||||
(require 'yasnippet))
|
||||
|
||||
(load (concat user-emacs-directory "init2"))
|
||||
|
||||
|
@ -658,7 +657,8 @@ For `python-mode' I prefer `python-imenu-create-flat-index'."
|
|||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(noflet ((display-graphic-p (&optional display) t))
|
||||
(cl-letf (((symbol-function 'display-graphic-p)
|
||||
(lambda () t)))
|
||||
(oni:set-theme frame))))
|
||||
(oni:eval-after-init (oni:set-theme nil)))
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from offlineimap import imaputil
|
||||
import keyring
|
||||
|
||||
|
||||
def lld_flagsimap2maildir(flagstring):
|
||||
|
@ -39,13 +40,5 @@ imaputil.flagsmaildir2imap = lld_flagsmaildir2imap
|
|||
imaputil.flagsimap2maildir = lld_flagsimap2maildir
|
||||
|
||||
|
||||
def getuser(host):
|
||||
import netrc
|
||||
mynet = netrc.netrc()
|
||||
return mynet.authenticators(host)[0]
|
||||
|
||||
|
||||
def getpassword(host):
|
||||
import netrc
|
||||
mynet = netrc.netrc()
|
||||
return mynet.authenticators(host)[2]
|
||||
return keyring.get_password('offlineimap', host)
|
||||
|
|
|
@ -18,8 +18,8 @@ nametrans = lambda folder: re.sub('^Inbox$', 'INBOX', folder.capitalize())
|
|||
[Repository ryuslash.org-remote]
|
||||
type = IMAP
|
||||
remotehost = imap.alwaysdata.com
|
||||
remoteusereval = getuser("imap.alwaysdata.com")
|
||||
remotepasseval = getpassword("imap.alwaysdata.com")
|
||||
remoteuser = 'tom@ryuslash.org'
|
||||
remotepasseval = getpassword("ryuslash")
|
||||
nametrans = lambda folder: folder.lower()
|
||||
|
||||
[Account picturefix]
|
||||
|
@ -71,8 +71,8 @@ nametrans = lambda folder: re.sub('^inbox$', 'INBOX', re.sub('^drafts$', '[Gm
|
|||
|
||||
[Repository gmail-remote]
|
||||
type = Gmail
|
||||
remoteusereval = getuser("imap.google.com")
|
||||
remotepasseval = getpassword("imap.google.com")
|
||||
remoteuser = "ryuslash@gmail.com"
|
||||
remotepasseval = getpassword("gmail")
|
||||
realdelete = no
|
||||
cert_fingerprint = 687687a7f2dc166baf58221ff7a42f1683d0d164
|
||||
folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Drafts', '[Gmail]/Sent Mail', '[Gmail]/Trash']
|
||||
|
|
|
@ -31,6 +31,8 @@ case $_hostname in
|
|||
# exec i3
|
||||
;;
|
||||
phoenix)
|
||||
eval $(/usr/bin/gnome-keyring-daemon --start --components=secrets)
|
||||
export GPG_AGENT_INFO SSH_AUTH_SOCK
|
||||
exec awesome
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue