From ea93427777b2368a204215469f66a6a9afa7c06f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:22:21 -0400 Subject: clean up emacs init --- .config/emacs/init.el | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 5f399a0..eddd0b7 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,4 +1,5 @@ ;; This config requires Emacs 24.4(+?) +;; Hey, Emacs: -*- Indent-tabs-mode: nil -*- ;; Without (advice-add) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) @@ -88,12 +89,14 @@ (:name dtrt-indent :type elpa ;; Detect indent style for existing files :after (dtrt-indent-mode 1)) (:name page-break-lines :type elpa ;; Display form-feeds pretty - :before (advice-add 'page-break-lines-mode-maybe :override #'page-break-lines-mode) + :before (advice-add 'page-break-lines-mode-maybe + :override #'page-break-lines-mode) :after (global-page-break-lines-mode 1)) (:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces :after (progn (smart-tabs-mode 1) - (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + (apply 'smart-tabs-insinuate + (mapcar 'car smart-tabs-insinuate-alist)))) ;; Major modes (:name bison-mode :type elpa) (:name coffee-mode :type elpa @@ -112,23 +115,28 @@ )) ;; What packages el-get should install, both from above, and it's ;; internal list of sources. -(el-get 'sync '(el-get +(el-get 'sync (append + '(el-get) ;; Minor modes - dtrt-indent - page-break-lines - smart-tabs-mode + '(dtrt-indent + page-break-lines + smart-tabs-mode + ) ;; Major modes - ;;apel flim semi wanderlust ; wanderlust is huge, only use on emailing boxes - ;;nxhtml ; nxhtml is invasive, only enable if actively using - bison-mode - coffee-mode - graphviz-dot-mode - haml-mode - markdown-mode - nginx-mode - php-mode-improved - scss-mode - )) + (if (file-exists-p "~/Maildir") ; wanderlust is huge, only use on emailing boxes + '(apel flim semi wanderlust) + '()) + '( + ;;nxhtml ; nxhtml is invasive, only enable if actively using + bison-mode + coffee-mode + graphviz-dot-mode + haml-mode + markdown-mode + nginx-mode + php-mode-improved + scss-mode + ))) ;; Misc. crap -- cgit v1.2.3-54-g00ecf From 75f0cdaf8b4c0605d3b12bd2de4080c68915c6e1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:22:34 -0400 Subject: Yahoo's fingerprint change... again --- .config/offlineimaprc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/offlineimaprc b/.config/offlineimaprc index 36b382c..4b3d4e3 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -17,7 +17,7 @@ folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] [Repository Remote-SBCGlobal] type = IMAP ssl = yes -cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8 +cert_fingerprint = a920541d377a4249259bcc59846a1faf621b4287 remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] -- cgit v1.2.3-54-g00ecf From cbcae827a5a827ec741a0f28cb69fcc65cac7bd5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:23:24 -0400 Subject: tidy up mail filters --- .config/maildirproc/att.rc | 8 ++++++++ .config/maildirproc/purdue.rc | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 6b31260..4bbd297 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -77,8 +77,10 @@ def handle_incoming_unknown(mail): or is_to_or_from(mail, "parabola.nu") or is_to_or_from(mail, "parabolagnulinux.org") or mail["From"] == "MAILER-DAEMON@yahoo.com" + or mail["From"] == "3174451635@mms.att.net" or mail["From"].contains("@facebookmail.com>") or mail["From"].contains("@gandi.net") + or mail["From"].contains("@github.com>") or mail["From"].contains("@goodwillindy.org>") or mail["From"].contains("@lpi.org>") or mail["From"].contains("@msdlt.k12.in.us>") @@ -86,6 +88,7 @@ def handle_incoming_unknown(mail): or mail["From"].contains("@post.oreilly.com>") or mail["From"].contains("@scouting.org>") or mail["From"].contains("@wolframalpha.com>") + or mail["From"].contains("margieshu@sbcglobal.net") or mail["From"].contains("parabolagnulinux.org") or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre)\.org") or mail["List-Id"].matches(".*\.parabola\.nu") @@ -287,6 +290,10 @@ def my_filters(mail): move_ham(mail,".School.Robotics") return + if mail["Subject"].contains("[Quizroom]"): + move_ham(mail,".School.CS408") + return + # Sort mail from software people for address in [ "@archlinux.org", @@ -301,6 +308,7 @@ def my_filters(mail): "@gnu.org", "@ietf.org", "@kde.org", + "@nongnu.org", "@sourceforge.com", "@thyrsus.com", "trustees@core3.amsl.com", diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index b1f64af..e74a071 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -104,6 +104,10 @@ def my_filters(mail): mail.move("INBOX.work.2013.Comcast") return + if is_to_or_from(mail,"@Cartus.com"): + mail.move("INBOX.work.2015.qualcomm") + return + if ( False or mail["Subject"].contains("[CS Opportunity Update]") @@ -265,10 +269,13 @@ def my_filters(mail): return # CS448 (Databases) if piazza_topic(mail, "CS 44800"): - mail.move("INBOX.classes.2015.1.CS448") + mail.move("INBOX.classes.2015-1.CS448") return # ME297 (FRC) - if mail["Subject"].contains("[ME297]"): + if (False + or mail["Subject"].contains("[ME297]") + or is_to_or_from(mail, "heller5@purdue.edu") + ): mail.move("INBOX.classes.2015-1.ME297") return # SOC324 (Criminology) -- cgit v1.2.3-54-g00ecf From 062265f08cbb511e3ffcd10c3ae55f732293ea26 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:23:50 -0400 Subject: Log maildirproc into the journal instead of log files --- .config/maildirproc/att.rc | 1 - .config/maildirproc/purdue.rc | 1 - .config/systemd/user/maildirproc@.service | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 4bbd297..7ee5f42 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -7,7 +7,6 @@ import datetime processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/att.log" def is_to_or_from(mail,address): """ diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index e74a071..d1505f9 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -5,7 +5,6 @@ import subprocess processor.maildir_base = "~/Maildir.purdue" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/purdue.log" def is_to_or_from(mail,address): """ diff --git a/.config/systemd/user/maildirproc@.service b/.config/systemd/user/maildirproc@.service index bdca746..9c4181c 100644 --- a/.config/systemd/user/maildirproc@.service +++ b/.config/systemd/user/maildirproc@.service @@ -3,7 +3,7 @@ Description=maildirproc mail filter [Service] Type=simple -ExecStart=/usr/bin/maildirproc -r ${HOME}/.config/maildirproc/%I.rc +ExecStart=/usr/bin/maildirproc --rcfile=${HOME}/.config/maildirproc/%I.rc --logfile=- Restart=on-failure [Install] -- cgit v1.2.3-54-g00ecf From 0712c9d148075e4f19b650aa675942f2a413b55e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:24:12 -0400 Subject: config-path: work around slow Unicode handling in Bash --- .local/bin/config-path | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.local/bin/config-path b/.local/bin/config-path index 1d4d4d1..e81a986 100755 --- a/.local/bin/config-path +++ b/.local/bin/config-path @@ -43,6 +43,9 @@ var_done() { } main() { + export LC_ALL=C # Work around brokenly slow Unicode handling + # in Bash + IFS=: # Import existing values var_init PATH -- cgit v1.2.3-54-g00ecf From 931a4c914bc2c23177faab05fc76232fdd254076 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:31:11 -0400 Subject: emacs: have org src fontify natively --- .config/emacs/custom.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index d81ac98..1fdb0d3 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -29,6 +29,7 @@ '(org-latex-pdf-process (quote ("xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f"))) + '(org-src-fontify-natively t) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") -- cgit v1.2.3-54-g00ecf From 66a3f7b35ca796b5b85442feadd9c8b2d2a28cf0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:31:27 -0400 Subject: add a sane default git ignore list --- .config/git/ignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/git/ignore b/.config/git/ignore index e69de29..d0f607c 100644 --- a/.config/git/ignore +++ b/.config/git/ignore @@ -0,0 +1,3 @@ +#*# +.#* +*~ -- cgit v1.2.3-54-g00ecf From e0f08aa75393b20cd1dbc14a3484f3a367108948 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:32:06 -0400 Subject: wmii/rbar: remove dead code --- .config/wmii-hg/rbar | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.config/wmii-hg/rbar b/.config/wmii-hg/rbar index 9aaa485..b95f9c4 100755 --- a/.config/wmii-hg/rbar +++ b/.config/wmii-hg/rbar @@ -1,8 +1,4 @@ #!/bin/bash -IFS=: -read -r name prefix DISPLAY <<<"$1" -export DISPLAY - id=$1 name=${id#[0-9][0-9]_} -- cgit v1.2.3-54-g00ecf From aaeb38790673d3e86207d4a5de45bde0e794805e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:32:20 -0400 Subject: rbar_wifi: sort the wifis --- .config/wmii-hg/rbar_wifi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index eaf0137..f83d921 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -29,7 +29,7 @@ right-click() { IFS='' while read -r line; do list+=("$line") - done < <({ netctl-auto list; printf '> %s\n' 'New Network' 'Disable All' 'Enable All';} | sed 's,$,$,' | column -s '$' -t) + done < <({ netctl-auto list | sort -k1.2; printf '> %s\n' 'New Network' 'Disable All' 'Enable All';} | sed 's,$,$,' | column -s '$' -t) cur='' for item in "${list[@]}"; do -- cgit v1.2.3-54-g00ecf From 4e5135eee28a7895dbc5fd74b0f49314a0f2397e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:32:39 -0400 Subject: config-path: add .npm-prefix --- .local/bin/config-path | 1 + 1 file changed, 1 insertion(+) diff --git a/.local/bin/config-path b/.local/bin/config-path index e81a986..4b7cccb 100755 --- a/.local/bin/config-path +++ b/.local/bin/config-path @@ -8,6 +8,7 @@ prefixes=( "$HOME/.prefix.$(uname -m)" "$HOME/.prefix" "$HOME"/.gem/ruby/* + "$HOME"/.npm-prefix ) in_array() { -- cgit v1.2.3-54-g00ecf