citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 4b2a56f9923448b23a554574737a30d4f390dfcf
parent a7eb4ae182332c1584e0533c1e5c35ecc8541368
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 20 Nov 2020 15:05:31 -0800

updates

Diffstat:
Mbin/sortmail | 8++++++--
Mdotfiles/.fzf.zsh | 2+-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/sortmail b/bin/sortmail @@ -1,11 +1,15 @@ #!/usr/bin/env python -from email.utils import parsedate +from email.utils import parsedate, localtime, formatdate import sys import mailbox +import time def extract_date(email): date = email.get('Date') - return parsedate(date) + parsed = parsedate(date) + tval = time.mktime(parsed) + email['DateLocal'] = formatdate(timeval=tval, localtime=True) + return tval the_mailbox = mailbox.mbox(sys.argv[1]) sorted_mails = sorted(the_mailbox, key=extract_date) diff --git a/dotfiles/.fzf.zsh b/dotfiles/.fzf.zsh @@ -1,6 +1,6 @@ # Setup fzf # --------- -export FZF_DEFAULT_OPTS="-e --no-sort" +export FZF_DEFAULT_OPTS="-e --no-sort --color=light" if [[ ! "$PATH" == */home/jb55/.fzf/bin* ]]; then export PATH="$PATH:/home/jb55/.fzf/bin"