From 77c46dde4fd941ea37e53b6a364fcbfa7dbb3e80 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 30 Jan 2017 11:29:31 +0000 Subject: [PATCH 01/16] Use vimfx over vimperator Vimperator is broken with recent firefox version. It will likely not get any better. --- vimfx/.vimfx/config.js | 5 +++++ vimfx/.vimfx/frame.js | 0 2 files changed, 5 insertions(+) create mode 100644 vimfx/.vimfx/config.js create mode 100644 vimfx/.vimfx/frame.js diff --git a/vimfx/.vimfx/config.js b/vimfx/.vimfx/config.js new file mode 100644 index 0000000..8ebd5d7 --- /dev/null +++ b/vimfx/.vimfx/config.js @@ -0,0 +1,5 @@ +;(function(){ +vimfx.set("config_file_directory", "~/.vimfx") +vimfx.set("mode.normal.history_back", "") +vimfx.set("mode.normal.history_forward", "") +})(); diff --git a/vimfx/.vimfx/frame.js b/vimfx/.vimfx/frame.js new file mode 100644 index 0000000..e69de29 -- 2.45.2 From d8552606ad8273f6376b994ce7238cffc91f2531 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 14 Feb 2017 16:40:14 +0000 Subject: [PATCH 02/16] Change settings to use new friedersdorff.com mail server --- emacs/.authinfo.gpg | Bin 496 -> 496 bytes offline_mail/.mail_pass/personal.gpg | Bin 365 -> 352 bytes offline_mail/.mbsync/personal.mbsync | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/.authinfo.gpg b/emacs/.authinfo.gpg index da2b741804c1a4e9e418faa9996ac3aa117a99fb..c91997e0386865d3e907cab25c73564cba5be7b5 100644 GIT binary patch literal 496 zcmV$@D zT{uL+mXX3y?lGTwt~~0BK(yS8fYGnv5>!pBV#m^BTLj7Gv#}CZ&Jm6!?l0#u5^ipn zL3Qe8a9sP_X;Qlw*2+3!F6v?g-LQQ*z)T0Wp|G@T2vlNb$BM>h;$mKD#!Yj+6f`_E zd6^<=(wK-PvMtlexKaHx3B&CRVr)z;kPIKnUL)?|jizBE0xh1rzEt*N9A$OfCIS0*}?%Z(iVPrz$;Ct@DLMe>J?0 zkHU69L?Qs_*_>_3odS{U7LM>~13Z3El>qBCPjy$Wrh6D+QzvV3m=+`AzWxdj#7tVdkWtaZlG5E=kL@2 literal 496 zcmV2|GB2c+Xc5w*54XZwET* zaG)5shnB`-@J7TiSR5|ZHha>*9swc-&m}3k84P?u!T{HWqz7{$9xYCdE7KM_tXhlQ zyiS6Lz_mEpuR{`*DI64-V}5(1uXd};&X$v-JXPOWFayhLL=>A+07YqQ_RW(YDIlV+ zb=pNEhJA-rgR<$m-$Du_-`YQTwV;EJ6aN>0f>JzKDva)wcN|0R7(`~FWRW*=oe^Ff z0O{S(v#xF*ZLqzGkxF=CbTfA!^=u04dWaXulzjC8m2#5JDp}%rwP#SJuH%fH+5sgD m`wK;$TBt8U;*?s4eI(3WKzi4c!h%dgREU5k+ad0_2M%AdqUDkR diff --git a/offline_mail/.mail_pass/personal.gpg b/offline_mail/.mail_pass/personal.gpg index 7ebf94e084831ec2873f1093d36d086a16598911..288dc7c8417bf5e2a927e92d54791727d6db0452 100644 GIT binary patch literal 352 zcmV-m0iXVb0Sp7T%)}e0opU4s2mfLV)T#Hy;D20VpbN@?xWAVBNj#wlk_+2} zGf@#YRvwknTZR2`!wOgvjlF%Oy+@1Lc89jDA!rR2QyA_mCNME_(Qc^*jfG@!0KSL+ z0@l?E&DtbTB<*7$4z(6xzMb8^k1+8Slgs~TC#?jF7@)GVz%>Yno7*ADON>WEI5 zT^o1^sbqe?hR|m@$*!4=waVy1r5QirYGkymh!B_4->>P} zxK0rKvp%9lC8N2E17SN+&HHB<(S7YGz&Nw&Fe2)@BO7)#J6{vIS-bAZqb|f-f>x zyN4*08~-Tfvj8sgLnL-xf%Q(2nAPo{L|;AE>L2a@o}^SotQfBhL3^MNVZ*;o(WAmG z@)AS%w)2I)$4kz<$V-dcfNI}~&C@$5uJ75~@~omts8R@K`o8=EW+K)+{ci!)(ayug zDf{3CjB)H|ZbnN)CjrOL1>VwJ0n*F(M4>LZtCIm#aA%I84v@WU7Yq{Sjl?5|e`->t zV=wVxl1o-fAb`8(nN-iYpD3$)6sRCV5tA-Ctd7#};S2hnU0Km!)ETZhCL>-GK+3z4 L$DCA?b%*bP#HYB( diff --git a/offline_mail/.mbsync/personal.mbsync b/offline_mail/.mbsync/personal.mbsync index 45a3103..01a9ec9 100644 --- a/offline_mail/.mbsync/personal.mbsync +++ b/offline_mail/.mbsync/personal.mbsync @@ -1,8 +1,8 @@ IMAPAccount personal Host mail.friedersdorff.com -User max +User max@friedersdorff.com PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mail_pass/personal.gpg" -SSLType STARTTLS +SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore personal-remote @@ -15,6 +15,6 @@ Inbox ~/mail/personal/Inbox Channel personal Master :personal-remote: Slave :personal-local: -Patterns "INBOX" "Sent" "Spam" "Trash" "slackware" "quicknote" "todo" +Patterns "INBOX" "Sent" "Spam" "Trash" "slackware" "quicknote" "todo" "google" Create Both SyncState * -- 2.45.2 From 791dddd6094eb7d4ec4266c7ac7840c050dbdcfd Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 16 Feb 2017 15:22:26 +0000 Subject: [PATCH 03/16] Add microsoft folder to personal --- offline_mail/.mbsync/personal.mbsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offline_mail/.mbsync/personal.mbsync b/offline_mail/.mbsync/personal.mbsync index 01a9ec9..efceac5 100644 --- a/offline_mail/.mbsync/personal.mbsync +++ b/offline_mail/.mbsync/personal.mbsync @@ -15,6 +15,6 @@ Inbox ~/mail/personal/Inbox Channel personal Master :personal-remote: Slave :personal-local: -Patterns "INBOX" "Sent" "Spam" "Trash" "slackware" "quicknote" "todo" "google" +Patterns "INBOX" "Sent" "Spam" "Trash" "slackware" "quicknote" "todo" "google" "microsoft" Create Both SyncState * -- 2.45.2 From 2ef18383ec23685073828d756955af9bafdef640 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 22 Feb 2017 22:04:09 +0000 Subject: [PATCH 04/16] Update the online mail config --- online_mail/.mailcap | 1 + .../.mutt/account.com.friedersdorff.max | 4 ++-- online_mail/.mutt/account.com.gmail.maxf130 | 17 --------------- online_mail/.mutt/account.uk.ac.aber.maf54 | 15 +++++++++++++ .../.mutt/account.uk.ac.le.student.mf195 | 17 --------------- online_mail/.mutt/account.uk.co.musoft.max | 17 --------------- online_mail/.mutt/colors.mutt | 17 +++++++++++++++ online_mail/.mutt/mailcap | 1 - online_mail/.mutt/muttrc | 20 ++++++++++++------ online_mail/.mutt/passwords.gpg | Bin 479 -> 405 bytes 10 files changed, 49 insertions(+), 60 deletions(-) create mode 100644 online_mail/.mailcap delete mode 100644 online_mail/.mutt/account.com.gmail.maxf130 create mode 100644 online_mail/.mutt/account.uk.ac.aber.maf54 delete mode 100644 online_mail/.mutt/account.uk.ac.le.student.mf195 delete mode 100644 online_mail/.mutt/account.uk.co.musoft.max create mode 100644 online_mail/.mutt/colors.mutt delete mode 100644 online_mail/.mutt/mailcap diff --git a/online_mail/.mailcap b/online_mail/.mailcap new file mode 100644 index 0000000..e4400e4 --- /dev/null +++ b/online_mail/.mailcap @@ -0,0 +1 @@ +text/html; lynx -stdin -dump -force_html ; copiousoutput diff --git a/online_mail/.mutt/account.com.friedersdorff.max b/online_mail/.mutt/account.com.friedersdorff.max index eea065d..db14c31 100644 --- a/online_mail/.mutt/account.com.friedersdorff.max +++ b/online_mail/.mutt/account.com.friedersdorff.max @@ -1,10 +1,10 @@ set imap_user = "max@friedersdorff.com" set imap_pass = $my_personal_password -set smtp_url = "smtp://max@mail.friedersdorff.com:587" +set smtp_url = "smtp://max@friedersdorff.com@mail.friedersdorff.com:587" set smtp_pass = $my_personal_password set from = "max@friedersdorff.com" set realname = "Maximilian Friedersdorff" -set folder = "imaps://max@mail.friedersdorff.com:993" +set folder = "imaps://max@friedersdorff.com@mail.friedersdorff.com:993" set spoolfile = "+INBOX" set postponed = "+Drafts" set header_cache = ~/.mutt/com.friedersdorff.max/cache/headers diff --git a/online_mail/.mutt/account.com.gmail.maxf130 b/online_mail/.mutt/account.com.gmail.maxf130 deleted file mode 100644 index 5bf21b2..0000000 --- a/online_mail/.mutt/account.com.gmail.maxf130 +++ /dev/null @@ -1,17 +0,0 @@ -set imap_user = "maxf130@gmail.com" -set imap_pass = $my_personal_gmail_password -set smtp_url = "smtp://maxf130@smtp.gmail.com:587" -set smtp_pass = $my_personal_gmail_password -set from = "maxf130@gmail.com" -set realname = "Maximilian Friedersdorff" -set folder = "imaps://imap.gmail.com:993" -set spoolfile = "+INBOX" -set postponed = "+[Gmail]/Drafts" -set header_cache = ~/.mutt/com.gmail.maxf130/cache/headers -set message_cachedir = ~/.mutt/com.gmail.maxf130/cache/bodies -set certificate_file = ~/.mutt/com.gmail.maxf130/certificates - -set trash = "" -set record = "" - -set pgp_sign_as="0x153CBB66" diff --git a/online_mail/.mutt/account.uk.ac.aber.maf54 b/online_mail/.mutt/account.uk.ac.aber.maf54 new file mode 100644 index 0000000..72bdbde --- /dev/null +++ b/online_mail/.mutt/account.uk.ac.aber.maf54 @@ -0,0 +1,15 @@ +set imap_user = "maf54@aber.ac.uk" +set imap_pass = $my_aber_password +set smtp_url = "smtp://maf54@aber.ac.uk@smtp.office365.com:587" +set smtp_pass = $my_aber_password +set from = "maf54@aber.ac.uk" +set realname = "Maximilian Friedersdorff" +set folder = "imaps://maf54@aber.ac.uk@outlook.office365.com:993" +set spoolfile = "+INBOX" +set postponed = "+Drafts" +set header_cache = ~/.mutt/uk.ac.aber.maf54/cache/headers +set message_cachedir = ~/.mutt/uk.ac.aber.maf54/cache/bodies +set certificate_file = ~/.mutt/uk.ac.aber.maf54/certificates + +set trash = "+Trash" +set record = "+Sent" \ No newline at end of file diff --git a/online_mail/.mutt/account.uk.ac.le.student.mf195 b/online_mail/.mutt/account.uk.ac.le.student.mf195 deleted file mode 100644 index 6c0bf50..0000000 --- a/online_mail/.mutt/account.uk.ac.le.student.mf195 +++ /dev/null @@ -1,17 +0,0 @@ -set imap_user = "mf195@student.le.ac.uk" -set imap_pass = $my_student_password -set smtp_url = "smtp://mf195@student.le.ac.uk@smtp.office365.com:587" -set smtp_pass = $my_student_password -set from = "mf195@student.le.ac.uk" -set realname = "Maximilian Friedersdorff" -set folder = "imaps://outlook.office365.com:993" -set spoolfile = "+INBOX" -set postponed = "+Drafts" -set header_cache = ~/.mutt/uk.ac.le.student.mf195/cache/headers -set message_cachedir = ~/.mutt/uk.ac.le.student.mf195/cache/bodies -set certificate_file = ~/.mutt/uk.ac.le.student.mf195/certificates - -set trash="+Trash" -set record="+Sent" - -set pgp_sign_as="0x33FA1EFF" diff --git a/online_mail/.mutt/account.uk.co.musoft.max b/online_mail/.mutt/account.uk.co.musoft.max deleted file mode 100644 index b9bc431..0000000 --- a/online_mail/.mutt/account.uk.co.musoft.max +++ /dev/null @@ -1,17 +0,0 @@ -set imap_user = "max@musoft.co.uk" -set imap_pass = $my_musoft_password -set smtp_url = "smtp://max@musoft.co.uk@smtp.gmail.com:587/" -set smtp_pass = $my_musoft_password -set from = "max@musoft.co.uk" -set realname = "Maximilian Friedersdorff" -set folder = "imaps://imap.gmail.com:993" -set spoolfile = "+INBOX" -set postponed ="+[Gmail]/Drafts" -set header_cache = ~/.mutt/uk.co.musoft.max/cache/headers -set message_cachedir = ~/.mutt/uk.co.musoft.max/cache/bodies -set certificate_file = ~/.mutt/uk.co.musoft.max/certificates - -set trash = "" -set record = "" - -set pgp_sign_as="0x2EA4B143" diff --git a/online_mail/.mutt/colors.mutt b/online_mail/.mutt/colors.mutt new file mode 100644 index 0000000..b14068c --- /dev/null +++ b/online_mail/.mutt/colors.mutt @@ -0,0 +1,17 @@ +# vim: filetype=muttrc + +color normal brightyellow default +color error red default +color tilde black default +color message cyan default +color markers red white +color attachment white default +color search brightmagenta default +color status brightyellow black +color indicator brightblack yellow +color tree yellow default # arrow in threads + +color index brightmagenta default "~Q" # messages that have been replied to +color index blue default "~U" # unread messages +color index blue default "~U~$" # unread, unreferenced messages +color index black red "~D" # deleted messages diff --git a/online_mail/.mutt/mailcap b/online_mail/.mutt/mailcap deleted file mode 100644 index c9f551b..0000000 --- a/online_mail/.mutt/mailcap +++ /dev/null @@ -1 +0,0 @@ -text/html; w3m -I %{charset} -T text/html; copiousoutput diff --git a/online_mail/.mutt/muttrc b/online_mail/.mutt/muttrc index 3c3ba25..9ef64ec 100644 --- a/online_mail/.mutt/muttrc +++ b/online_mail/.mutt/muttrc @@ -1,20 +1,16 @@ # Macro keys for different mailboxes macro index \e1 'imaps://mail.friedersdorff.com' macro index \e2 'imaps://outlook.office365.com' -macro index \e3 'imaps://maxf130@imap.gmail.com' -macro index \e4 'imaps://max@musoft.co.uk@imap.gmail.com' # Configuration files for different mailboxes folder-hook 'friedersdorff.com' 'source ~/.mutt/account.com.friedersdorff.max' -folder-hook 'office365.com' 'source ~/.mutt/account.uk.ac.le.student.mf195' -folder-hook 'maxf130@imap.gmail.com' 'source ~/.mutt/account.com.gmail.maxf130' -folder-hook 'max@musoft.co.uk@imap.gmail.com' 'source ~/.mutt/account.uk.co.musoft.max' +folder-hook 'outlook.office365.com' 'source ~/.mutt/account.uk.ac.aber.maf54' macro index 'c' '?^K+' # Source the passwords file -source "gpg -dq ~/.mutt/passwords.gpg |" +source "gpg2 -dq ~/.mutt/passwords.gpg |" # Always check personal email first source ~/.mutt/account.com.friedersdorff.max @@ -32,7 +28,19 @@ macro index \cb "|urlview\n" macro pager \cb "|urlview\n" set text_flowed=yes +set reflow_text=yes set editor="vim +':set textwidth=72' +'set fo=aw'" # Encryption source ~/.mutt/gpg.rc + +# Speed up folder switch +set sleep_time=0 + +# Mutt colors +source ~/.mutt/colors.mutt + +set sort=threads +set sort_aux=last-date-received + +set fast_reply=yes \ No newline at end of file diff --git a/online_mail/.mutt/passwords.gpg b/online_mail/.mutt/passwords.gpg index 6d48e698446d33347c3ea1fb4186de8820d4ba00..6c3883bc6e3a80b6477c8189de9acb911a717d35 100644 GIT binary patch literal 405 zcmV;G0c!q*0Sp7T%)}e0opU4s2mqZ8{1^SAB61m!oEBA#p54kgRTyvgoe~2-3cKIF zSHk*=OR&->Fi4y54b{@DKUVTFNyDk0u%oHOF;C$3B=bI;s-h%KJ#bTXo4*0c>e!V} zVTJvgF00DyXvaUeQSNx-<{lscfmE~h4>SOV;#vN+IM0lqY<r`RcioaHChVe&=9#ep-{~q+KbFB8q4a4tJ>An)zq45F1YmjgH-pFRF4exx3WBj$=mQJV zQXm(>D{=VXwU{e>Ka$uHkUzA|8jm$;4K*-kRXw&On5pA{r|OL0g5F)fZ~}bC_Y1=5 zDB5Oo6#fZjU@go2C^ z7e2e^PlE-P>L3m;-g!iRFeerd!*(=ia$vRzCYmL5P{XPs@gLidhf3U5+q%ibJL;XL z@=ZGpPD1wQnT*dG#RFpUth1(^nJceO?u-VUH_6_FY-_V(;%SxuM-MKH(3|78Qckum zR7WyM_uq<#1p7x+eE!Q+vB|(s<0Wa^)FeU(nc8+NsJ-AHf5DLLRS+CAb<_fBmx#Ftu`2U6s@sFSS zu|`F_Ruy94nx~LGpl%|C3pZWKp~(Pmg$;Ro5+7__xcj1nu>-7 -- 2.45.2 From a8ea316364560a8474477edc0945a83724cb8133 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 23 Feb 2017 09:51:01 +0000 Subject: [PATCH 05/16] Correct typo in xinitrc --- X/.xinitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/X/.xinitrc b/X/.xinitrc index 8aba85f..cc26e4e 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -60,6 +60,6 @@ if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then --write-env-file "${HOME}/.gpg-agent-info") fi -gpg-connect-agent udatestartuptty /bye >/dev/null +gpg-connect-agent updatestartuptty /bye >/dev/null exec /usr/bin/ratpoison -- 2.45.2 From 7a392baab639d1f571a6a4784fef8e45e41eddc0 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 27 Feb 2017 09:49:26 +0000 Subject: [PATCH 06/16] No longer using mu4e for emails --- emacs/.emacs | 97 +--------------------------------------------------- 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/emacs/.emacs b/emacs/.emacs index a0b34a0..857b765 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -131,102 +131,6 @@ (use-package yaml-mode :ensure t) -(use-package mu4e - :config - (setq - mu4e-maildir "~/mail" - mu4e-get-mail-command - (concat "/usr/bin/mbsync -c /home/max/.mbsync/personal.mbsync -a &&" - "/usr/bin/mbsync -c /home/max/.mbsync/personal-gmail.mbsync -a &&" - "/usr/bin/mbsync -c /home/max/.mbsync/aber.mbsync -a") - mu4e-update-interval 60) - ; Force mu4e to rename file on moving - (setq mu4e-change-filenames-when-moving t) - (setq - message-send-mail-function 'smtpmail-send-it - smtpmail-default-smtp-server "mail.friedersdorff.com" - smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg")) - (setq mu4e-drafts-folder "/Drafts") - (setq mu4e-contexts - `( , (make-mu4e-context - :name "Personal" - :enter-func (lambda () (mu4e-message "Switch to Peronal context")) - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg (list :to :cc :bcc) - "max\\+?.*@frie\\(dersdorff\\)?.com"))) - :vars '((user-mail-address . "max@friedersdorff.com") - (user-full-name . "Maximilian Friedersdorff") - (mu4e-sent-folder . "/personal/Sent") - (mu4e-trash-folder . "/personal/Trash") - (smtpmail-smtp-server . "mail.friedersdorff.com") - (smtpmail-smtp-service . 587))), - (make-mu4e-context - :name "Gmail" - :enter-func (lambda () (mu4e-message "Switch to Gmail context")) - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg (list :to :cc :bcc) - "maxf130\\+?.*@gmail.com"))) - :vars '((user-mail-address . "maxf130@gmail.com") - (user-full-name . "Maximilian Friedersdorff") - (mu4e-sent-folder . "/personal-gmail/Sent") - (mu4e-sent-messages-behaviour . 'delete) - (smtpmail-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-service . 587))), - (make-mu4e-context - :name "Aber" - :enter-func (lambda () (mu4e-message "Switch to Aber context")) - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg (list :to :cc :bcc) - ".*@aber.ac.uk"))) - :vars '((user-mail-address . "maf54@aber.ac.uk") - (user-full-name . "Maximilian Friedersdorff") - (mu4e-sent-folder . "/aber/Sent") - (mu4e-trash-folder . "/aber/Trash") - (smtpmail-smtp-server . "smtp.office365.com") - (smtpmail-smtp-service . 587)))) - - mu4e-context-policy 'pick-first) - (setq mu4e-html2text-command "lynx -stdin -dump -force_html") - (add-to-list 'mu4e-bookmarks - '((concatenate - 'string - "flag:unread " - "AND ( " - "maildir:/personal/Inbox OR " - "maildir:/personal/slackware OR " - "maildir:/personal-gmail/Inbox OR " - "maildir:/aber/Inbox " - ")") "Unread Interesting Messages" ?i) - ) - (setq mu4e-view-show-images t) - (setq mu4e-compose-crypto-reply-policy 'sign-and-encrypt) - (setq mml-secure-openpgp-sign-with-sender t) - (setq mml-default-encrypt-method "pgpmime") - (add-hook 'mu4e-compose-mode-hook 'mml-secure-message-sign) - ) - -(use-package mu4e-alert - :ensure t - :config - (setq mu4e-alert-interesting-mail-query - (concatenate - 'string - "flag:unread " - "AND ( " - "maildir:/personal/Inbox OR " - "maildir:/personal/slackware OR " - "maildir:/personal-gmail/Inbox OR " - "maildir:/aber/Inbox " - ")")) - (mu4e-alert-set-default-style 'libnotify) - (add-hook 'after-init-hook #'mu4e-alert-enable-notifications)) - (use-package jl-encrypt) (use-package smart-mode-line @@ -245,6 +149,7 @@ (setq fci-rule-column 80) (add-hook 'after-change-major-mode-hook 'fci-mode)) + ;;;(global-company-mode) ;;;(add-hook 'after-init-hook 'global-company-mode) -- 2.45.2 From eba573f7539cf15101d6cd7d16c8519b46b1d34f Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 12 Apr 2017 17:39:26 +0100 Subject: [PATCH 07/16] Optimize online mail --- online_mail/.mutt/account.uk.ac.aber.maf54 | 4 +++- online_mail/.mutt/gpg.rc | 2 ++ online_mail/.mutt/muttrc | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/online_mail/.mutt/account.uk.ac.aber.maf54 b/online_mail/.mutt/account.uk.ac.aber.maf54 index 72bdbde..766efcb 100644 --- a/online_mail/.mutt/account.uk.ac.aber.maf54 +++ b/online_mail/.mutt/account.uk.ac.aber.maf54 @@ -12,4 +12,6 @@ set message_cachedir = ~/.mutt/uk.ac.aber.maf54/cache/bodies set certificate_file = ~/.mutt/uk.ac.aber.maf54/certificates set trash = "+Trash" -set record = "+Sent" \ No newline at end of file +set record = "+Sent" + +set pgp_sign_as="0x150729CC" \ No newline at end of file diff --git a/online_mail/.mutt/gpg.rc b/online_mail/.mutt/gpg.rc index b2900e9..b2cca5b 100644 --- a/online_mail/.mutt/gpg.rc +++ b/online_mail/.mutt/gpg.rc @@ -4,4 +4,6 @@ set crypt_replyencrypt set crypt_replysign set crypt_replysignencrypted set crypt_timestamp +set crypt_use_gpgme set pgp_use_gpg_agent +set pgp_auto_decode diff --git a/online_mail/.mutt/muttrc b/online_mail/.mutt/muttrc index 9ef64ec..50594bc 100644 --- a/online_mail/.mutt/muttrc +++ b/online_mail/.mutt/muttrc @@ -29,7 +29,7 @@ macro pager \cb "|urlview\n" set text_flowed=yes set reflow_text=yes -set editor="vim +':set textwidth=72' +'set fo=aw'" +set editor="gvim -v +':set textwidth=72' +'set fo=aw'" # Encryption source ~/.mutt/gpg.rc @@ -43,4 +43,7 @@ source ~/.mutt/colors.mutt set sort=threads set sort_aux=last-date-received -set fast_reply=yes \ No newline at end of file +set fast_reply=yes + +# Show message some message headers when reading mail +set pager_index_lines=10 -- 2.45.2 From 607253b92bcd856b907c9d11fdcc1f0be8466d5b Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 12 Apr 2017 17:39:41 +0100 Subject: [PATCH 08/16] Update screen layout Moved workstation. Updated physical screen layout --- X/.xinitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/X/.xinitrc b/X/.xinitrc index cc26e4e..86e176b 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -39,7 +39,7 @@ esac # Set screen layout case $HOSTNAME in beryllium) - xrandr --output VGA1 --left-of HDMI1 + xrandr --output HDMI1 --left-of VGA1 ;; *) ;; -- 2.45.2 From 24994206971abbbb3753d134941156da121a86c5 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 12 Apr 2017 17:40:38 +0100 Subject: [PATCH 09/16] Bunch of C formatting rules for emacs --- emacs/.emacs | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/emacs/.emacs b/emacs/.emacs index 857b765..040b49d 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -68,6 +68,7 @@ (use-package org-evil :ensure t) + (use-package flycheck :ensure t :init (global-flycheck-mode)) @@ -157,3 +158,41 @@ (eval-after-load 'company '(add-to-list 'company-backends 'company-jedi)) + +(eval-after-load 'autoinsert + '(define-auto-insert '("\\.org\\'" . "Org header") + '( + "Hides all but one star and uncollapses everything." + "#+STARTUP: hidestars showall\n\n" + _))) + +(add-hook 'find-file-hook 'auto-insert) + +; Sane C formatting + +(defun c-lineup-arglist-tabs-only (ignored) + "Line up argument lists by tabs, not spaces." + (let* ((anchor (c-langelem-pos c-syntactic-element)) + (column (c-langelem-2nd-pos c-syntactic-element)) + (offset (- (1+ column) anchor)) + (steps (floor offset c-basic-offset))) + (* (max steps 1) + c-basic-offset))) + +(add-hook 'c-mode-common-hook + (lambda () + ;; Add kernel style + (c-add-style + "linux-tabs-only" + '("linux" (c-offsets-alist + (arglist-cont-nonempty + c-lineup-gcc-asm-reg + c-lineup-arglist-tabs-only)))))) + +(add-hook 'c-mode-hook + (lambda () + (let ((filename (buffer-file-name))) + ;; Enable kernel mode for the appropriate files + (setq indent-tabs-mode t) + (setq show-trailing-whitespace t) + (c-set-style "linux-tabs-only"))))) -- 2.45.2 From 56871825930ef16af8843406af90eebb41b71f0c Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 12 Apr 2017 17:41:01 +0100 Subject: [PATCH 10/16] Use gvim -v instead of vim --- bash/.bash_aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/bash/.bash_aliases b/bash/.bash_aliases index 0bab62d..041788c 100644 --- a/bash/.bash_aliases +++ b/bash/.bash_aliases @@ -21,3 +21,4 @@ function la { fi } alias tmux='TERM=xterm-256color tmux' +alias vim='gvim -v' -- 2.45.2 From 5cf23455431daaf6299bfef4ab7662914f6c018c Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 13 Jun 2017 19:08:43 +0100 Subject: [PATCH 11/16] Update online mail settings --- online_mail/.mutt/account.com.friedersdorff.max | 2 +- online_mail/.mutt/account.uk.ac.aber.maf54 | 2 +- online_mail/.mutt/muttrc | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/online_mail/.mutt/account.com.friedersdorff.max b/online_mail/.mutt/account.com.friedersdorff.max index db14c31..eb4617c 100644 --- a/online_mail/.mutt/account.com.friedersdorff.max +++ b/online_mail/.mutt/account.com.friedersdorff.max @@ -14,4 +14,4 @@ set certificate_file = ~/.mutt/com.friedersdorff.max/certificates set trash = "+Trash" set record = "+Sent" -set pgp_sign_as="0x153CBB66" +set pgp_sign_as="0xDA2EDF6D" diff --git a/online_mail/.mutt/account.uk.ac.aber.maf54 b/online_mail/.mutt/account.uk.ac.aber.maf54 index 766efcb..ca0f474 100644 --- a/online_mail/.mutt/account.uk.ac.aber.maf54 +++ b/online_mail/.mutt/account.uk.ac.aber.maf54 @@ -14,4 +14,4 @@ set certificate_file = ~/.mutt/uk.ac.aber.maf54/certificates set trash = "+Trash" set record = "+Sent" -set pgp_sign_as="0x150729CC" \ No newline at end of file +set pgp_sign_as="0x251C939D" diff --git a/online_mail/.mutt/muttrc b/online_mail/.mutt/muttrc index 50594bc..81bf080 100644 --- a/online_mail/.mutt/muttrc +++ b/online_mail/.mutt/muttrc @@ -10,7 +10,9 @@ folder-hook 'outlook.office365.com' 'source ~/.mutt/account.uk.ac.aber.maf54' macro index 'c' '?^K+' # Source the passwords file -source "gpg2 -dq ~/.mutt/passwords.gpg |" +#source "gpg2 -dq ~/.mutt/passwords.gpg |" +set my_personal_password=`pass Home/xenon/mail/max@friedersdorff.com | head -n 1` +set my_aber_password=`pass Aber/Main | head -n 1` # Always check personal email first source ~/.mutt/account.com.friedersdorff.max -- 2.45.2 From d23bda261ed2f98974d5e9b1539d24e73bdd6a7a Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 6 Jul 2017 09:49:45 +0100 Subject: [PATCH 12/16] Fix things --- X/.xinitrc | 16 ++++++++-------- bash/.bashrc | 12 ++++++++++-- vim/.vimrc | 4 ++++ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/X/.xinitrc b/X/.xinitrc index 86e176b..60e56eb 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -39,7 +39,7 @@ esac # Set screen layout case $HOSTNAME in beryllium) - xrandr --output HDMI1 --left-of VGA1 + xrandr --output HDMI-1 --left-of DVI-I-1 ;; *) ;; @@ -54,12 +54,12 @@ feh --bg-scale ~/Pictures/background.jpg& xset -b -if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then - eval $(gpg-agent --daemon \ - --use-standard-socket \ - --write-env-file "${HOME}/.gpg-agent-info") -fi - -gpg-connect-agent updatestartuptty /bye >/dev/null +#if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then +# eval $(gpg-agent --daemon \ +# --use-standard-socket \ +# --write-env-file "${HOME}/.gpg-agent-info") +#fi +# +#gpg-connect-agent updatestartuptty /bye >/dev/null exec /usr/bin/ratpoison diff --git a/bash/.bashrc b/bash/.bashrc index 3bf2436..dd39849 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -123,6 +123,14 @@ function __prompt_command() } PROMPT_COMMAND=__prompt_command +if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then + gpg-connect-agent /bye >/dev/null 2>&1 +fi + +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK=~/.gnupg/S.gpg-agent.ssh +fi -GPG_TTY=$(tty) -export GPG_TTY +export GPG_TTY=($tty) +gpg-connect-agent updatestartuptty /bye > /dev/null diff --git a/vim/.vimrc b/vim/.vimrc index 999ce8a..d30a086 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -32,11 +32,15 @@ Plugin 'vim-scripts/MatlabFilesEdition' Plugin 'flazz/vim-colorschemes' Plugin 'benmills/vimux' Plugin 'tmhedberg/SimpylFold' +Plugin 'saltstack/salt-vim' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required +" Swapfiles +set backupdir=$HOME/.vim/backup// + " Random look and feel stuff syntax on set background=dark -- 2.45.2 From ac24a79f863f3d876d9e84a789d32c64d989c20d Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 27 Aug 2017 15:00:44 +0100 Subject: [PATCH 13/16] Laptop config --- X/.Xresources | 4 ++-- X/.Xresources.iridium | 1 + X/.local/bin/bat_mgt.sh | 23 +++++++++++++++++++++++ X/.xinitrc | 18 ++++++++++++++++++ ratpoison/.ratpoisonrc | 10 ---------- ratpoison/.ratpoisonrc.base | 25 +++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 X/.Xresources.iridium create mode 100755 X/.local/bin/bat_mgt.sh delete mode 100644 ratpoison/.ratpoisonrc create mode 100644 ratpoison/.ratpoisonrc.base diff --git a/X/.Xresources b/X/.Xresources index eb6dce0..4fd3626 100644 --- a/X/.Xresources +++ b/X/.Xresources @@ -36,7 +36,7 @@ *.color15: #ffffff -*faceName: Inconsolata +*faceName: Liberation Mono *faceSize: 14 @@ -52,4 +52,4 @@ XTerm*allowSendEvents: true Delete: string("\033[3~")\n\ Home: string("\033[1~")\n\ End: string("\033[4~") -*ttyModes: erase ^? \ No newline at end of file +*ttyModes: erase ^? diff --git a/X/.Xresources.iridium b/X/.Xresources.iridium new file mode 100644 index 0000000..6e046c3 --- /dev/null +++ b/X/.Xresources.iridium @@ -0,0 +1 @@ +*faceSize:20 diff --git a/X/.local/bin/bat_mgt.sh b/X/.local/bin/bat_mgt.sh new file mode 100755 index 0000000..cfdbdd0 --- /dev/null +++ b/X/.local/bin/bat_mgt.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Polls the battery status once per minute. Echos the status to ratpoison if the +# battery is discharging. At low battery status, it warns at 30,20 and 15 minutes +# remaining. Shutsdown at 9 minutes remaining. Requires 'acpitool' to poll the battery. + +while [ 1 ]; do + if [ $(acpitool | awk '/AC adapter/{print $4}') = "off-line" ]; then + bat_stat="$(acpitool | grep Battery)" + seconds_remaining=$(echo $bat_stat | awk '{print $6}' | awk -F':' '{print $1*3600 + $2*60 + $3}') + if [ $seconds_remaining -le 840 ]; then + sudo shutdown -h now + elif [ $seconds_remaining -le 900 ]; then + ratpoison -c "echo Critical! 15 minutes of battery remaining. Shutting down in 1minute." + elif [ $seconds_remaining -le 1200 ]; then + ratpoison -c "echo Warning! 20 minutes of battery remaining. Shuttind down in 5 minutes." + elif [ $seconds_remaining -le 1800 ]; then + ratpoison -c "echo Warning, 30 minutes of battery remaining. Shutting down in 15 minutes." + fi + ratpoison -c "echo $bat_stat" + fi + sleep 60 +done + diff --git a/X/.xinitrc b/X/.xinitrc index 60e56eb..ad4afd1 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -27,6 +27,12 @@ case $HOSTNAME in xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" xmodmap -e "add Control = Control_L Control_R" ;; + iridium) + setxkbmap -variant colemak gb + xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" + xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R" + xmodmap -e "add Control = Control_L Control_R" + ;; beryllium) setxkbmap -variant colemak us xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L" @@ -62,4 +68,16 @@ xset -b # #gpg-connect-agent updatestartuptty /bye >/dev/null +# Battery monitoring +case $HOSTNAME in + palladium) + xbattmon& + ;; + iridium) + ~/.local/bin/bat_mgt.sh& + *) +esac + +cat ~/.ratpoisonrc.base ~/.ratpoisonrc.$HOSTNAME > ~/.ratpoisonrc + exec /usr/bin/ratpoison diff --git a/ratpoison/.ratpoisonrc b/ratpoison/.ratpoisonrc deleted file mode 100644 index f1b0b5c..0000000 --- a/ratpoison/.ratpoisonrc +++ /dev/null @@ -1,10 +0,0 @@ -# Set the colors for ratpoison text! -set bgcolor red -set fwcolor red - -bind f exec firefox --remote "openurl(`$RATPOISON -c getsel`,new-tab)" - -bind l ratclick 1 -bind v ratclick 2 - -bind dollar exec ~/.local/bin/suspend diff --git a/ratpoison/.ratpoisonrc.base b/ratpoison/.ratpoisonrc.base new file mode 100644 index 0000000..5e1404b --- /dev/null +++ b/ratpoison/.ratpoisonrc.base @@ -0,0 +1,25 @@ +# Set the colors for ratpoison text! +set bgcolor red +set fwcolor red +set font "Liberation Mono:size=20" + +bind f exec firefox --remote "openurl(`$RATPOISON -c getsel`,new-tab)" + +bind l ratclick 1 +bind v ratclick 2 + +bind dollar exec ~/.local/bin/suspend + +definekey top XF86AudioLowerVolume exec amixer set Master 5%- +definekey top XF86AudioRaiseVolume exec amixer set Master 5%+ +definekey top XF86AudioMute exec amixer set Master toggle + +definekey top XF86TouchpadToggle exec source /usr/local/bin/toggle_touchpad + +definekey top XF86Sleep exec ~/.local/bin/suspend + +definekey top XF86KbdBrightnessDown exec sudo /usr/local/bin/kbd_bl - +definekey top XF86KbdBrightnessUp exec sudo /usr/local/bin/kbd_bl + + +definekey top XF86MonBrightnessUp exec sudo /usr/local/bin/bl + +definekey top XF86MonBrightnessDown exec sudo /usr/local/bin/bl - -- 2.45.2 From 310fd03acd6aa886c24aa7a11f33349d905ad0fe Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 25 Sep 2017 09:19:48 +0100 Subject: [PATCH 14/16] Use powerline for git --- tmux/.tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index df38b87..8753314 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -9,4 +9,7 @@ bind C-a send-prefix set -g default-terminal "screen-256color" -set -s escape-time 0 \ No newline at end of file +set -s escape-time 0 + +run-shell "powerline-daemon -q" +source "/usr/lib64/python2.7/site-packages/powerline/bindings/tmux/powerline.conf" -- 2.45.2 From e26f095473bbbc450820f7fabd0e82f94562426e Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 26 Sep 2017 10:13:00 +0100 Subject: [PATCH 15/16] Customized ratpoison configs for iridium and beryllium --- ratpoison/.ratpoisonrc.base | 1 - ratpoison/.ratpoisonrc.beryllium | 1 + ratpoison/.ratpoisonrc.iridium | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 ratpoison/.ratpoisonrc.beryllium create mode 100644 ratpoison/.ratpoisonrc.iridium diff --git a/ratpoison/.ratpoisonrc.base b/ratpoison/.ratpoisonrc.base index 5e1404b..e749519 100644 --- a/ratpoison/.ratpoisonrc.base +++ b/ratpoison/.ratpoisonrc.base @@ -1,7 +1,6 @@ # Set the colors for ratpoison text! set bgcolor red set fwcolor red -set font "Liberation Mono:size=20" bind f exec firefox --remote "openurl(`$RATPOISON -c getsel`,new-tab)" diff --git a/ratpoison/.ratpoisonrc.beryllium b/ratpoison/.ratpoisonrc.beryllium new file mode 100644 index 0000000..63e807f --- /dev/null +++ b/ratpoison/.ratpoisonrc.beryllium @@ -0,0 +1 @@ +set font "Liberation Mono:size=12" diff --git a/ratpoison/.ratpoisonrc.iridium b/ratpoison/.ratpoisonrc.iridium new file mode 100644 index 0000000..504f152 --- /dev/null +++ b/ratpoison/.ratpoisonrc.iridium @@ -0,0 +1 @@ +set font "Liberation Mono:size=20" -- 2.45.2 From cc930fca286b8a75c5f3268a95a590c82d824815 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 26 Sep 2017 10:22:30 +0100 Subject: [PATCH 16/16] Fix missing ;; in .xinitrc --- X/.xinitrc | 1 + 1 file changed, 1 insertion(+) diff --git a/X/.xinitrc b/X/.xinitrc index ad4afd1..3c02be3 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -75,6 +75,7 @@ case $HOSTNAME in ;; iridium) ~/.local/bin/bat_mgt.sh& + ;; *) esac -- 2.45.2