summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-06-20 01:25:36 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-06-20 01:25:36 -0400
commitd052487a09ed53cbdedd4d55fb6d548a0a30a1af (patch)
tree996eaf853419241178c709c9e7cfe704c99e5785
parent7e842cfd399c0bea9d480d5fa7a18dfa06bb6a60 (diff)
This is what happens after about 2 weeks of using Parabola.
Note that .bashrc is increasing it's reliance on "thingutils"
-rw-r--r--.Xsession1
-rw-r--r--.bashrc6
-rw-r--r--.emacs24
-rw-r--r--.git.info.exclude1
-rw-r--r--.maildirproc/default.rc280
-rw-r--r--.wl2
-rwxr-xr-x.wmii/wmiirc_local60
-rw-r--r--.xinitrc18
-rw-r--r--.xsession10
-rw-r--r--Makefile3
10 files changed, 388 insertions, 17 deletions
diff --git a/.Xsession b/.Xsession
deleted file mode 100644
index b35cc23..0000000
--- a/.Xsession
+++ /dev/null
@@ -1 +0,0 @@
-. .profile
diff --git a/.bashrc b/.bashrc
index 161a9a4..d77e848 100644
--- a/.bashrc
+++ b/.bashrc
@@ -96,3 +96,9 @@ fi
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
+
+export TMPDIR="$HOME/tmp"
+
+daemon emacs --daemon
+daemon sysfiles
+daemon maildirproc
diff --git a/.emacs b/.emacs
index fbf4b84..bcd2645 100644
--- a/.emacs
+++ b/.emacs
@@ -13,19 +13,6 @@
)
)
-(setq send-mail-function 'smtpmail-send-it) ; if you use `mail'
-(setq message-send-mail-function 'smtpmail-send-it) ; if you use message/Gnus
-(setq smtpmail-default-smtp-server "plus.smtp.mail.yahoo.com") ; set before loading library
-(setq smtpmail-local-domain "lukeshu.ath.cx")
-(setq smtpmail-sendto-domain "lukeshu.ath.cx")
-(setq smtpmail-debug-info t) ; only to debug problems
-(setq smtpmail-smtp-service 465)
-(setq smtpmail-auth-credentials ; or use ~/.authinfo
- '(("plus.smtp.mail.yahoo.com" 465 "lukeshu@sbcglobal.net" "oct30yahoo")))
-(setq smtpmail-starttls-credentials
- '(("plus.smtp.mail.yahoo.com" 465 nil nil)))
-(load-library "smtpmail")
-
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
("marmalade" . "http://marmalade-repo.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))
@@ -80,6 +67,17 @@
(face-background 'default)))
t)
+(defun mailto-compose-mail (mailto-url)
+ (if (and (stringp mailto-url)
+ (string-match "\\`mailto:" mailto-url))
+ (progn
+ (require 'rfc2368)
+ (let* ((headers (mapcar (lambda (h) (cons (intern (car h)) (cdr h)))
+ (rfc2368-parse-mailto-url mailto-url)))
+ (good-headers (remove-if (lambda (h) (member (car h) '(Body))) headers))
+ (body (cdr (assoc 'Body headers))))
+ (wl-draft good-headers nil nil body)))))
+
(ido-mode t)
(show-paren-mode 1)
diff --git a/.git.info.exclude b/.git.info.exclude
index 581f365..b101ad2 100644
--- a/.git.info.exclude
+++ b/.git.info.exclude
@@ -32,6 +32,7 @@ tmp
\#*#
.~lock.*#
*_history
+history.*
*authority
*.cookie
diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc
new file mode 100644
index 0000000..7d46f57
--- /dev/null
+++ b/.maildirproc/default.rc
@@ -0,0 +1,280 @@
+# -*- mode: python; -*-
+
+import subprocess
+
+processor.maildir_base = "~/Maildir"
+processor.auto_reload_rcfile = True
+
+def is_to_or_from(mail,address):
+ return (
+ mail["From"].contains(address)
+ or mail.target.contains(address))
+def is_to_or_from_re(mail,address):
+ return (
+ mail["From"].matches(address)
+ or mail.target.matches(address))
+
+def bogofilter_auto(mail):
+ p = subprocess.Popen(
+ ["bogofilter", "-u", "-v", "-I", mail.path],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ (output, _) = p.communicate()
+ processor.log("*** Bogofilter result: {0!r}".format(output.rstrip()))
+ if p.returncode not in [0, 1, 2]:
+ processor.log_error(
+ "Error running bogofilter: Return code = {0!r}".format(
+ p.returncode))
+ return p.returncode
+
+def bogofilter_ham(mail):
+ subprocess.call(["bogofilter", "-S", "-n", "-I", mail.path])
+
+def bogofilter_spam(mail):
+ subprocess.call(["bogofilter", "-N", "-s", "-I", mail.path])
+
+def handle_incoming_spam_training(mail):
+ bogofilter_spam(mail)
+ mail.move(".Bulk Mail")
+
+def handle_incoming_ham_training(mail):
+ bogofilter_ham(mail)
+ mail.move(".Ham")
+
+def handle_incoming_ham(mail):
+ my_filters(mail)
+
+def handle_incoming_unknown(mail):
+ # Filter spam
+
+ spam = bogofilter_auto(mail)
+ if spam == 0:
+ mail.move(".Bulk Mail")
+ return
+ elif spam == 1:
+ mail.move(".Ham")
+ return
+ elif spam == 2:
+ # maybe spam
+ my_filters(mail)
+ return
+ else:
+ mail.move(".Error")
+ return
+
+def my_filters(mail):
+ # Sort into software mailing lists
+
+ if mail["List-Id"].matches("bug-gsrc\.gnu\.org"):
+ mail.move(".software.bug-gsrc")
+ return
+
+ if mail["List-Id"].matches("bug-make\.gnu\.org"):
+ mail.move(".software.bug-make")
+ return
+
+ if mail["List-Id"].matches("help-make\.gnu\.org"):
+ mail.move(".software.help-make")
+ return
+
+ if mail["List-Id"].matches("social(|-discuss)\.gnu\.org"):
+ mail.move(".software.social")
+ return
+
+ # Sort email from some social websites
+
+ if mail["From"].matches("@facebook(|mail)\.com"):
+ mail.move(".Social.Facebook")
+ return
+
+ if mail["From"].matches("identi\.ca"):
+ mail.move(".Social.Identica")
+ return
+
+ if mail["From"].matches("twitter\.com"):
+ mail.move(".Social.Twitter")
+ return
+
+ if mail["From"].matches("@xkcd\.com"):
+ mail.move(".Social.xkcd")
+ return
+
+ # Sort email related to Troop 276
+
+ if (
+ False
+ or mail["List-Id"].contains("troopmailinglist.troop276.net")
+ or is_to_or_from(mail,"t276_announcements@att.net")
+ or mail["Subject"].matches("troop\s*276")
+ or mail["Subject"].matches("merit\s*badge")
+ or is_to_or_from(mail,"jsting@sbcglobal.net")
+ or is_to_or_from(mail,"trdindy@comcast.net")
+ or is_to_or_from(mail,"wjensen111@aol.com")
+ or is_to_or_from(mail,"dhoyt@yourhomecompany.com")
+ or is_to_or_from(mail,"salupo_vincent_p@lilly.com")
+ or is_to_or_from(mail,"basu@maharjan.org")
+ or is_to_or_from(mail,"muellerindy@yahoo.com")
+ or is_to_or_from(mail,"solorzano.luis@rocketmail.com")
+ or is_to_or_from(mail,"eldredmac@comcast.net")# MacDonell
+ or is_to_or_from(mail,"mitchprather@sbcglobal.net")
+ ):
+ mail.move(".Troop276")
+ return
+
+ if mail["From"].matches("margieshu@sbcglobal\.net"):
+ mail.move(".misc.Mom")
+ return
+
+ # Sort mail from robotics people
+ for address in [
+ "jeffreysmith@msdlt.k12.in.us",
+ "jason.zielke@gmail.com",
+ "allison.m.babcock@gmail.com",
+ "william.walk@gmail.com",
+ "BBonahoom@stanleyworks.com",
+ "wcxctrack829@aim.com", # Pat
+ "djnels1@comcast.net", # Dave and Julie Nelson
+ "sarahlittell@comcast.net",
+ "skiplittell@comcast.net",
+ "dave.nelson@ecolab.com",
+ "@ni.com",
+ ]:
+ if is_to_or_from(mail,address):
+ mail.move(".School.Robotics")
+ return
+ for subject_re in [
+ "robotics",
+ "1024",
+ "kil-?a-?bytes",
+ ]:
+ if mail["Subject"].matches(subject_re):
+ mail.move(".School.Robotics")
+ return
+
+ # Sort mail from scoftware people
+ for address in [
+ "gnu.org",
+ "gitorious.org",
+ "sourceforge.com",
+ "ietf.org",
+ "trustees@core3.amsl.com",
+ "esr@thyrsus.com",
+ "canonical.org",
+ "foocorp.net",
+ "parabolagnulinux.org"
+ ]:
+ if is_to_or_from(mail,address):
+ mail.move(".software")
+ return
+ for subject_re in [
+ "\[Stow-[^\]]*\].*",
+ ]:
+ if mail["Subject"].matches(subject_re):
+ mail.move(".software")
+ return
+
+ for address in [
+ "@lpi.org",
+ "@pearson.com",
+ "CompTIA",
+ ]:
+ if mail["From"].contains(address):
+ mail.move(".CompTIA")
+ return
+
+ if mail["From"].contains("@lnnorthstar.org"):
+ mail.move(".School.Newspaper")
+ return
+
+ if mail["From"].contains("susyphil@aol.com"):
+ mail.move(".PMCH")
+
+ for address in [
+ "d.farrar@comcast.net",
+ "dfarrar@avacoustics.net",
+ "@vmware.com",
+ ]:
+ if is_to_or_from(mail,address):
+ mail.move(".Work.FAST")
+ return
+
+ # Sort misc newsletters
+
+ if (
+ False
+ or mail["From"].contains("newsletter")
+ or mail["From"].contains("auto@comicsbyemail.com")
+ or mail["From"].contains("oreilly.com")
+ or mail["Subject"].contains("newsletter")
+ or mail["From"].contains("Info@mailing.jamendo.com")
+ ):
+ mail.move(".misc.Newsletters")
+ return
+
+ if (
+ False
+ or mail["From"].contains("@msdlt.k12.in.us")
+ or is_to_or_from(mail,"ibwhite@comcast.net")
+ or mail["Subject"].contains("IOA")
+ or mail["From"].contains("nths.org")
+ or mail["Subject"].contains("NTHS")
+ or mail["Subject"].contains("National Technical Honor Society")
+ or mail["Subject"].contains("NHS")
+ or mail["Subject"].contains("National Honor Society")
+ ):
+ mail.move(".School")
+ return
+
+ # from college stuff
+ if (
+ False
+ or mail["Subject"].contains("NYLF") # National Youth Leadership Conference
+ or mail["Subject"].contains("NSHSS")
+ ):
+ mail.move(".College.Societies")
+ return
+ if (
+ False
+ or mail["From"].contains(".edu")
+ or mail["From"].contains("admissions@")
+ or mail["From"].contains("college")
+ or mail["From"].contains("university")
+ or mail["Subject"].contains("college")
+ # now we get to the BS
+ or mail["From"].contains("@dreamitdoitindiana.com")
+ or mail["From"].contains("@indianatechinfo.org")
+ ):
+ mail.move(".College")
+ return
+
+ if mail["From"].contains("@projectwonderful.com"):
+ mail.move(".ProjectWonderful")
+ return
+
+ if (
+ False
+ or mail["From"].matches("@localhost")
+ or mail["From"].matches("@[^,>]*\.local")
+ or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx")
+ or mail["To"].matches("luke@")
+ ):
+ mail.move(".LocalSystems")
+ return
+ if (
+ False
+ or mail["Subject"].contains("password")
+ or mail["Subject"].contains("account")
+ ):
+ mail.move(".misc.accounts")
+ return
+
+handle_mapping = {
+ ".": handle_incoming_unknown,
+ ".Inbox": handle_incoming_unknown,
+ ".spam-training": handle_incoming_spam_training,
+ ".ham-training": handle_incoming_ham_training,
+ ".Ham": handle_incoming_ham,
+ }
+processor.maildirs = handle_mapping.keys()
+for mail in processor:
+ handle_mapping[mail.maildir](mail)
diff --git a/.wl b/.wl
index ae95926..b1a95e7 100644
--- a/.wl
+++ b/.wl
@@ -18,7 +18,7 @@
;; the '.'-prefix is for marking them as maildirs
wl-fcc "..Sent" ;; sent msgs go to the "sent"-folder
wl-default-folder "..Inbox" ;; my main inbox
- wl-draft-folder "..Drafts" ;; store drafts in 'postponed'
+ wl-draft-folder "..Draft" ;; store drafts in 'postponed'
wl-trash-folder "..Trash" ;; put trash in 'trash'
wl-spam-folder "..Bulk Mail" ;; put spam in 'Bulk Mail'
wl-queue-folder "..queue" ;; we don't use this
diff --git a/.wmii/wmiirc_local b/.wmii/wmiirc_local
new file mode 100755
index 0000000..eac35c0
--- /dev/null
+++ b/.wmii/wmiirc_local
@@ -0,0 +1,60 @@
+#!/bin/dash
+
+MODKEY=Mod4
+export WMII_TERM="urxvt"
+
+
+status() {
+ buffer=$(
+ echo -n ' '
+ # Wifi status
+ echo -n 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality)
+
+ echo -n ' | '
+
+ # Battery charge (not status)
+ echo -n $(acpi -b | sed 's/.*, \{0,2\}\([0-9]\{1,3\}%\),.*/Bat: \1/')
+
+ echo -n ' | '
+ # CPU
+ # This doesn't work for me, it shows capacity
+ #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;')
+ # This actually displays %idle
+ echo -n 'CPU: [ '$(tail -n3 ~/tmp/cputime|sed -u 's/ */\t/g'|cut -f3,12|sed 's/\t\(.*\)/(\1)/')' ]'
+
+ #echo -n ' | '
+
+ #echo -n $(uptime | sed 's/.*://; s/,//g')
+
+ echo -n ' | '
+
+ echo -n $(date)
+
+ echo -n ' '
+ )
+ echo "$buffer"
+}
+
+# Solarized
+SOL_BASE03='#002b36'
+SOL_BASE02='#073642'
+SOL_BASE01='#586e75'
+SOL_BASE00='#657b83'
+SOL_BASE0='#839496'
+SOL_BASE1='#93a1a1'
+SOL_BASE2='#eee8d5'
+SOL_BASE3='#fdf6e3'
+SOL_YELLOW='#b58900'
+SOL_ORANGE='#cb4b16'
+SOL_RED='#dc322f'
+SOL_MAGENTA='#d33682'
+SOL_VIOLET='#6c71c4'
+SOL_BLUE='#268bd2'
+SOL_CYAN='#2aa198'
+SOL_GREEN='#859900'
+
+# Solarized-dark
+# ="<text> <background> <border>"
+WMII_NORMCOLORS="$SOL_BASE0 $SOL_BASE03 $SOL_BASE02"
+WMII_FOCUSCOLORS="$SOL_BASE0 $SOL_BASE02 $SOL_BASE0"
+WMII_BACKGROUND="$SOL_BASE02"
diff --git a/.xinitrc b/.xinitrc
new file mode 100644
index 0000000..cce93f7
--- /dev/null
+++ b/.xinitrc
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# ~/.xinitrc
+#
+# Executed by startx (run your window manager from here)
+
+if [ -d /etc/X11/xinit/xinitrc.d ]; then
+ for f in /etc/X11/xinit/xinitrc.d/*; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+# exec gnome-session
+# exec startkde
+# exec startxfce4
+# ...or the Window Manager of your choice
+exec wmii
diff --git a/.xsession b/.xsession
new file mode 100644
index 0000000..a16dc0b
--- /dev/null
+++ b/.xsession
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#
+# ~/.xsession
+#
+# Executed by xdm/gdm/kdm at login
+#
+
+/bin/bash --login -i ~/.xinitrc
+
diff --git a/Makefile b/Makefile
index 6d2921b..abf0ee2 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ clean:
for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@'
.folders: Maildir
- find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@'>'$@'
+ find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@'|sort>'$@'
.crontab.cookie: .crontab .crontab.local
cat $^ | crontab
@@ -23,4 +23,3 @@ commit:
pull:
git pull
$(MAKE)
-