diff options
63 files changed, 1143 insertions, 374 deletions
diff --git a/.config/.gitignore b/.config/.gitignore new file mode 100644 index 0000000..b5b3b3c --- /dev/null +++ b/.config/.gitignore @@ -0,0 +1,19 @@ +/RecentDocuments + +# Ignore things I don't care enough about to track +/Trolltech.conf +/vlc +/purple + +# some 3d graphics toolkit +/Kitware +# KDE color picker +/colors +# binary, not helpful to track +/dconf/user + +# Ignore these files that if I tracked them, would be a separate repo +/libreoffice +/transmission +/gimp-* +/netbeans diff --git a/.config/Makefile b/.config/Makefile new file mode 100644 index 0000000..829b820 --- /dev/null +++ b/.config/Makefile @@ -0,0 +1,40 @@ +#!/usr/bin/make -f + +SHELL = /bin/bash + +GITDIR = ${HOME}/.git + +targets = \ + ${GITDIR}/info/exclude \ + ${HOME}/.folders \ + ${XDG_CACHE_HOME}/config-symlinks/cookie \ + ${XDG_CACHE_HOME}/cron/cookie + +all: $(targets) +clean: + rm -f $(targets) + +${HOME}/.folders: ${HOME}/Maildir + ( echo '..'; find $< -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' +${GITDIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) + ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ + +${XDG_CACHE_HOME}/cron/cookie: ${XDG_CONFIG_HOME}/cron + -(cat $^/*; echo) | crontab - 2>/dev/null + mkdir -p '$(@D)' + date > '$@' + +${XDG_CACHE_HOME}/config-symlinks/cookie: ${XDG_CONFIG_HOME}/symlinks + config-symlinks + mkdir -p '$(@D)' + date > '$@' + +${HOME}/Maildir: + mkdir -p '$@'/{cur,new,tmp} +${HOME}/Maildir/%: | ${HOME}/Maildir + mkdir -p '$@'/{cur,new,tmp} + touch '$@'/maildirfolder + +.PHONY: FORCE PHONY +FORCE: ; +PHONY: ; diff --git a/.config/X11/defaults b/.config/X11/defaults index ceabc5c..252170c 100644 --- a/.config/X11/defaults +++ b/.config/X11/defaults @@ -1,12 +1,17 @@ -URxvt.background: #000000 -URxvt.foreground: #CCCCCC +# -*- Mode: Conf-xdefaults -*- + +# "native" colors +#URxvt.background: #000000 +#URxvt.foreground: #CCCCCC +# Tango-dark +URxvt.background: #2E3436 +URxvt.foreground: #EEEEEC URxvt.scrollstyle: plain URxvt.scrollBar_floating: true URxvt.font: xft:Monospace-8 URxvt.cursorBlink: true -URxvt.termName: xterm-256color URxvt.pastableTabs: true URxvt.scrollTtyOutput: false @@ -14,5 +19,5 @@ URxvt.scrollTtyKeypress: false URxvt.scrollWithBuffer: true URxvt.perl-ext-common: default,matcher -URxvt.urlLauncher: v-www-browser +URxvt.url-launcher: v-www-browser URxvt.matcher.button: 1 diff --git a/.config/X11/login b/.config/X11/login index a16dc0b..03bad2a 100644 --- a/.config/X11/login +++ b/.config/X11/login @@ -7,4 +7,3 @@ # /bin/bash --login -i ~/.xinitrc - diff --git a/.config/X11/modmap b/.config/X11/modmap new file mode 100644 index 0000000..1736e09 --- /dev/null +++ b/.config/X11/modmap @@ -0,0 +1,12 @@ +! My desktop doesn't have a super key, so I map Caps_Lock to Super_L +! Also, use Caps_Lock for the compose key +remove lock = Caps_Lock +keysym Caps_Lock = Super_L Multi_key + +! All of these are my "super". Silly I have so many... +clear mod4 +add mod4 = Super_L Super_R Hyper_L Hyper_R Menu + + +! Note to future me: +! The modifiers are: << Shift, Lock, Control, Mod{1..5} >> and are NOT case sensitive diff --git a/.config/X11/serverrc b/.config/X11/serverrc new file mode 120000 index 0000000..ce14133 --- /dev/null +++ b/.config/X11/serverrc @@ -0,0 +1 @@ +/etc/X11/xinit/xserverrc
\ No newline at end of file diff --git a/.config/abs.conf b/.config/abs.conf new file mode 100644 index 0000000..163bc53 --- /dev/null +++ b/.config/abs.conf @@ -0,0 +1 @@ +ABSROOT="$HOME/packages/abs" diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index de1a321..aabd073 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -6,23 +6,23 @@ # Set up colors and settings for ls/dir/vdir # ###################################################################### if [ -x "`which dircolors`" ]; then - eval "`dircolors -b`" - alias ls='ls -1v --color=auto' - alias dir='dir -v --color=auto' - alias vdir='vdir -v--color=auto' + eval "`dircolors -b`" + alias ls='ls -1v --color=auto' + alias dir='dir -v --color=auto' + alias vdir='vdir -v--color=auto' - for xgrep in ${PATH//:/\/*grep }/*grep; do - if [ -f "$xgrep" ]; then - xgrep=`basename "$xgrep"` - if [ "$xgrep" != pgrep ]; then - alias $xgrep="$xgrep --color=auto" - fi - fi - done + for xgrep in ${PATH//:/\/*grep }/*grep; do + if [ -f "$xgrep" ]; then + xgrep=`basename "$xgrep"` + if [ "$xgrep" != pgrep ]; then + alias $xgrep="$xgrep --color=auto" + fi + fi + done else - alias ls='ls -1v' - alias dir='dir -v' - alias vdir='vdir -v' + alias ls='ls -1v' + alias dir='dir -v' + alias vdir='vdir -v' fi ###################################################################### @@ -36,8 +36,7 @@ alias l='ls -CF' # Some preferences for miscellaneous stuff # ###################################################################### #alias rm='gvfs-trash' -alias ssh='ssh -XC' -alias sed='sed --follow-symlinks' +#alias sed='sed --follow-symlinks' # breaks sed 4.2.2 alias tree='tree --charset utf8' alias cd=pushd alias gitk='gitk --all --date-order' @@ -48,19 +47,11 @@ alias gitk='gitk --all --date-order' redshift='redshift -l39.9030:85.9979' alias gtk-redshift="gtk-$redshift" alias redshift="$redshift" +unset redshift ###################################################################### # Some almost-function aliases # ###################################################################### -#alias serva='ssh luke@servb.ath.cx -p3440' -#alias phpdoctor='php /usr/gnu/www/0-other/phpdoctor-head/phpdoc.php' -function xterm-title () { echo "];$@"; } # Oh, wait this one *is* a function alias lock="clear; away -C 'This terminal is locked'" -alias plock="xterm-title Terminal Locked;lock" - -###################################################################### -# Other # -###################################################################### -case "$TERM" in - eterm*) alias editor='editor -n';; -esac +alias plock="term-title Terminal Locked;lock" +mvln() { mv $1 $2; ln -s $2 $1; } diff --git a/.config/bash/login.sh b/.config/bash/login.sh new file mode 100644 index 0000000..1269a03 --- /dev/null +++ b/.config/bash/login.sh @@ -0,0 +1,9 @@ +# ~/.bash_login: executed by bash(1) when login shell starts. + +# I think this is sane default behavior + +# Load user settings +. "$HOME/.profile" + +# Load bash settings (automatic for non-login shells) +. "$HOME/.bashrc" diff --git a/.config/conkeror b/.config/conkerorrc index e33add1..e33add1 100644 --- a/.config/conkeror +++ b/.config/conkerorrc diff --git a/.config/cron/make-config b/.config/cron/make-config new file mode 100644 index 0000000..448475b --- /dev/null +++ b/.config/cron/make-config @@ -0,0 +1,2 @@ +# m h dom mon dow command +*/5 * * * * . $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..fc93a12 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,92 @@ +# -*- Mode: conf -*- +[global] + + # Markup syntax: + # http://developer.gnome.org/pango/stable/PangoMarkupFormat.html + # Format string variables: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + + # Message format + format = "<b>%s</b>\n%b" + allow_markup = yes + ignore_newline = no + # Message word-wrap/scroll + word_wrap = yes # Split lines... + bounce_freq = 0 # ...or scroll long lines? + # Window settings + monitor = 0 # Default monitor + follow = mouse # Follow monitors? (mouse/keyboard/none) + geometry = "300x5-0+16" # [{width}]x{height}][+/-{x}+/-{y}] + transparency = 10 + # Layout settings + padding = 8 # Vertical padding + horizontal_padding = 8 # Horizontal padding + separator_height = 2 # Height of line between notifications + separator_color = frame # (auto/foreground/frame/<X color>) + # Font settings + font = Monospace 8 + line_height = 0 # if less than font height, font height is used + allignment = left # (left/center/right) + # Misc. + sort = yes # Sort messages by urgency + indicate_hidden = yes + show_age_threshold = 60 # -1 to disable + idle_threshold = 120 # Don't timeout messages if the user is gone + sticky_history = yes # Don't timeout messages popped up from history + startup_notification = false # mostly for debugging + # External programs + dmenu = wimenu -p dunst: + browser = v-www-browser + +[frame] + width = 1 + color = "#eeeeec" + +[shortcuts] + close = ctrl+space + close_all = ctrl+shift+space + history = ctrl+grave + context = ctrl+shift+period + +[urgency_low] + background = "#2e3436" + foreground = "#babdb6" + timeout = 10 + +[urgency_normal] + background = "#555753" + foreground = "#eeeeec" + timeout = 10 + +[urgency_critical] + background = "#cc0000" + foreground = "#eeeeec" + timeout = 0 + + +# Every section that isn't one of the above is interpreted as a rules +# to override settings for certain messages. + +# Filters: (shell-like globbing will get expanded) +# appname +# summary +# body +# icon +# Overrides: +# timeout +# urgency +# foreground +# background +# format (blank to not display) +# Scripting: +# If you set 'script=', the value will be called like: +# script appname summary body icon urgency +# Where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order to find +# fitting options for filters. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 3cd2ea3..2a7645f 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -58,14 +58,45 @@ ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(require 'go-mode-load) + +(require 'mailcrypt) +(mc-setversion "gpg") +(add-hook 'wl-summary-mode-hook 'mc-install-read-mode) +(add-hook 'wl-mail-setup-hook 'mc-install-write-mode) + +(defun mc-wl-verify-signature () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (mc-verify))) + +(defun mc-wl-decrypt-message () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (let ((inhibit-read-only t)) + (mc-decrypt)))) + +(eval-after-load "mailcrypt" + '(setq mc-modes-alist + (append + (quote + ((wl-draft-mode (encrypt . mc-encrypt-message) + (sign . mc-sign-message)) + (wl-summary-mode (decrypt . mc-wl-decrypt-message) + (verify . mc-wl-verify-signature)))) + mc-modes-alist))) + ;(load "mdmua") (load "emacsutils") +(set-default 'truncate-lines t) (tool-bar-mode -1) (ido-mode t) (show-paren-mode 1) -(setq org-hide-leading-stars t) (setq org-log-done 'time) +(setq gamegrid-user-score-file-directory "/var/games/emacs/") ;(xclip-mode 1) (load "whitespace") @@ -170,6 +201,9 @@ )) (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode)) ;(require 'flymake) ;(add-hook 'php-mode-hook (lambda() (flymake-mode 1))) @@ -178,3 +212,29 @@ ;(setq tramp-debug-buffer t) ;(setq tramp-verbose 10) + +;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") +;; (require 'mu4e) +;; (require 'mu4e-speedbar) + +;; (setq +;; mu4e-maildir "~/Maildir" ;; top-level Maildir +;; mu4e-sent-folder "/.Sent" ;; folder for sent messages +;; mu4e-drafts-folder "/.Draft" ;; unfinished messages +;; mu4e-trash-folder "/.Trash" ;; trashed messages +;; mu4e-refile-folder "/archive") ;; saved messages +;; (setq mu4e-get-mail-command "offlineimap") +;; (setq mu4e-use-fancy-chars "t") +;; ;; enable inline images +;; (setq mu4e-view-show-images t) +;; ;; use imagemagick, if available +;; (when (fboundp 'imagemagick-register-types) +;; (imagemagick-register-types)) + + +(defun sm-try-smerge () + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^<<<<<<< " nil t) + (smerge-mode 1)))) +(add-hook 'find-file-hook 'sm-try-smerge t) diff --git a/.wl b/.config/emacs/wl.el index f28f6ed..a169249 100644 --- a/.wl +++ b/.config/emacs/wl.el @@ -2,19 +2,20 @@ (setq user-mail-address "lukeshu@sbcglobal.net") -;; wanderlust +;; wanderlust (setq ;; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - wl-local-domain "lukeshu.ath.cx" + wl-local-domain "lukeshu.ath.cx" wl-icon-directory "~/.emacs.d/el-get/wanderlust/icons" - + ;; Network ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This only deals with sending--I use offlineimap to fetch wl-draft-send-mail-function 'wl-draft-send-mail-with-smtp ;; The following settings are Yahoo!'s SMTP servers: wl-smtp-connection-type (quote ssl) - wl-smtp-authenticate-type "login" + wl-smtp-authenticate-type "login" wl-smtp-posting-server "plus.smtp.mail.yahoo.com" + ;wl-smtp-posting-server "outbound.att.net" wl-smtp-posting-port 465 wl-smtp-posting-user user-mail-address wl-message-id-domain user-mail-address @@ -24,10 +25,10 @@ elmo-cache-directory "~/.emacs.d/elmo-cache" ;; where elmo keeps all its stuff elmo-maildir-folder-path "~/Maildir" ;; where I store my mail - ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path + ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path ;; the '.'-prefix is for marking them as maildirs wl-fcc "..Sent" ;; sent msgs go to the "sent"-folder - wl-default-folder "..Ham" ;; my main inbox + wl-default-folder "..Ham" ;; my main inbox 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' @@ -45,16 +46,16 @@ "^'$") ;; Writing - wl-from (concat user-full-name " <" user-mail-address ">") ;; From: line + wl-from (concat user-full-name " <" user-mail-address ">") ;; From: line ;;wl-organization "Foo Corp" wl-fcc-force-as-read t ;; mark sent messages as read mime-edit-split-message nil ;; don't split long messages ;; Reading ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; wl-stay-folder-window t ;; show the folder pane (left) - wl-folder-window-width 35 ;; + wl-folder-window-width 35 ;; wl-message-auto-reassemble-message/partial t ;; reasemble split messages - + wl-message-ignored-field-list '("^.*:") ;; default to hiding all headers wl-message-visible-field-list ;; but then display these '("^\\(To\\|Cc\\):" diff --git a/.config/git/config b/.config/git/config index 9846d72..218b006 100644 --- a/.config/git/config +++ b/.config/git/config @@ -8,3 +8,7 @@ smtpserver = plus.smtp.mail.yahoo.com smtpuser = lukeshu@sbcglobal.net smtpserverport = 465 +[push] + default = matching +[alias] + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative diff --git a/.config/git/ignore b/.config/git/ignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.config/git/ignore diff --git a/.gnupg/gpg.conf b/.config/gpg/gpg.conf index f43a58e..f43a58e 100644 --- a/.gnupg/gpg.conf +++ b/.config/gpg/gpg.conf diff --git a/.config/gtk-2.0/.gitignore b/.config/gtk-2.0/.gitignore new file mode 100644 index 0000000..67b1609 --- /dev/null +++ b/.config/gtk-2.0/.gitignore @@ -0,0 +1 @@ +gtkfilechooser.ini diff --git a/.config/gtk-3.0/bookmarks b/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..85af107 --- /dev/null +++ b/.config/gtk-3.0/bookmarks @@ -0,0 +1,5 @@ +file:///home/luke/Documents +file:///home/luke/Music +file:///home/luke/Pictures +file:///home/luke/Videos +file:///home/luke/Downloads diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index 5c3cf6a..9801ab0 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -1,17 +1,17 @@ -[Settings] -# DO NOT EDIT! This file will be overwritten by LXAppearance. -gtk-theme-name = oxygen-gtk -gtk-icon-theme-name = default.kde4 -gtk-font-name = Sans 10 -gtk-cursor-theme-name = Vanilla-DMZ -gtk-cursor-theme-size = 0 -gtk-toolbar-style = GTK_TOOLBAR_BOTH -gtk-toolbar-icon-size = GTK_ICON_SIZE_SMALL_TOOLBAR -gtk-button-images = 0 -gtk-menu-images = 1 -gtk-enable-event-sounds = 1 -gtk-enable-input-feedback-sounds = 1 -gtk-xft-antialias = 1 -gtk-xft-hinting = 1 -gtk-xft-hintstyle = hintfull -gtk-xft-rgba = rgb +[Settings] +gtk-theme-name=oxygen-gtk +gtk-icon-theme-name=oxygen +gtk-fallback-icon-theme=gnome +gtk-font-name=Sans 10 +gtk-cursor-theme-name=Vanilla-DMZ +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR +gtk-button-images=0 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb diff --git a/.config/hgk b/.config/hgk new file mode 100644 index 0000000..f767058 --- /dev/null +++ b/.config/hgk @@ -0,0 +1,59 @@ +set mainfont {Helvetica 9} +set curidfont {Helvetica 9 bold italic underline} +set textfont {Courier 9} +set findmergefiles 0 +set gaudydiff 0 +set maxgraphpct 50 +set maxwidth 16 +set geometry(width) 1364 +set geometry(height) 690 +set geometry(canv1) 321 +set geometry(canv2) 66 +set geometry(canv3) 947 +set geometry(canvh) 256 +set geometry(ctextw) 90 +set geometry(cflistw) 84 +# +# main window position: +set posx 1 +set posy 61 +# +# authorcolors format: +# +# zero or more sublists of +# +# { regex color } +# +# followed by a list of colors +# +# If the commit author matches a regex in a sublist, +# the commit will be colored by that color +# otherwise the next unused entry from the list of colors +# will be assigned to this commit and also all other commits +# of the same author. When the list of colors is exhausted, +# the last entry will be reused. +# +set authorcolors { + black blue deeppink mediumorchid blue burlywood4 goldenrod slateblue red2 navy dimgrey +} +# +# The background color in the text windows +set bgcolor white +# +# The text color used in the diff and file list view +set fgcolor black +# +# Color to display + lines in diffs +set diffaddcolor #00a000 +# +# Color to display - lines in diffs +set diffremcolor red +# +# Merge diffs: Color to signal lines from first parent +set diffmerge1color red +# +# Merge diffs: Color to signal lines from second parent +set diffmerge2color blue +# +# Hunkseparator (@@ -lineno,lines +lineno,lines @@) color +set hunksepcolor blue diff --git a/.config/hgrc b/.config/hgrc index 96fce82..cf595e3 100644 --- a/.config/hgrc +++ b/.config/hgrc @@ -1,2 +1,4 @@ [ui] username = Luke Shumaker <lukeshu@sbcglobal.net> +[extensions] +hgk = diff --git a/.icons/default/index.theme b/.config/icons/default/index.theme index dd26337..dd26337 100644 --- a/.icons/default/index.theme +++ b/.config/icons/default/index.theme diff --git a/.config/libretools/.gitignore b/.config/libretools/.gitignore new file mode 100644 index 0000000..1881962 --- /dev/null +++ b/.config/libretools/.gitignore @@ -0,0 +1 @@ +blacklist.txt diff --git a/.config/lxpanel/default/config b/.config/lxpanel/default/config index 3ac287f..e19a7d1 100644 --- a/.config/lxpanel/default/config +++ b/.config/lxpanel/default/config @@ -1,3 +1,4 @@ [Command] FileManager=v-editor %s -Terminal=urxvt +Terminal=urxvt -c %s +Logout=bash -c 'echo quit >> $WMII_DIR/ctl' diff --git a/.config/lxpanel/default/panels/panel b/.config/lxpanel/default/panels/panel index 9d776bb..93bdb61 100644 --- a/.config/lxpanel/default/panels/panel +++ b/.config/lxpanel/default/panels/panel @@ -9,7 +9,7 @@ Global { width=100 height=16 transparent=1 - tintcolor=#002b36 + tintcolor=#555753 alpha=255 autohide=0 heightwhenhidden=2 @@ -17,11 +17,21 @@ Global { setpartialstrut=1 usefontcolor=1 fontsize=10 - fontcolor=#839496 + fontcolor=#eeeeec usefontsize=0 background=0 backgroundfile=/usr/share/lxpanel/images/background.png iconsize=16 + loglevel=2 +} + +Plugin { + type = menu + Config { + image=/usr/share/lxpanel/images/my-computer.png + system { + } + } } Plugin { diff --git a/.config/maildirproc/default.rc b/.config/maildirproc/att.rc index 71bc00c..71bc00c 100644 --- a/.config/maildirproc/default.rc +++ b/.config/maildirproc/att.rc diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc new file mode 100644 index 0000000..6d4b913 --- /dev/null +++ b/.config/maildirproc/purdue.rc @@ -0,0 +1,191 @@ +# -*- mode: python; indent-tabs-mode: t -*- + +import os +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): + """ + Return true if [mail] is to or from an address that contains [address]. + """ + return ( + mail["From"].contains(address) + or mail.target.contains(address)) +def is_to_or_from_re(mail,address): + """ + Return true if [mail] is to or from an address that matches the + regex [address]. + """ + return ( + mail["From"].matches(address) + or mail.target.matches(address)) + +def piazza_topic(mail, topic): + return ( + is_to_or_from(mail, topic+" on Piazza") + or mail["Subject"].contains(topic+" on Piazza")) + +def my_filters(mail): + # Generic stuff ######################################################## + + if ( + False + or mail["Subject"].contains("[PASE]") + or is_to_or_from(mail,"Purduealumni@purdue.edu") + or is_to_or_from(mail,"pase@purdue.edu") + ): + mail.move("INBOX.crap.PASE") + return + + if mail["Subject"].contains("[PLUG]"): + mail.move("INBOX.crap.PLUG") + return + + if mail["From"].matches(".*bursar.*@purdue\.edu"): + mail.move("INBOX.tuition") + return + + if mail["From"].contains("mailhub-admin@purdue.edu"): + mail.move("INBOX.crap.mailhub-admin") + return + + if mail["From"].matches("pmx-.*@purdue.edu"): + mail.move("INBOX.crap.spam") + return + + if is_to_or_from(mail,"linkedin.com"): + mail.move("INBOX.crap.LinkedIn") + return + + if is_to_or_from(mail,"follet.com"): + mail.move("INBOX.Follet") + return + + if ( + False + or is_to_or_from(mail,"@edrtrust.com") + or is_to_or_from(mail,"@propertysolutions.com") + or is_to_or_from(mail,"collegestationapartments@gmail.com") + or is_to_or_from_re(mail,"collegestationca\..*@gmail.com") + or is_to_or_from(mail, "@duke-energy.com") + ): + mail.move("INBOX.housing.CollegeStation") + return + + if mail["From"].matches("facebook(|mail)\.com"): + mail.move("INBOX.crap.Facebook") + return + + if ( + False + or is_to_or_from(mail,"@cable.comcast.com") + or is_to_or_from(mail,"@apexsystemsinc.com") + ): + mail.move("INBOX.work.Comcast") + return + + if ( + False + or mail["Subject"].contains("[CS Opportunity Update]") + or mail["Subject"].contains("[CS Majors]") + ): + mail.move("INBOX.crap.CS") + return + if (mail["From"].contains("shumakl@cs.purdue.edu") and mail["Subject"].matches("^cron:")): + mail.move("INBOX.crap.cron") + return + + # Fall 2012 ############################################################ + + if mail["Subject"].contains("Fall-2012-SCI-21000-001:"): + mail.move("INBOX.classes.2012-2.SCI210") + if mail["Subject"].contains("fall-2012-cs-18000"): + mail.move("INBOX.classes.2012-2.CS180") + return + if piazza_topic(mail, "CS 18000"): + mail.move("INBOX.classes.2012-2.CS180.Piazza") + return + if mail["Subject"].contains("Fall-2012-SOC-10000"): + mail.move("INBOX.classes.2012-2.SOC100") + return + + # Spring 2013 ########################################################## + + if mail["Subject"].contains("[CS240] Submission result for"): + mail.move("INBOX.classes.2013-1.CS240.autograder") + return + if mail["Subject"].contains("[CS240]") or mail["Subject"].contains("Spring-2013-CS-24000"): + mail.move("INBOX.classes.2013-1.CS240") + return + if piazza_topic(mail, "CS 240"): + mail.move("INBOX.classes.2013-1.CS240.Piazza") + return + if mail["Subject"].matches(".*(PHYS|CHIP)\s*220.*") or is_to_or_from(mail,"srdas@purdue.edu"): + mail.move("INBOX.classes.2013-1.PHYS220") + return + if mail["Subject"].contains("Spring-2013-SOC-22000"): + mail.move("INBOX.classes.2013-1.SOC220") + return + + # Fall 2013 ############################################################ + + if mail["Subject"].contains("Fall-2013-CS-25000"): + mail.move("INBOX.classes.2013-2.CS250") + return + if piazza_topic(mail, "CS 250") or piazza_topic(mail, "CS 250-FALL2013"): + mail.move("INBOX.classes.2013-2.CS250.Piazza") + return + if mail["Subject"].contains("Fall-2013-CS-25100"): + mail.move("INBOX.classes.2013-2.CS251") + return + if piazza_topic(mail, "CS 251"): + mail.move("INBOX.classes.2013-2.CS251.Piazza") + return + if mail["Subject"].contains("Fall-2013-SPAN-10100"): + mail.move("INBOX.classes.2013-2.SPAN101") + return + if mail["Subject"].contains("Fall-2013-MA-26100"): + mail.move("INBOX.classes.2013-2.MA261") + return + if mail["Subject"].contains("Fall-2013-MA-26500"): + mail.move("INBOX.classes.2013-2.MA265") + return + + # Spring 2014 ########################################################## + + # COM217 + if mail["Subject"].contains("Spring-2014-COM-21700-004"): + mail.move("INBOX.classes.2014-1.COM217") + return + if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"): + mail.move("INBOX.classes.2014-1.COM217.Mixable") + return + # CS252 + if piazza_topic(mail, "CS 25200"): + mail.move("INBOX.classes.2014-1.CS252.Piazza") + return + # CS307 + if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"): + mail.move("INBOX.classes.2014-1.CS307") + return + # SPAN102 + if mail["Subject"].contains("spring-2014-span-102"): + mail.move("INBOX.classes.2014-1.SPAN102") + return + # STAT350 + if is_to_or_from(mail, "ssellke@purdue.edu"): + mail.move("INBOX.classes.2014-1.STAT350") + return + if piazza_topic(mail, "STAT 35000 (SELLKE)"): + mail.move("INBOX.classes.2014-1.STAT350.Piazza") + return + +handle_mapping = { + "INBOX": my_filters, + } +processor.maildirs = handle_mapping.keys() +for mail in processor: + handle_mapping[mail.maildir](mail) diff --git a/.config/meld/meldrc.ini b/.config/meld/meldrc.ini deleted file mode 120000 index dc1dc0c..0000000 --- a/.config/meld/meldrc.ini +++ /dev/null @@ -1 +0,0 @@ -/dev/null
\ No newline at end of file diff --git a/.nanorc.in b/.config/nanorc index b21e86b..b21e86b 100644 --- a/.nanorc.in +++ b/.config/nanorc diff --git a/.config/okular/.gitignore b/.config/okular/.gitignore new file mode 100644 index 0000000..4e33b14 --- /dev/null +++ b/.config/okular/.gitignore @@ -0,0 +1 @@ +docdata diff --git a/.config/selected_editor b/.config/selected_editor new file mode 100644 index 0000000..7631487 --- /dev/null +++ b/.config/selected_editor @@ -0,0 +1,4 @@ +# Generated by /usr/bin/select-editor +SELECTED_EDITOR="emacsclient -a '' -c" +ALTERNATE_EDITOR='nano' +VISUAL="$SELECTED_EDITOR" diff --git a/.config/ssh/.gitignore b/.config/ssh/.gitignore new file mode 100644 index 0000000..00977c6 --- /dev/null +++ b/.config/ssh/.gitignore @@ -0,0 +1 @@ +id_* diff --git a/.config/ssh/config b/.config/ssh/config index bb876ba..b6e53d6 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -1,3 +1,24 @@ Host * Protocol 2 + ControlMaster auto + ControlPath ~/.sessions/ssh-%r@%h:%p Compression yes + +Host lore + HostName lore.cs.purdue.edu + User shumakl + +Host data + HostName data.cs.purdue.edu + User shumakl + +Host repo + Port 1863 + HostName repo.parabolagnulinux.org + +Host rshg054 + Port 1863 + HostName parabolagnulinux.org + +Host lukeshu.com + Port 1863 diff --git a/.config/symlinks b/.config/symlinks new file mode 100644 index 0000000..030954c --- /dev/null +++ b/.config/symlinks @@ -0,0 +1,54 @@ +# target link + +# Generic +.config/login.sh .profile + +# X11 +.config/X11/defaults .Xdefaults +.config/X11/clientrc .xinitrc +.config/X11/serverrc .xserverrc +.config/X11/login .xsession + +# Bash +.config/bash/rc.sh .bashrc +.config/bash/login.sh .bash_login +.config/bash/logout.sh .bash_logout + +# Files plucked out of multi-purpose directories +.config/gpg/gpg.conf .gnupg/gpg.conf + +# Individual config files +.config/abs.conf .abs.conf +.config/conkerorrc .conkerorrc +.config/hgk .hgk +.config/hgrc .hgrc +.config/irbrc .irbrc +.config/linphonerc .linphonerc # +.config/selected_editor .selected_editor + +.config/offlineimaprc .offlineimaprc +.cache/offlineimap .offlineimap + +# Directories +.cache/maildirproc/ .maildirproc + +.config/arduino/ .arduino +.config/bazaar/ .bazaar +.config/cpan/ .cpan +.config/emacs/ .emacs.d +.config/icons/ .icons +.config/mozilla/ .mozilla # +.config/mplayer/ .mplayer # +.config/purple/ .purple +.config/ssh/ .ssh +.config/subversion/ .subversion +.config/wmii-hg/ .wmii-hg +.config/wmii/ .wmii # + +# KDE +.config/ .kde/share/apps # +.config/ .kde/share/config # +.kde/ .kde4 # + +# Alias for conkeror +.mozilla/ .conkeror.mozdev.org diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 92adb8b..3ddc8d5 100755..100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -1,30 +1,16 @@ #!/bin/bash -# Let any running instances of wmiirc know that we're starting -wmiir xwrite /event Start -. "$HOME/.wmii/include.sh" - -echo ' ==> Starting wmiirc' -mount9p=/opt/plan9/bin/9pfuse -mkdir -p $WMII_NAMESPACE/mnt -$mount9p $WMII_NAMESPACE/{wmii,mnt} - -MODKEY=Mod4 # super +MODKEY=Mod4 # "super" UP=p DOWN=n LEFT=b RIGHT=f -# Colors tuples: "<text> <background> <border>" -. `conffile theme-solarized-dark` - -# Menu history -hist="`conffile history`" +HIST="$XDG_CACHE_HOME/wmii/history" +mkdir -p "${HIST%/*}" -# Tagging Rules -echo '/Emacs|Navigator/ -> +sel' >> $WMII_DIR/tagrules -echo '/Eclipse/ -> +sel' >> $WMII_DIR/tagrules -echo '/panel/ -> /.*/' >> $WMII_DIR/tagrules +# Colors tuples: "<text> <background> <border>" +. theme-tango-dark Event() { event=$1; shift; @@ -40,15 +26,52 @@ Event() { ## 2 = middle ## 3 = right - ## WMII-meta events - Quit) ## No args + ## Custom (non-WMII-generated) events + WmiircStart) ## No args + echo ' ==> Starting wmiirc' + is_mounted $WMII_DIR && Event WmiircUnmount + Event WmiircMount + + # Configure wmii + < "`conffile rules`" expand_variables >> $WMII_DIR/rules + < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl + scansection Key | cut -sf2 >> $WMII_DIR/keys + # Configure X11 + hsetroot -solid "$WMII_BACKGROUND" + + # Clear the LBar and RBar + find $WMII_DIR/{l,r}bar -type f -delete + # Populate the LBar by emulating [Create|Focus]Tag events + seltag=`sed 1q $WMII_DIR/tag/sel/ctl` + lstags | while read tag; do + Event CreateTag "$tag" + if [ "$tag" = "$seltag" ]; then + Event FocusTag "$tag" + fi + done + + # Run the autostart action + Action autostart 2>/dev/null & + ;; + WmiircQuit) ## No args echo ' ==> Stopping wmiirc' - echo " -> unmounting WMII_DIR=$WMII_DIR..." - # might complain about /etc/mtab if the x server has already stopped - fusermount -u "$WMII_DIR" 2>>/dev/null - echo " -> rmdir'ing WMII_DIR=$WMII_DIR..." - rmdir "$WMII_DIR" exit;; + WmiircMount) ## No args + echo " -> Creating mountpoint WMII_DIR=$WMII_DIR..." + mkdir -p "$WMII_DIR" + echo " -> Mounting WMII_DIR=$WMII_DIR..." + 9mount -i "unix!$WMII_NAMESPACE/wmii" "$WMII_DIR";; + WmiircUnmount) ## No args + echo " -> Unmounting WMII_DIR=$WMII_DIR..." + 9umount "$WMII_DIR" + echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..." + rmdir "$WMII_DIR";; + ## WMII-meta events + Quit) ## No args + echo ' ==> wmii quit: unmounting' + trap - EXIT + Event WmiircUnmount + Event WmiircQuit;; Warning) ## $@=string notify-send "wmii warning: $*";; Key) ## $1=keystroke @@ -85,9 +108,9 @@ Event() { { case `wmii9menu Delete Fullscreen` in Delete) - echo kill |a $WMII_DIR/client/$client/ctl;; + echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) - echo Fullscreen on |a $WMII_DIR/client/$1/ctl;; + echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; esac }& ;; esac;; @@ -102,7 +125,7 @@ Event() { resp=$(wihack -transient $client \ xmessage -nearmouse -buttons Kill,Wait -print "$msg") if [ "$resp" = Kill ]; then - echo slay |a $WMII_DIR/client/$client/ctl + echo slay >> $WMII_DIR/client/$client/ctl fi }& ;; Fullscreen) ## $1=client $2=[on|off] @@ -111,24 +134,24 @@ Event() { ## Tag events CreateTag) ## $1=tag - echo "$WMII_NORMCOLORS" $@ |a $WMII_DIR/lbar/$1;; + echo label "$*" >> $WMII_DIR/lbar/$1;; DestroyTag) ## $1=tag rm $WMII_DIR/lbar/$1;; FocusTag) ## $1=tag - echo "$WMII_FOCUSCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; UnfocusTag) ## $1=tag - echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; UrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_URGENTCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;; NotUrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_NORMCOLORS" $1 |a $WMII_DIR/lbar/$1;; + echo "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; ## LeftBar events (usually tag buttons) LeftBarMouseDown) ## $1=button $2=bar_item ;; LeftBarClick) ## $1=button $2=bar_item shift # ignore the button - echo view "$@" |a $WMII_DIR/ctl;; + echo view "$@" >> $WMII_DIR/ctl;; LeftMouseDND) ## $1=button $2=bar_item Event LeftBarClick "$@";; @@ -139,10 +162,6 @@ Event() { ;; RightMouseDND) ## $1=button $2=bar_item Event RightBarClick "$@";; - - ## Custom (non-WMII-generated) events - Start) ## No args - Event Quit;; # get out of the way for a new event loop esac } ## End Event @@ -153,119 +172,79 @@ Key() { ## Moving around $MODKEY-$LEFT) ## Select the client to the left - echo select left |a $WMII_DIR/tag/sel/ctl;; + echo select left >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$RIGHT) ## Select the client to the right - echo select right |a $WMII_DIR/tag/sel/ctl;; + echo select right >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$UP) ## Select the client above - echo select up |a $WMII_DIR/tag/sel/ctl;; + echo select up >> $WMII_DIR/tag/sel/ctl;; $MODKEY-$DOWN) ## Select the client below - echo select down |a $WMII_DIR/tag/sel/ctl;; + echo select down >> $WMII_DIR/tag/sel/ctl;; $MODKEY-space) ## Toggle between floating and managed layers - echo select toggle |a $WMII_DIR/tag/sel/ctl;; + echo select toggle >> $WMII_DIR/tag/sel/ctl;; ## Moving clients around $MODKEY-Shift-$LEFT) ## Move selected client to the left - wmiir xwrite /tag/sel/ctl send sel left;; + echo send sel left >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$RIGHT) ## Move selected client to the right - wmiir xwrite /tag/sel/ctl send sel right;; + echo send sel right >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$UP) ## Move selected client up - wmiir xwrite /tag/sel/ctl send sel up;; + echo send sel up >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-$DOWN) ## Move selected client down - wmiir xwrite /tag/sel/ctl send sel down;; - + echo send sel down >> $WMII_DIR/tag/sel/ctl;; $MODKEY-Shift-space) ## Toggle selected client between floating and managed layers - wmiir xwrite /tag/sel/ctl send sel toggle;; + echo send sel toggle >> $WMII_DIR/tag/sel/ctl;; ## Moving through stacks $MODKEY-Control-$UP) ## Select the stack above - wmiir xwrite /tag/sel/ctl select up stack;; - $MODKEY-Control-$DOWN) # Select the stack below - wmiir xwrite /tag/sel/ctl select down stack;; + echo select up stack >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Control-$DOWN) ## Select the stack below + echo select down stack >> $WMII_DIR/tag/sel/ctl;; ## Client actions $MODKEY-shift-1) ## Toggle selected client's fullsceen state - wmiir xwrite /client/sel/ctl Fullscreen toggle;; + echo Fullscreen toggle >> $WMII_DIR/client/sel/ctl;; $MODKEY-shift-0) ## Close client - wmiir xwrite /client/sel/ctl kill;; + echo kill >> $WMII_DIR/client/sel/ctl;; ## Changing column modes $MODKEY-d) ## Set column to default mode - wmiir xwrite /tag/sel/ctl colmode sel default-max;; + echo colmode sel default-max >> $WMII_DIR/tag/sel/ctl;; $MODKEY-s) ## Set column to stack mode - wmiir xwrite /tag/sel/ctl colmode sel stack-max;; + echo colmode sel stack-max >> $WMII_DIR/tag/sel/ctl;; $MODKEY-m) ## Set column to max mode - wmiir xwrite /tag/sel/ctl colmode sel stack+max;; + echo colmode sel stack+max >> $WMII_DIR/tag/sel/ctl;; ## Running programs $MODKEY-a) ## Open wmii actions menu - Action $(path_ls $WMII_CONFPATH | wimenu -h "${hist}.actions" -n 5000) & ;; + Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;; $MODKEY-x) ## Open program menu - setsid $(wimenu -h "${hist}.progs" -n 5000 <$progsfile) & ;; + PATH=$_PATH setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;; $MODKEY-Return) ## Launch a terminal - setsid x-terminal-emulator & ;; - - ## Other - $MODKEY-Control-t) ## Toggle all other key bindings - case $(wmiir read /keys | wc -l | tr -d ' \t\n') in - 0|1) - echo -n "$Keys" | wmiir write /keys - wmiir xwrite /ctl grabmod $MODKEY;; - *) - wmiir xwrite /keys $MODKEY-Control-t - wmiir xwrite /ctl grabmod Mod3;; - esac;; + PATH=$_PATH setsid x-terminal-emulator & ;; ## Tag actions $MODKEY-t) ## Change to another tag { - tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return - wmiir xwrite /ctl view $tag + tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return + echo view $tag >> $WMII_DIR/ctl }& ;; $MODKEY-Shift-t) ## Retag the selected client sel=$(sed 1q $WMII_DIR/client/sel/ctl) { - tag=$(lstags | wimenu -h "${hist}.tags" -n 50) || return - wmiir xwrite /client/$sel/tags "$tag" + tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return + echo "$tag" >> $WMII_DIR/client/$sel/tags }& ;; esac } ## End Key -# WM Configuration -echo font xft:Monospace-8 |a $WMII_DIR/ctl -echo focuscolors $WMII_FOCUSCOLORS |a $WMII_DIR/ctl -echo normcolors $WMII_NORMCOLORS |a $WMII_DIR/ctl -echo grabmod $MODKEY |a $WMII_DIR/ctl -echo border 1 |a $WMII_DIR/ctl -xsetroot -solid "$WMII_BACKGROUND" & - -progsfile=$WMII_NAMESPACE/.proglist -path_ls $PATH > $progsfile & - -eval arg `scansection Key|cut -sf2` |a $WMII_DIR/keys - -# Clear the LBar -find $WMII_DIR/lbar -type f -delete - -# Emulate [Create|Focus]Tag events -seltag=`sed 1q $WMII_DIR/tag/sel/ctl` -lstags | while read tag; do - Event CreateTag "$tag" - if [ "$tag" = "$seltag" ]; then - Event FocusTag "$tag" +Action() { + prog=`path_which "$WMII_CONFPATH" $1`; shift + if [ -n "$prog" ]; then + "$prog" "$@" + return $? + else + return 1 fi -done - -Action autostart 2>/dev/null & - -if [ -f "`conffile wmiirc_local`" ]; then - . "`conffile wmiirc_local`" -fi - -trap "Event Quit" EXIT - -# use wmiir so it doesn't look like an open file -wmiir read /event 2>/dev/null | while read event; do - Event $event -done +} ## End Action diff --git a/.config/wmii-hg/ctl-init b/.config/wmii-hg/ctl-init new file mode 100644 index 0000000..026c0d5 --- /dev/null +++ b/.config/wmii-hg/ctl-init @@ -0,0 +1,5 @@ +font xft:Monospace-8 +focuscolors $WMII_FOCUSCOLORS +normcolors $WMII_NORMCOLORS +grabmod $MODKEY +border 1 diff --git a/.config/wmii-hg/fixes.sh b/.config/wmii-hg/fixes.sh new file mode 100644 index 0000000..5858859 --- /dev/null +++ b/.config/wmii-hg/fixes.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Fix various deficiencies in either the shell or the filesystem + +## +# Usage: ls DIRECTORY +# Linux's 9p kernel module sometimes omits entries in directory listings +## +unalias ls &>/dev/null +ls() { + local real_ls=("$(which ls)" -1F) + [ $# = 0 ] && set -- "$PWD" + f="${1/#${WMII_DIR}/}" + if [ "$f" = "$1" ]; then + "${real_ls[@]}" "$f" + else + wmiir ls "$f" + fi +} + +## +# Usage: setsid cmd [arguments...] +# I like wmiir's setsid better than linux-utils' +## +setsid() { wmiir setsid "$@"; } diff --git a/.config/wmii-hg/help-events b/.config/wmii-hg/help-events new file mode 100755 index 0000000..08abd18 --- /dev/null +++ b/.config/wmii-hg/help-events @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Event | xmessage -file - diff --git a/.config/wmii-hg/help-keys b/.config/wmii-hg/help-keys new file mode 100755 index 0000000..6f4bd1c --- /dev/null +++ b/.config/wmii-hg/help-keys @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Key | xmessage -file - diff --git a/.config/wmii-hg/rules b/.config/wmii-hg/rules new file mode 100644 index 0000000..cf735c9 --- /dev/null +++ b/.config/wmii-hg/rules @@ -0,0 +1,8 @@ +/wimenu/ floating=always +/panel/ tags=/.*/ floating=always +/xfce4-notifyd/ tags=/.*/ floating=always + +/nm-applet/ floating=off + +/Emacs|Navigator/ force-tags=+sel floating=never +/.*/ floating=off diff --git a/.config/wmii-hg/theme-solarized-dark b/.config/wmii-hg/theme-solarized-dark index 83285ba..fde361b 100644 --- a/.config/wmii-hg/theme-solarized-dark +++ b/.config/wmii-hg/theme-solarized-dark @@ -1,7 +1,7 @@ #!/bin/sh # Solarized-dark -. $HOME/.wmii/theme-solarized +. theme-solarized WMII_BACKGROUND="$SOL_BASE02" diff --git a/.config/wmii-hg/theme-tango b/.config/wmii-hg/theme-tango new file mode 100644 index 0000000..e0e35d4 --- /dev/null +++ b/.config/wmii-hg/theme-tango @@ -0,0 +1,10 @@ +TANGO_butter=("#fce94f" "#edd400" "#c4a000") +TANGO_orange=("#fcaf3e" "#f57900" "#ce5c00") +TANGO_choc=( "#e9b96e" "#c17d11" "#8f5902") +TANGO_cham=( "#8ae234" "#73d216" "#4e9a06") +TANGO_blue=( "#729fcf" "#3465a4" "#204a87") +TANGO_plum=( "#ad7fa8" "#75507b" "#5c3566") +TANGO_red=( "#ef2929" "#cc0000" "#a40000") +TANGO_alum=( "#eeeeec" "#d3d7cf" "#babdb6" + "#888a85" "#555753" "#2e3436") + diff --git a/.config/wmii-hg/theme-tango-dark b/.config/wmii-hg/theme-tango-dark new file mode 100644 index 0000000..04a9fa6 --- /dev/null +++ b/.config/wmii-hg/theme-tango-dark @@ -0,0 +1,11 @@ +#!/bin/bash +# Tango-tark + +. theme-tango + +WMII_BACKGROUND="${TANGO_alum[5]}" + +# ="<text> <background> <border>" +WMII_NORMCOLORS="${TANGO_alum[0]} ${TANGO_alum[4]} ${TANGO_alum[3]}" +WMII_FOCUSCOLORS="${TANGO_alum[5]} ${TANGO_alum[1]} ${TANGO_alum[0]}" +WMII_URGENTCOLORS="${TANGO_orange[0]} ${TANGO_alum[4]} ${TANGO_orange[4]}" diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh new file mode 100644 index 0000000..71dbc41 --- /dev/null +++ b/.config/wmii-hg/util.sh @@ -0,0 +1,129 @@ +#!/bin/bash + +# I moved "fixes" into a separate file because it isn't so much configuration... +. fixes.sh + +################################################################################ +# Added shell features # +################################################################################ + +## +# Usage: dquote STRING +# Safely double-quotes a string. +# It escapes ways to execute code, but not variables. +## +dquote() { + local str=$1 + str="${str//\\/\\\\}" # backslash + str="${str//\"/\\\"}" # dquote + str="${str//\$(/\\\$(}" # $(...) + str="${str//\`/\\\`}" # backtick + printf '"%s"\n' "$str" +} + +## +# Usage: expand_variables +# Expands variables read from /dev/stdin +## +expand_variables() { + while read; do + eval printf "'%s\n'" "$(dquote "$REPLY")" + done +} + +is_mounted() { + local dir="$(readlink -m $1)" + local mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -Fx -- "$dir")" + [[ $dir = "$mntpnt" ]] + return $? +} + +################################################################################ +# PATH manipulation # +################################################################################ + +## +# Usage: path_ls PATH +# List executables in PATH (PATH is delimited by `:') +## +path_ls() { + local dirs + IFS=: dirs=($@) + find -L "${dirs[@]}" -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null | sort -u +} + +## +# Usage: path_which PATH PROGRAM +# Find the full path of PROGRAM by searching PATH +## +path_which() { + local mypath=$1 + local prog=$2 + local which=$(which which) + PATH="$mypath" "$which" -- "$prog" 2>/dev/null +} + +################################################################################ +# wmii convenience functions # +################################################################################ + +## +# Usage: lstags +# Lists wmii tags +## +lstags() { + ls "$WMII_DIR/tag" | sed -e 's@/$@@' -e '/^sel$/d' +} + +################################################################################ +# X11 functions # +################################################################################ + +## +# Usage: connected_to_x_server +# Return status indicates whether there is an X server at $DISPLAY +## +connected_to_x_server() { + xdpyinfo &>/dev/null + return $? +} + +################################################################################ +# My wmii configuration # +################################################################################ + +## +# Usage: scansection [SECTION] +# Reads the doc comments from a section of wmiirc. +# If SECTION is not given, it reads all doc comments. +## +scansection() { + local file=$(conffile config.sh) + local sec=$1 + local tmp=$(mktemp --tmpdir wmii-scansecion.XXXXXXXXXX) + # Isolate the sections we want. + if [ -n "$sec" ]; then + # Find the section + < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> "$tmp" + else + # Remove extra lines that mark the end of a section + < "$file" sed "/\s*}\s*##\s*End\s/d" > "$tmp" + fi + < "$tmp" sed -n '/##/p' | while read; do + var="$(echo "$REPLY" | sed -nr 's/^\s*(.*)\)\s*##.*/\1/p')" + comment="$(echo "$REPLY" | sed -r 's/.*## ?//')" + if [ -z "$var" ]; then + printf '%s\n' "$comment" + else + printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment" + fi + done + rm -- "$tmp" +} + +## +# Usage: conffile FILE +## +conffile() { + echo "$HOME/.wmii-hg/$1" +} diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc new file mode 100755 index 0000000..a6bc4b4 --- /dev/null +++ b/.config/wmii-hg/wmiirc @@ -0,0 +1,15 @@ +#!/bin/bash +export _PATH="$PATH" +export PATH="$WMII_CONFPATH:$PATH" + +. include.sh + +wmiir xwrite /event WmiircQuit # close any existing wmiirc's + +Event WmiircStart + +trap "Event Quit" EXIT + +wmiir read /event 2>/dev/null | while read event; do + Event $event +done diff --git a/.conkeror.mozdev.org b/.conkeror.mozdev.org deleted file mode 120000 index 49c36a2..0000000 --- a/.conkeror.mozdev.org +++ /dev/null @@ -1 +0,0 @@ -.mozilla/
\ No newline at end of file diff --git a/.git.info.exclude b/.git.info.exclude deleted file mode 100644 index 871ebf6..0000000 --- a/.git.info.exclude +++ /dev/null @@ -1,107 +0,0 @@ -# Defualt to ignoring all files -/* - -# Except dotfiles -!.* - -# Or Makefile -!Makefile - -# Ignore these for privacy -.ssh/* -!.ssh/config -.gnupg/* -!.gnupg/gpg.conf -.netrc - -# Ignore temp/log/history files -*.log -log* - -*.tmp -*.tmp.* -tmp.* -tmp-* -tmp - -*_history -*_hist -history.* -history - -*.lock -.~lock.*# -lock - -*.state -*.cookie -*.bak - -*authority -*cache* - -# Ignore files left by editors -*~ -.#* -\#*# - - -# Ignore these special-purpose cache/temp files -.camel_certs -.compiz/session/* -.config/chromium/Default/History\ Index* -.current.asound -.dbus/session-bus/* -.ddd/sessions -.dvdcss -.esd_auth -.evolution/.* -.gconfd/saved_state -.gnash-media -.gnash/SharedObjects/* -.kde/share/apps/RecentDocuments/* -.kde/socket-* -.kde4/share/apps/RecentDocuments/* -.kde4/share/apps/okular/docdata/* -.kde4/socket-* -.lesshst -.link*/*.his -.local/share/Trash/* -.local/share/gvfs-metadata/* -.local/share/icons/* -.local/share/recently-used.xbel -.pki -.pulse -.pulse-cookie -.recently-used -.recently-used.xbel* -.setroubleshoot -.shotwell/thumbs/* -.sudo_as_admin_successful -.thumbnails/* -.wireshark/recent* -.xsession-errors* - -# Ignore files that are autogenerated -.folders -.nanorc -.config/libretools/blacklist.txt - -# Ignore these files for no good reason -.bogofilter -.config/Trolltech.conf -.config/vlc -.gem -.offlineimap -.prefix -.prefix.* -.terminfo -.wine* - -# Ignore these files that if I tracked them, would be a separate repo -.config/chromium -.config/libreoffice -.config/transmission -.eclipse -.mozilla -.netbeans diff --git a/.git.info.exclude.in b/.git.info.exclude.in new file mode 100644 index 0000000..2d09032 --- /dev/null +++ b/.git.info.exclude.in @@ -0,0 +1,47 @@ +# Defualt to ignoring all files +/* +# except these: + +# The things I actually want to track +!/.config +!/.local* + +# The file that generates this one +!/.git.info.exclude.in + +# The relevent programs do not like symlinks for these: +!/.gtkrc-2.0 +!/.gtkrc-2.0.mine + +# Ignore temp/log/history files +*.log +log.* +log + +*.tmp +*.tmp.* +tmp.* +tmp-* +tmp + +*_history +*_hist +history.* +history + +*.lock +.~lock.*# +*.lock.* +lock + +*.state +*.cookie +*.bak + +*authority +*cache* + +# Ignore files left by editors +*~ +.#* +\#*# diff --git a/.gnuzilla b/.gnuzilla deleted file mode 120000 index 49c36a2..0000000 --- a/.gnuzilla +++ /dev/null @@ -1 +0,0 @@ -.mozilla/
\ No newline at end of file @@ -2,11 +2,11 @@ # Any customization should be done in ~/.gtkrc-2.0.mine instead. gtk-theme-name="oxygen-gtk" -gtk-icon-theme-name="default.kde4" +gtk-icon-theme-name="oxygen" gtk-font-name="Sans 10" gtk-cursor-theme-name="Vanilla-DMZ" gtk-cursor-theme-size=0 -gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR gtk-button-images=0 gtk-menu-images=1 diff --git a/.gtkrc-2.0.mine b/.gtkrc-2.0.mine index 8b13789..4e2ef9a 100644 --- a/.gtkrc-2.0.mine +++ b/.gtkrc-2.0.mine @@ -1 +1 @@ - +gtk-fallback-icon-theme="gnome" diff --git a/.local/bin/config-path b/.local/bin/config-path new file mode 100755 index 0000000..6b9019c --- /dev/null +++ b/.local/bin/config-path @@ -0,0 +1,51 @@ +#!/bin/bash + +# All the prefixes to consider +prefixes=( + "$HOME" + "$HOME/.local.`uname -m`" + "$HOME/.local" + "$HOME/.prefix.`uname -m`" + "$HOME/.prefix" + "$HOME"/.gem/ruby/* +) + +###################################################################### + +in_array() { + local needle=$1; shift + local haystack=("$@") + local straw + for straw in "${haystack[@]}"; do + [[ "$needle" == "$straw" ]] && return 0 + done + return 1 +} + +# Import existing values +IFS=: paths=($PATH) +IFS=: rubylibs=($RUBYLIB) + +# Scan through prefixes +for prefix in "${prefixes[@]}"; do + # PATH + dir="$prefix/bin" + if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then + paths=("$dir" "${paths[@]}") + fi + # RUBYLIB + dir="$prefix/lib" + if [[ -d "$dir" ]] && ! in_array "$dir" "${rubylibs[@]}"; then + rubylibs=("$dir" "${rubylibs[@]}") + fi +done + +# Finally, print our values +IFS=: PATH="${paths[*]}" +IFS=: RUBYLIB="${rubylibs[*]}" + +# The sed bit here is the only time we call an external program +{ + declare -p PATH + declare -p RUBYLIB +} | sed 's/^declare \(-\S* \)*//' diff --git a/.local/bin/config-symlinks b/.local/bin/config-symlinks new file mode 100755 index 0000000..0831ca3 --- /dev/null +++ b/.local/bin/config-symlinks @@ -0,0 +1,15 @@ +#!/bin/bash + +sed -e '/^\s*$/d' -e '/#/d' symlinks | while read _target _link; do + target="$(sed -rn 's|[^/]+/|../|g;s|/[^/]+$|/|p' <<<"$_link")${_target}" + link="$HOME/$_link" + if [[ -L "$link" ]]; then + rm -f "$link" + fi + if [[ -e "$link" ]]; then + echo "ERROR: file exists: $link" >> /dev/stderr + else + mkdir -p "${link%/*}" + ln -s "$target" "$link" + fi +done diff --git a/.local/bin/notifyd b/.local/bin/notifyd deleted file mode 100755 index ddd5971..0000000 --- a/.local/bin/notifyd +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -connected_to_x_server() { - xdpyinfo &>/dev/null - return $? -} - -start_backend() { - /usr/lib/xfce4/notifyd/xfce4-notifyd -} - -while connected_to_x_server; do - start_backend -done diff --git a/.local/bin/pick b/.local/bin/pick new file mode 100755 index 0000000..ed2d44d --- /dev/null +++ b/.local/bin/pick @@ -0,0 +1,38 @@ +#!/bin/bash + +cmd=${0##*/} + +if [[ $1 = -h ]]; then + echo "Usage: $cmd PROG1 PROG2 PROG3..." + echo " $cmd -s PROG1 PROG2 PROG3..." + echo "" + echo "If \`-s' ISN'T given, print the first program name given that is" + echo "found in PATH." + echo "" + echo "If \`-s' IS given, print the first program name given that is" + echo "currently running. If no match is found, fall back to default" + echo "behavior." + exit 0 +fi + +if [[ $1 = -s ]]; then + shift + # Scan to find a running instance + for prog in "$@"; do + if [[ -n "`pgrep $prog`" ]]; then + printf '%s\n' "$prog" + exit 0 + fi + done +fi + +# Scan to find one that is installed +for prog in "$@"; do + if [[ -x "`which $prog 2>/dev/null`" ]]; then + printf '%s\n' "$prog" + exit 0 + fi +done + +printf '%s\n' "$cmd: no suitable program found" +exit 1 diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index a9893c0..1b23a3d 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,9 +1,4 @@ #!/bin/sh -if [ -x "`which okular 2>/dev/null`" ]; then - okular "$@" -elif [ -x "`which evince 2>/dev/null`" ]; then - evince "$@" -elif [ -x "`which xpdf 2>/dev/null`" ]; then - xpdf "$@" -fi +`pick evince okular xpdf` "$@" +exit $? diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator index f7290b4..049b081 100755 --- a/.local/bin/x-terminal-emulator +++ b/.local/bin/x-terminal-emulator @@ -1,10 +1,4 @@ #!/bin/sh -if [ -x "`which emacsterm`" ]; then - emacsterm $@ -elif [ -x "`which urxvt`" ]; then - urxvt $@ -elif [ -x "`which gnome-terminal`" ]; then - gnome-terminal $@ -elif [ -x "`which xterm`"]; then - xterm $@ -fi + +`pick emacsterm urxvt gnome-terminal xterm` "$@" +exit $? diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser index 0ead72a..bbd8943 100755 --- a/.local/bin/x-www-browser +++ b/.local/bin/x-www-browser @@ -1,14 +1,4 @@ #!/bin/sh -list='firefox iceweasel icecat conkeror' - -looking=true -for prog in $list; do - if $looking && [ -n "`pgrep $prog`" ]; then - $prog $@ - looking=false - fi -done -if $looking; then - conkeror $@ -fi +`pick -s conkeror iceweasel icecat firefox` "$@" +exit $? diff --git a/.local/lib/path.sh b/.local/lib/path.sh new file mode 100644 index 0000000..a45f8fd --- /dev/null +++ b/.local/lib/path.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if type config-path &>/dev/null; then + config_path=config-path +else + # Bootstrap finding config-path + config_path="$HOME/.local/bin/config-path" +fi +eval "$("$config_path" | sed 's/^/export /')" diff --git a/.local/lib/xdg.sh b/.local/lib/xdg.sh new file mode 100644 index 0000000..2241d2e --- /dev/null +++ b/.local/lib/xdg.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# This should be readable by /bin/sh, but I'm going to assume bash. + +# Sets up XDG environmental variables, so programs using them don't have to +# worry about checking if they are set. +# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html + +[[ -n $XDG_DATA_HOME ]] || export XDG_DATA_HOME="$HOME/.local/share" +[[ -n $XDG_CONFIG_HOME ]] || export XDG_CONFIG_HOME="$HOME/.config" +[[ -n $XDG_DATA_DIRS ]] || export XDG_DATA_DIRS="/usr/local/share/:/usr/share/" +[[ -n $XDG_CONFIG_DIRS ]] || export XDG_CONFIG_DIRS="/etc/xdg" +[[ -n $XDG_CACHE_HOME ]] || export XDG_CACHE_HOME="$HOME/.cache" + +# Check if XDG_RUNTIME_DIR is set, but has a bogus setting +if [[ -n $XDG_RUNTIME_DIR ]] && [[ ! -d $XDG_RUNTIME_DIR ]]; then + unset XDG_RUNTIME_DIR +fi + +# Set XDG_RUNTIME_DIR if we can +if [[ -z $XDG_RUNTIME_DIR ]] && [[ -n $TMPDIR ]]; then + export XDG_RUNTIME_DIR="$TMPDIR/xdg-runtime" + install -dm0700 "$XDG_RUNTIME_DIR" +fi diff --git a/.selected_editor b/.selected_editor deleted file mode 100644 index 81a95de..0000000 --- a/.selected_editor +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by /usr/bin/select-editor -SELECTED_EDITOR="emacsclient -a ''" -ALTERNATE_EDITOR="$SELECTED_EDITOR -c" -VISUAL="$SELECTED_EDITOR -c" diff --git a/Makefile b/Makefile deleted file mode 100644 index 3cecf33..0000000 --- a/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -SHELL = /bin/bash - -NANO_BIN_PREFIX = $(patsubst %/bin/nano,%,$(shell which nano)) -NANO_CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:$(NANO_BIN_PREFIX) -NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(NANO_CHECK))))) - -ALSACTL=$(firstword $(shell . $(HOME)/.profile &>/dev/null; which alsactl) echo) - -targets=.nanorc .folders .crontab.cookie .current.asound -all: $(targets) -clean: - rm -f $(targets) - -%.asound: FORCE - $(ALSACTL) store --file '$@' - -.nanorc: .nanorc.in $(NANO_SHARE) - cat '$<' > '$@' - for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@' - -.folders: Maildir - ( echo '..'; find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' - -.crontab.cookie: .crontab .crontab.local - -(cat $^; echo) | crontab - 2>/dev/null - date > '$@' - -# don't do anything, just create these if they doesn't exist -.crontab.local: - touch '$@' -Maildir: - mkdir -p '$@'/{cur,new,tmp} -Maildir/%: | Maildir - mkdir -p '$@'/{cur,new,tmp} - touch '$@'/maildirfolder - -.PHONY: FORCE PHONY -FORCE: ; -PHONY: ; |