From 9971ab717bd2f6b351d6d791c2107c024aff31a0 Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Thu, 6 Jan 2022 21:11:35 -0500 Subject: [PATCH] Add work email --- .bashrc | 1 + .xsession | 41 +++++++++++++++++++++++++++++++++++------ README.md | 7 +++++++ installs | 19 ++++++++++++++++++- mbsyncrc | 28 +++++++++++++++++++++++++++- neomutt/neomuttrc | 3 ++- 6 files changed, 90 insertions(+), 9 deletions(-) diff --git a/.bashrc b/.bashrc index a0feb0f..8d0ad77 100644 --- a/.bashrc +++ b/.bashrc @@ -132,6 +132,7 @@ alias show='apt show' alias lynx='lynx -vikeys' alias lsa='ls -laF' alias doihave='apt list --installed' +alias email='neomutt' # Utilities alias ins='sudo apt-get install' diff --git a/.xsession b/.xsession index d9f0ede..783298e 100755 --- a/.xsession +++ b/.xsession @@ -1,16 +1,46 @@ #!/bin/bash -setxkbmap -option ctrl:swapcaps -option tilde:swapescape source ~/.profile + +# Setup statusbar and mail +speaker_muted=πŸ”‡ +speaker_low=πŸ”ˆ +speaker_medium=πŸ”‰ +speaker_high=πŸ”Š +brightness_symbol=πŸ”… + +DELAY=1m + +while true; do + mbsync -a + sleep $DELAY +done & + +while true; do + volume=$(amixer sget Master | awk -F"[][]" 'END{ print $2 }') + volume_amount=$(printf $volume | tr -d %) + if [ $volume_amount = 0 ]; then + volume_symbol=$speaker_muted + elif [ $volume_amount -lt 30 ]; then + volume_symbol=$speaker_low + elif [ $volume_amount -lt 70 ]; then + volume_symbol=$speaker_medium + else + volume_symbol=$speaker_high + fi + + xsetroot -name "πŸ“§Messages $(find ~/Mail -path '*/INBOX/new' -type f | wc -l) | + $volume_symbol$volume | $(date +"%c")" + sleep $DELAY +done & + +setxkbmap -option ctrl:swapcaps -option tilde:swapescape picom -b ~/.fehbg xbindkeys -f $HOME/Source/configs/xbindkeysrc -mkfifo /tmp/torrents.fifo -# aria2 downloads should be resumed here - ( mru update; mru updatedirs ) & -# relaunch DWM if the binary changes, otherwise bail +# Relaunch DWM if the binary changes, otherwise bail csum=$(sha1sum $(which dwm)) new_csum="" while true @@ -18,7 +48,6 @@ do if [ "$csum" != "$new_csum" ] then csum=$new_csum - dwm-statusbar & dwm else exit 0 diff --git a/README.md b/README.md index e69de29..309858a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,7 @@ + + +### Additional steps ### + +Create passwords file in ~/.config for personal email, work email, etc. It's to +prevent passwords from being stored in repo. + diff --git a/installs b/installs index 8b13789..e93c6ad 100644 --- a/installs +++ b/installs @@ -1 +1,18 @@ - +abook +isync +neomutt +cmus +ncmpcpp +mpd +nnn +sxiv +mpv +abiword +zathura +vim +git +compton +feh +trash-cli +pulseaudio +wmctrl diff --git a/mbsyncrc b/mbsyncrc index 4adc947..262c42d 100644 --- a/mbsyncrc +++ b/mbsyncrc @@ -2,7 +2,7 @@ IMAPAccount mailfence-immanuel Host imap.mailfence.com User immanuel -PassCmd "pass email/mailfence.com | head -n 1" +PassCmd "grep 'personal:' ~/.config/passwords | cut -d ' ' -f 2 | head -n 1" Port 993 # CertificateFile ~/.config/protonmail/bridge/cert.pem SSLType IMAPS @@ -67,3 +67,29 @@ Channel mailfence-immanuel-drafts Channel mailfence-immanuel-sent Channel mailfence-immanuel-trash Channel mailfence-immanuel-junk + +# Work account +IMAPAccount work-immanuel +Host outlook.office365.com +User immanuel@brashinc.com +PassCmd "grep 'work:' ~/.config/passwords | cut -d ' ' -f 2 | head -n 1" +Port 993 +SSLType IMAPS +# SSLVersions TLSv1.2 + +# Remote storage +IMAPStore work-immanuel-remote +Account work-immanuel +PathDelimiter / + +# Local storage +MaildirStore work-immanuel-local +Path ~/Mail/work/ +Inbox ~/Mail/work/INBOX +SubFolders Verbatim + +Channel work-immanuel-inbox +Far :work-immanuel-remote: +Near :work-immanuel-local: +Patterns * +Create Both diff --git a/neomutt/neomuttrc b/neomutt/neomuttrc index 07887d8..e1906f2 100644 --- a/neomutt/neomuttrc +++ b/neomutt/neomuttrc @@ -47,8 +47,9 @@ set sort_re # Mailboxes to show in the sidebar. -mailboxes =ALL-INBOX +# mailboxes =ALL-INBOX mailboxes =personal/INBOX =personal/archive =personal/sent =personal/drafts =personal/junk =personal/trash +mailboxes =work/INBOX # mailboxes =work/"[Gmail]INBOX" =work/"[Gmail]/Spam" =work/"[Gmail]/Trash" =work/"[Gmail]/All Mail" =work/Reference # mailboxes =hussar # mailboxes =hussar/archive =hussar/sent =hussar/drafts =hussar/junk =hussar/trash