summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/.gitignore20
-rw-r--r--.config/Makefile9
-rwxr-xr-x[-rw-r--r--].config/X11/clientrc17
-rw-r--r--.config/X11/defaults12
-rw-r--r--.config/bash/aliases.sh11
-rw-r--r--.config/bash/rc.d/emacs.sh8
-rw-r--r--.config/cron/make-config2
-rw-r--r--.config/emacs/custom.el28
-rw-r--r--.config/emacs/emacsutils.el13
-rw-r--r--.config/emacs/init.el403
-rw-r--r--.config/emacs/wl.el4
-rw-r--r--.config/gtk-3.0/settings.ini4
-rw-r--r--.config/icons/default/index.theme3
-rw-r--r--.config/login.d/00_coredumps.sh1
-rw-r--r--.config/login.d/00_path.sh9
-rw-r--r--.config/login.d/00_umask.sh1
-rw-r--r--.config/login.d/01_xdg.sh44
-rw-r--r--.config/login.d/02_tmpdir.sh3
-rw-r--r--.config/login.d/10_gpg.sh3
-rw-r--r--.config/login.d/10_java.sh6
-rw-r--r--.config/login.d/10_selected-editor.sh7
-rw-r--r--.config/login.d/10_spell-check.sh3
-rw-r--r--.config/login.d/10_xauthority.sh4
-rw-r--r--.config/login.d/90_dot-runtime.sh1
-rw-r--r--.config/login.sh84
-rw-r--r--.config/lxpanel/default/config3
-rw-r--r--.config/maildirproc/att.rc201
-rw-r--r--.config/maildirproc/purdue.rc95
-rw-r--r--.config/offlineimaprc4
-rw-r--r--.config/pacman/makepkg.conf8
-rw-r--r--.config/redshift.conf13
-rw-r--r--.config/selected_editor2
-rw-r--r--.config/ssh/config23
-rw-r--r--.config/systemd/user/default.target.wants/batterymon.service9
l---------[-rw-r--r--].config/systemd/user/default.target.wants/emacs-daemon.service10
-rw-r--r--.config/systemd/user/default.target.wants/gpg-agent.service9
-rw-r--r--.config/systemd/user/dunst@.service10
-rw-r--r--.config/systemd/user/emacs-daemon.service10
-rw-r--r--.config/systemd/user/lxpanel@.service10
-rw-r--r--.config/systemd/user/maildirproc@.service10
-rw-r--r--.config/systemd/user/rbar@.service7
-rw-r--r--.config/systemd/user/redshift@.service11
-rw-r--r--.config/systemd/user/vncserver@.service12
-rw-r--r--.config/systemd/user/wmii@.service12
l---------.config/systemd/user/wmii@.service.wants/lxpanel@.service1
l---------.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service1
l---------.config/systemd/user/wmii@.service.wants/rbar@99_clock.service1
l---------.config/systemd/user/wmii@.service.wants/xcompmgr@.service1
-rw-r--r--.config/systemd/user/x0vncserver@.service8
-rw-r--r--.config/systemd/user/xcompmgr@.service10
-rwxr-xr-x.config/wmii-hg/autostart13
-rw-r--r--.config/wmii-hg/config.sh87
-rw-r--r--.config/wmii-hg/fixes.sh24
-rwxr-xr-x.config/wmii-hg/rbar9
-rw-r--r--.config/wmii-hg/rbar.sh18
-rwxr-xr-x.config/wmii-hg/rbar_acpi18
-rwxr-xr-x.config/wmii-hg/rbar_battery9
-rwxr-xr-x.config/wmii-hg/rbar_clock19
-rwxr-xr-x.config/wmii-hg/rbar_cpu12
-rwxr-xr-x.config/wmii-hg/rbar_wifi50
-rw-r--r--.config/wmii-hg/rules2
-rw-r--r--.config/wmii-hg/theme-tango1
-rw-r--r--.config/wmii-hg/util.sh45
-rwxr-xr-x.config/wmii-hg/wmiirc10
64 files changed, 863 insertions, 635 deletions
diff --git a/.config/.gitignore b/.config/.gitignore
index b5b3b3c..829cfee 100644
--- a/.config/.gitignore
+++ b/.config/.gitignore
@@ -2,18 +2,20 @@
# Ignore things I don't care enough about to track
/Trolltech.conf
-/vlc
-/purple
+/ImageMagick/
+/menus/
+/purple/
+/vlc/
-# some 3d graphics toolkit
-/Kitware
# KDE color picker
-/colors
+/colors/
# binary, not helpful to track
/dconf/user
+/icedtea-web/security/*certs
# Ignore these files that if I tracked them, would be a separate repo
-/libreoffice
-/transmission
-/gimp-*
-/netbeans
+/deluge/
+/gimp-*/
+/libreoffice/
+/netbeans/
+/transmission/
diff --git a/.config/Makefile b/.config/Makefile
index dd4c37f..909486d 100644
--- a/.config/Makefile
+++ b/.config/Makefile
@@ -2,10 +2,10 @@
SHELL = /bin/bash
-GITDIR = ${HOME}/.git
+GIT_DIR = ${HOME}/.git
targets = \
- ${GITDIR}/info/exclude \
+ ${GIT_DIR}/info/exclude \
${HOME}/.folders \
${XDG_CACHE_HOME}/config-symlinks/cookie \
${XDG_CACHE_HOME}/cron/cookie
@@ -15,8 +15,8 @@ clean:
rm -f $(targets)
${HOME}/.folders: ${HOME}/Maildir $(MAKEFILE_LIST)
- find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf '.%s\n' >'$@'
-${GITDIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/)
+ find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf -- '.%s\n' >'$@'
+${GIT_DIR}/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
@@ -35,6 +35,7 @@ ${HOME}/Maildir/%: | ${HOME}/Maildir
mkdir -p '$@'/{cur,new,tmp}
touch '$@'/maildirfolder
+.DELETE_ON_ERROR:
.PHONY: FORCE PHONY
FORCE: ;
PHONY: ;
diff --git a/.config/X11/clientrc b/.config/X11/clientrc
index 26455d3..d18d714 100644..100755
--- a/.config/X11/clientrc
+++ b/.config/X11/clientrc
@@ -1,9 +1,7 @@
#!/bin/sh
-#
-# ~/.xinitrc
-#
-# Executed by startx (run your window manager from here)
+# Load system xinit modules (disabled)
+# Remove "false &&" to enable
if false && [ -d /etc/X11/xinit/xinitrc.d ]; then
echo ' ==> Running scripts in Entering xinitrc.d/*'
for f in /etc/X11/xinit/xinitrc.d/*; do
@@ -19,8 +17,9 @@ if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
-# exec gnome-session
-# exec startkde
-# exec startxfce4
-# ...or the Window Manager of your choice
-exec wmii
+#exec wmii
+wm=wmii
+systemctl --user start "${wm}@${DISPLAY}.service"
+mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}"
+cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" >/dev/null
+rm "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}"
diff --git a/.config/X11/defaults b/.config/X11/defaults
index 252170c..fca1914 100644
--- a/.config/X11/defaults
+++ b/.config/X11/defaults
@@ -1,11 +1,13 @@
-# -*- Mode: Conf-xdefaults -*-
+! -*- Mode: Conf-xdefaults -*-
-# "native" colors
-#URxvt.background: #000000
-#URxvt.foreground: #CCCCCC
-# Tango-dark
+! "native" colors
+!URxvt.background: #000000
+!URxvt.foreground: #CCCCCC
+! Tango-dark
URxvt.background: #2E3436
URxvt.foreground: #EEEEEC
+URxvt.color4: #729FCF
+URxvt.color12: #729FCF
URxvt.scrollstyle: plain
URxvt.scrollBar_floating: true
diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh
index c9a1987..fe4f2c6 100644
--- a/.config/bash/aliases.sh
+++ b/.config/bash/aliases.sh
@@ -43,16 +43,11 @@ alias gitk='gitk --all --date-order'
alias userctl='systemctl --user'
######################################################################
-# Remember lat/long for redshift #
-######################################################################
-redshift='redshift -l39.9030:85.9979'
-alias gtk-redshift="gtk-$redshift"
-alias redshift="$redshift"
-unset redshift
-
-######################################################################
# Some almost-function aliases #
######################################################################
alias lock="clear; away -C 'This terminal is locked'"
alias plock="term-title Terminal Locked;lock"
mvln() { mv $1 $2; ln -s $2 $1; }
+jarls() { jar tf "$1" | sed -n 's/\.class$//p' | LC_ALL=C sort | xargs -r -d $'\n' javap -classpath "$1"; }
+tarls() { local file; for file in "$@"; do bsdtar tf "$file" | sed "s|^|$file:|"; done; }
+jarmain() { jarls "$1" 2>/dev/null | grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ '; }
diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh
index 165d71e..bb6454b 100644
--- a/.config/bash/rc.d/emacs.sh
+++ b/.config/bash/rc.d/emacs.sh
@@ -5,12 +5,13 @@ if [[ $TERM == eterm* ]]; then
EDITOR=$SELECTED_EDITOR
VISUAL=$SELECTED_EDITOR
export SELECTED_EDITOR EDITOR VISUAL
+ export PAGER=cat
## Primatives for interacting with Emacs ###############################
# _emacs_run LISP
_emacs_run() {
- emacsclient -e "$*" 2>/dev/null
+ emacsclient -a false -e "$*" 2>/dev/null
}
# _emacs_quote UNQUOTED_STRING
_emacs_quote() {
@@ -85,6 +86,7 @@ if [[ $TERM == eterm* ]]; then
# Set the shell's X11 display (emacs -> shell)
_emacs_set_shell_DISPLAY() {
export DISPLAY=$(_emacs_unquote "$(_emacs_run "(cdr (assoc 'display (frame-parameters)))")")
+ [[ $DISPLAY != nil ]] || unset DISPLAY
}
## Do those things #####################################################
@@ -94,5 +96,7 @@ if [[ $TERM == eterm* ]]; then
_emacs_set_remote_dir
_emacs_set_shell_DISPLAY
}
- PROMPT_COMMAND=_emacs_PROMPT_COMMAND
+ if _emacs_run '()' >/dev/null; then
+ PROMPT_COMMAND=_emacs_PROMPT_COMMAND
+ fi
fi
diff --git a/.config/cron/make-config b/.config/cron/make-config
index 9ac5ac2..d079c92 100644
--- a/.config/cron/make-config
+++ b/.config/cron/make-config
@@ -1,2 +1,2 @@
#m h dom mon dow command
-*/5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME'
+*/5 * * * * cronic bash -l -c 'make -C "$XDG_CONFIG_HOME"'
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el
index e801e02..26eb2ae 100644
--- a/.config/emacs/custom.el
+++ b/.config/emacs/custom.el
@@ -3,38 +3,20 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold])
- '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451"))
- '(asm-comment-char 35)
'(custom-enabled-themes (quote (tango-dark)))
- '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
+ '(custom-safe-themes
+ (quote
+ ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
'(erc-nick "lukeshu")
'(explicit-shell-file-name "/bin/bash")
- '(fci-rule-color "#00346e")
- '(global-whitespace-mode nil)
- '(inhibit-startup-screen t)
- '(maildir-mail-dir "~/Maildir")
- '(mdmua-maildir "~/Maildir")
- '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)))
- '(page-break-lines-char 45)
- '(ruby-deep-arglist nil)
- '(ruby-deep-indent-paren nil)
- '(safe-local-variable-values (quote ((Nginx-indent-tabs-mode) (Nginx-indent-level . 4) (Nginx-indent-level . 8))))
'(scroll-bar-mode nil)
'(send-mail-function (quote smtpmail-send-it))
- '(sh-basic-offset 8)
- '(sh-indent-comment t)
'(smtpmail-smtp-server "plus.smtp.mail.yahoo.com")
'(smtpmail-smtp-service 587)
- '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))
- '(vc-annotate-background "#2b2b2b")
- '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3"))))
- '(vc-annotate-very-old-color "#dc8cc3")
- '(wl-init-file "~/.emacs.d/wl.el")
- '(wl-score-files-directory "~/.emacs.d/elmo"))
+ '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- )
+ '(term-color-blue ((t (:background "#729fcf" :foreground "#729fcf")))))
diff --git a/.config/emacs/emacsutils.el b/.config/emacs/emacsutils.el
deleted file mode 100644
index 966d16e..0000000
--- a/.config/emacs/emacsutils.el
+++ /dev/null
@@ -1,13 +0,0 @@
-(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)))))
-
-(defun emacs-terminal-emulator (program)
- (ansi-term program)) \ No newline at end of file
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 11765b0..fabe70e 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -1,13 +1,54 @@
-;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This config requires Emacs 24(+?)
+;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache")))
+(setq
+ package-user-dir (concat xdg-cache-home "emacs/elpa")
+ ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el")
+ el-get-dir (concat xdg-cache-home "emacs/el-get/")
+ eshell-directory-name (concat xdg-cache-home "emacs/eshell/")
+ wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/")
+ elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/")
+ elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/")
+ auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-")
+ tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el")
+ custom-file (concat user-emacs-directory "custom.el")
+ wl-init-file (concat user-emacs-directory "wl.el")
+ )
+
+;;;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;;
+(show-paren-mode 1)
+(column-number-mode 1)
+(line-number-mode 1)
+(ido-mode 1)
+(unless (daemonp) (server-mode 1))
+(when (require 'whitespace nil t)
+ (setq whitespace-style '(
+ tab-mark
+ space-mark
+ newline-mark
+ empty
+ ))
+ (global-set-key "\C-cw" 'global-whitespace-mode))
+(setq minibuffer-prompt-properties '(
+ read-only t
+ point-entered minibuffer-avoid-prompt
+ face minibuffer-prompt
+ ))
+(load custom-file 'noerror)
+
+;;;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This isn't particularly important, but set it before doing a whole
+;; lot (loading packages), so there isn't a weird change in text size.
(set-face-attribute 'default nil :height 80)
-(setq notify-method 'notify-via-libnotify)
-(add-to-list 'load-path "~/.emacs.d/")
-(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
-(setq custom-file "~/.emacs.d/custom.el")
-; derived from ELPA installation
-; http://tromey.com/elpa/install.html
+
+;;;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This downloads and installs el-get (package management) if isn't
+;; installed.
+
+;; Derived from ELPA installation
+;; http://tromey.com/elpa/install.html
(defun eval-url (url)
(let ((buffer (url-retrieve-synchronously url)))
(save-excursion
@@ -17,150 +58,174 @@
(eval-region (point) (point-max))
(kill-buffer (current-buffer)))))
-;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(unless (require 'package nil t)
- (eval-url "http://tromey.com/elpa/package-install.el"))
-
-(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
- ("marmalade" . "http://marmalade-repo.org/packages/")
- ("gnu" . "http://elpa.gnu.org/packages/")))
-
-;; el-get stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(setq el-get-install-branch "master") ;; live life on the edge
+(add-to-list 'load-path (concat el-get-dir "el-get"))
(unless (require 'el-get nil t)
- (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))
-
+ (let ((el-get-install-branch "master")) ;; live life on the edge
+ (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")))
+
+
+;;;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This is kinda funny how it works.
+;;
+;; package.el/ELPA (The standard package manager in Emacs 24) has
+;; terrible programatic management. It's great at installing packages,
+;; but only interactively. So, I
+;; 1) Disable package.el from getting loading all downloaded packages
+;; 2) Use el-get to load a specified list of packages from elpa.
+;;
+;; This is also nice because I can do event-base programming for what
+;; to do once a package is loaded, using :after.
+
+(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
+(setq package-enable-at-startup nil)
+
+;; What packages el-get should get from ELPA (if it gets them at all)
(setq el-get-sources '(
- (:name nxhtml
- :type http
- :url "http://ourcomments.org/Emacs/DL/elisp/nxhtml/zip/nxhtml-2.08-100425.zip"
- :build ("unzip nxhtml-2.08-100425.zip")
- :load "nxhtml/autostart.el")
- ))
-
-(setq my-el-get-packages
- '(el-get
-; nxhtml
- apel flim semi wanderlust
- smarttabs
- ))
-
-;; Now load all of that ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; ELPA
-(package-initialize)
-;; el-get
-(when (require 'el-get nil t) (el-get 'sync my-el-get-packages))
-;; custom
-(load custom-file 'noerror)
-
-;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(require 'go-mode-load)
-(require 'uniquify)
-
-(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-log-done 'time)
-(setq gamegrid-user-score-file-directory "/var/games/emacs/")
-;(xclip-mode 1)
-
-(load "whitespace")
-(setq whitespace-style '(
- tab-mark
- space-mark
- newline-mark
- empty
-))
-
-
-;; These are my preferred settings; we let dtrt-indent detect when we play with other's files
-(setq-default tab-width 8)
-(setq-default c-basic-offset 8)
-(setq-default indent-tabs-mode t)
-
-
+ ;; Minor modes
+ (: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
+ :after (progn
+ (define-global-minor-mode global-page-break-lines-mode
+ page-break-lines-mode page-break-lines-mode
+ :group 'page-break-lines)
+ (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))))
+ ;; Major modes
+ (:name coffee-mode :type elpa
+ :after (add-hook 'coffee-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'tab-width) 2)
+ (set (make-local-variable 'indent-tabs-mode) nil)
+ )))
+ (:name graphviz-dot-mode :type elpa)
+ (:name markdown-mode :type elpa
+ :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode)))
+ (:name nginx-mode :type elpa
+ :after (put 'nginx-indent-level 'safe-local-variable 'integerp))
+ (:name scss-mode :type elpa)
+ ))
+;; What packages el-get should install, both from above, and it's
+;; internal list of sources.
+(el-get 'sync '(el-get
+ ;; Minor modes
+ dtrt-indent
+ smart-tabs-mode
+ page-break-lines
+ ;; Major modes
+ apel flim semi wanderlust
+ graphviz-dot-mode
+ markdown-mode
+ nginx-mode
+ ;;nxhtml ; nxhtml is invasive, only enable if actively using
+ php-mode-improved
+ ))
+
+
+;; Misc. crap
+
+(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
+
+(defun align-regexp--use-spaces (orig-fun &rest args)
+ "Use spaces for alignment"
+ (let ((indent-tabs-mode nil))
+ (apply orig-fun args)))
+(advice-add 'align-regexp :around #'align-regexp--use-spaces)
+
+(defun sh-smie-sh-rules--fix (args)
+ "Replace :after \"then\" with :after \"if\" because Emacs 24
+sh-script.el is broken."
+ (if (equal args (list :after "then"))
+ (list :after "if")
+ args))
+(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix)
+
+(require 'go-mode-load nil t)
+
+
+
+;; Make the mouse work in an xterm
+(when (fboundp 'xterm-mouse-mode)
+ (xterm-mouse-mode 1)
+ (add-hook 'after-make-frame-functions
+ '(lambda (frame)
+ (if xterm-mouse-mode (xterm-mouse-mode 1))
+ )))
+
+;; Use mailcrypt to encrypt/decrypt email
+(when (require 'mailcrypt nil t)
+ (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)))
+ )
+
+;; Indent settings
+(setq-default
+ indent-tabs-mode t
+ tab-width 8
+ c-basic-offset 8
+ sh-basic-offset 8
+ sh-indent-comment t
+ )
+
+;; Backup settings
(setq
backup-by-copying t ;; don't clobber symlinks
- backup-directory-alist '(("." . "~/.emacs.d/saves")) ;; don't litter my fs tree
+ backup-directory-alist '(("." . "~/.cache/emacs/saves")) ;; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t ;; use versioned backups
-)
-
-(setq column-number-mode t
- inhibit-startup-screen t
- line-number-mode t
- server-use-tcp t
- server-mode t)
-
-(setq browse-url-generic-program (executable-find "v-www-browser")
- browse-url-browser-function 'browse-url-generic)
+ )
+;; Web browser settings
+(setq
+ browse-url-generic-program (executable-find "v-www-browser")
+ browse-url-browser-function 'browse-url-generic
+ )
-(defun toggle-fullscreen (&optional f)
- (interactive)
- (let ((current-value (frame-parameter nil 'fullscreen)))
- (set-frame-parameter nil 'fullscreen
- (if (equal 'fullboth current-value)
- (if (boundp 'old-fullscreen) old-fullscreen nil)
- (progn (setq old-fullscreen current-value)
- 'fullboth)))))
-
-;; Custom keybindings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Ediff settings
+(setq
+ ediff-window-setup-function 'ediff-setup-windows-plain
+ ediff-split-window-function 'split-window-horizontally
+ )
-(global-set-key [f11] 'toggle-fullscreen)
-(global-set-key "\C-cw" 'global-whitespace-mode)
+;; Automatically load smerge mode for merge files
+(defun try-smerge-mode ()
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "^<<<<<<< " nil t)
+ (smerge-mode 1))))
+(add-hook 'find-file-hook 'try-smerge-mode t)
-;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; All my weird mode-specific settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook 'text-mode-hook 'turn-on-auto-fill)
-; for term-mode
-;; (add-hook 'after-make-frame-functions
-;; (lambda (frame)
-;; (set-variable 'term-default-fg-color
-;; (face-foreground 'default))
-;; (set-variable 'term-default-bg-color
-;; (face-background 'default)))
-;; t)
-
(add-hook 'lisp-mode-hook
'(lambda ()
(set (make-local-variable 'indent-tabs-mode) nil)
@@ -171,21 +236,14 @@
(set (make-local-variable 'indent-tabs-mode) nil)
))
-(add-hook 'coffee-mode-hook
- '(lambda ()
- (set (make-local-variable 'tab-width) 2)
- ))
-
(add-hook 'term-mode-hook
'(lambda ()
- (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")
- (make-local-variable 'mouse-yank-at-point)
- ;(make-local-variable 'transient-mark-mode)
- (setq mouse-yank-at-point t)
- ;(setq transient-mark-mode nil)
(auto-fill-mode -1)
+ (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")
+ (set (make-local-variable 'mouse-yank-at-point) t)
(setq tab-width 8 )
- (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term
+ (setq truncate-lines nil)
+ (set (make-local-variable 'autopair-dont-activate) t) ;; Don't let autopair break ansi-term
))
(add-hook 'ruby-mode-hook
@@ -195,46 +253,21 @@
(set (make-local-variable 'tab-width) 4)
))
-(add-hook 'coffee-mode-hook
+(add-hook 'php-mode-hook
'(lambda ()
- (set (make-local-variable 'indent-tabs-mode) nil)
+ (c-set-offset 'cpp-macro 0)
+ ))
+
+(add-hook 'tex-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'tab-always-indent) nil)
+ (set (make-local-variable 'indent-tabs-mode) t)
+ ))
+
+(add-hook 'sh-mode-hook
+ '(lambda ()
+ (sh-electric-here-document-mode 0)
))
(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)))
-;(define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error)
-;(define-key php-mode-map '[M-S-down] 'flymake-goto-next-error)
-
-;(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/.config/emacs/wl.el b/.config/emacs/wl.el
index 815c97c..e9e61bd 100644
--- a/.config/emacs/wl.el
+++ b/.config/emacs/wl.el
@@ -21,8 +21,6 @@
wl-message-id-domain user-mail-address
;; Folders/File system ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- elmo-msgdb-directory "~/.emacs.d/elmo" ;; where elmo keeps all its stuff
- 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
@@ -32,7 +30,7 @@
wl-draft-folder ".Draft" ;; store drafts in 'postponed'
wl-trash-folder ".Trash" ;; put trash in 'trash'
wl-spam-folder ".FOLDERS.Spam.training" ;; put spam in 'Bulk Mail'
- wl-queue-folder ".FOLDERS.queue" ;; we don't use this
+ wl-queue-folder ".FOLDERS.Queue" ;; we don't use this
;; check this folder periodically, and update modeline
;wl-biff-check-folder-list '(".todo") ;; check every 180 seconds
diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini
index 9801ab0..78116f3 100644
--- a/.config/gtk-3.0/settings.ini
+++ b/.config/gtk-3.0/settings.ini
@@ -1,7 +1,7 @@
-[Settings]
+[Settings]
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name=oxygen
-gtk-fallback-icon-theme=gnome
+gtk-fallback-icon-theme=mate
gtk-font-name=Sans 10
gtk-cursor-theme-name=Vanilla-DMZ
gtk-cursor-theme-size=0
diff --git a/.config/icons/default/index.theme b/.config/icons/default/index.theme
index dd26337..6652f01 100644
--- a/.config/icons/default/index.theme
+++ b/.config/icons/default/index.theme
@@ -1,4 +1,5 @@
-# This file is written by LXAppearance. Do not edit.[Icon Theme]
+# This file is written by LXAppearance. Do not edit.
+[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=Vanilla-DMZ
diff --git a/.config/login.d/00_coredumps.sh b/.config/login.d/00_coredumps.sh
new file mode 100644
index 0000000..8fcc61b
--- /dev/null
+++ b/.config/login.d/00_coredumps.sh
@@ -0,0 +1 @@
+ulimit -c unlimited # save core dumps
diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh
new file mode 100644
index 0000000..a45f8fd
--- /dev/null
+++ b/.config/login.d/00_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/.config/login.d/00_umask.sh b/.config/login.d/00_umask.sh
new file mode 100644
index 0000000..8e71ad5
--- /dev/null
+++ b/.config/login.d/00_umask.sh
@@ -0,0 +1 @@
+umask 022
diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh
new file mode 100644
index 0000000..2e0b42c
--- /dev/null
+++ b/.config/login.d/01_xdg.sh
@@ -0,0 +1,44 @@
+#!/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 ]] && type flock &>/dev/null; then
+ _diy_xdg_runtime_login() {
+ export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME"
+ readonly XDG_RUNTIME_DIR
+ # There's a race condition here, between the `ln -s` and `flock`.
+ # But it's not like I'll be hammering a box with logins.
+ if [[ ! -d "$XDG_CACHE_HOME" ]]; then
+ local tmp="$(mktemp --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")"
+ mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir"
+ ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR"
+ fi
+ if ! [[ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]]; then
+ exec 7 >"$XDG_CACHE_HOME/xdg-runtime-dir/.lock"
+ fi
+ if flock -sn 7; then
+ trap _diy_xdg_runtime_logout EXIT
+ fi
+ }
+ _diy_xdg_runtime_logout() {
+ if flock -xn 7; then
+ rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")"
+ fi
+ }
+ _diy_xdg_runtime_login
+fi
diff --git a/.config/login.d/02_tmpdir.sh b/.config/login.d/02_tmpdir.sh
new file mode 100644
index 0000000..d0079aa
--- /dev/null
+++ b/.config/login.d/02_tmpdir.sh
@@ -0,0 +1,3 @@
+mkdir -p -- "$XDG_RUNTIME_DIR/tmpdir"
+export TMPDIR="$XDG_RUNTIME_DIR/tmpdir"
+ln -sfT -- "$TMPDIR" "$HOME/tmp"
diff --git a/.config/login.d/10_gpg.sh b/.config/login.d/10_gpg.sh
new file mode 100644
index 0000000..cf3c88c
--- /dev/null
+++ b/.config/login.d/10_gpg.sh
@@ -0,0 +1,3 @@
+if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then
+ export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf"`
+fi
diff --git a/.config/login.d/10_java.sh b/.config/login.d/10_java.sh
new file mode 100644
index 0000000..3c49368
--- /dev/null
+++ b/.config/login.d/10_java.sh
@@ -0,0 +1,6 @@
+_JAVA_OPTIONS=''
+_JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on'
+_JAVA_OPTIONS+=' -Dswing.aatext=true'
+_JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
+_JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR"
+export _JAVA_OPTIONS
diff --git a/.config/login.d/10_selected-editor.sh b/.config/login.d/10_selected-editor.sh
new file mode 100644
index 0000000..f176b8a
--- /dev/null
+++ b/.config/login.d/10_selected-editor.sh
@@ -0,0 +1,7 @@
+if [[ -f "$HOME/.selected_editor" ]]; then
+ . "$HOME/.selected_editor"
+ export SELECTED_EDITOR
+ export ALTERNATE_EDITOR
+ export EDITOR="${EDITOR:-$SELECTED_EDITOR}"
+ export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
+fi
diff --git a/.config/login.d/10_spell-check.sh b/.config/login.d/10_spell-check.sh
new file mode 100644
index 0000000..9a24b7e
--- /dev/null
+++ b/.config/login.d/10_spell-check.sh
@@ -0,0 +1,3 @@
+if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then
+ export DICTIONARY="${LANG%%.*}"
+fi
diff --git a/.config/login.d/10_xauthority.sh b/.config/login.d/10_xauthority.sh
new file mode 100644
index 0000000..a27202c
--- /dev/null
+++ b/.config/login.d/10_xauthority.sh
@@ -0,0 +1,4 @@
+# This was needed once with SSH and Fedora boxes.
+if [[ -z $XAUTHORITY ]]; then
+ export XAUTHORITY="$HOME/.Xauthority"
+fi
diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh
new file mode 100644
index 0000000..d597cc7
--- /dev/null
+++ b/.config/login.d/90_dot-runtime.sh
@@ -0,0 +1 @@
+ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime
diff --git a/.config/login.sh b/.config/login.sh
index 392dc88..b2cc80a 100644
--- a/.config/login.sh
+++ b/.config/login.sh
@@ -10,84 +10,8 @@
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
-umask 022
-ulimit -c unlimited # save core dumps
-## Paths #############################################################
-
-. "$HOME/.local/lib/path.sh"
-
-# TMPDIR #############################################################
-
-if [[ ! -d "$HOME/tmp" ]]; then
- tmp="$(mktemp --tmpdir -d "$USER-tmpdir.XXXXXXXXXXXXXXXXXXX")"
- ln -sf "$tmp" "$HOME/tmp"
- unset tmp
-fi
-export TMPDIR="$HOME/tmp"
-
-# XDG ################################################################
-
-. "$HOME/.local/lib/xdg.sh"
-ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime
-
-# Settings ###########################################################
-
-# Spell check
-if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then
- export DICTIONARY="${LANG%%.*}"
-fi
-
-# Text editor
-if [[ -f "$HOME/.selected_editor" ]]; then
- . "$HOME/.selected_editor"
- export SELECTED_EDITOR
- export ALTERNATE_EDITOR
- export EDITOR="${EDITOR:-$SELECTED_EDITOR}"
- export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
-fi
-
-# GPG
-if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then
- echo 'login: Setting GPGKEY'
- export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"`
-fi
-if [[ -f ~/.runtime/gpg ]]; then
- echo 'login: Setting gpg-agent info:'
- cat ~/.runtime/gpg
- . ~/.runtime/gpg
- export GPG_AGENT_INFO
- #export SSH_AUTH_SOCK
-fi
-
-# Java
-_JAVA_OPTIONS=''
-_JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on'
-_JAVA_OPTIONS+=' -Dswing.aatext=true'
-_JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
-if [[ -n $TMPDIR ]]; then
- _JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR"
-fi
-export _JAVA_OPTIONS
-
-# X11
-if [[ -z $XAUTHORITY ]]; then
- export XAUTHORITY="$HOME/.Xauthority"
- #export XAUTHORITY=$HOME/.runtime/Xauthority
-fi
-
-# D-Bus
-# if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then
-# # I want a separate instance for each login
-# #dbus-launch > "${HOME}/.cache/sessions/dbus"
-# #. "${HOME}/.cache/sessions/dbus"
-# eval `dbus-launch`
-
-# export DBUS_SESSION_BUS_ADDRESS
-# export DBUS_SESSION_BUS_PID
-# fi
-
-# Load any box-specific stuff
-if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then
- . "$XDG_CONFIG_HOME/login.local.sh"
-fi
+for file in "${XDG_CONFIG_HOME:-$HOME/.config}/login.d/"*.sh; do
+ . "$file"
+done
+unset file
diff --git a/.config/lxpanel/default/config b/.config/lxpanel/default/config
index e19a7d1..e0d2b50 100644
--- a/.config/lxpanel/default/config
+++ b/.config/lxpanel/default/config
@@ -1,4 +1 @@
[Command]
-FileManager=v-editor %s
-Terminal=urxvt -c %s
-Logout=bash -c 'echo quit >> $WMII_DIR/ctl'
diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc
index 0252c74..6b31260 100644
--- a/.config/maildirproc/att.rc
+++ b/.config/maildirproc/att.rc
@@ -1,7 +1,9 @@
# -*- mode: python; indent-tabs-mode: t -*-
import os
+import os.path
import subprocess
+import datetime
processor.maildir_base = "~/Maildir"
processor.auto_reload_rcfile = True
@@ -24,6 +26,16 @@ def is_to_or_from_re(mail,address):
return (
mail["From"].matches(address)
or mail.target.matches(address))
+def move_ham(mail,folder):
+ y = datetime.datetime.now().year
+ folder = "FOLDERS.Ham."+str(y)+folder
+ dir = processor.maildir_base+"/"+folder
+ if not os.path.isfile(dir+"/maildirfolder"):
+ os.makedirs(dir+"/tmp", 0o777, True)
+ os.makedirs(dir+"/new", 0o777, True)
+ os.makedirs(dir+"/cur", 0o777, True)
+ open(dir+"/maildirfolder", 'a').close()
+ mail.move(folder)
def bogofilter_auto(mail):
p = subprocess.Popen(
@@ -37,20 +49,17 @@ def bogofilter_auto(mail):
"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("FOLDERS.Spam")
-
def handle_incoming_ham_training(mail):
bogofilter_ham(mail)
handle_incoming_ham(mail)
+def handle_incoming_spam_training(mail):
+ bogofilter_spam(mail)
+ mail.move("FOLDERS.Spam")
def handle_incoming_ham(mail):
my_filters(mail)
@@ -60,18 +69,30 @@ def handle_incoming_spam(mail):
def handle_incoming_unknown(mail):
# Filter spam
+ # Whitelist
if (
False
- or mail["Subject"].contains("[systemd-devel]")
- or mail["Subject"].contains("[PATCH")
- or mail["Subject"].contains("[Dev]")
- or mail["Subject"].contains("[Maintenance]")
- or is_to_or_from(mail, "gnu.org")
or is_to_or_from(mail, "fsf.org")
+ or is_to_or_from(mail, "gnu.org")
+ 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"].contains("@facebookmail.com>")
+ or mail["From"].contains("@gandi.net")
+ or mail["From"].contains("@goodwillindy.org>")
+ or mail["From"].contains("@lpi.org>")
+ or mail["From"].contains("@msdlt.k12.in.us>")
or mail["From"].contains("@parabola.nu")
+ or mail["From"].contains("@post.oreilly.com>")
+ or mail["From"].contains("@scouting.org>")
+ or mail["From"].contains("@wolframalpha.com>")
or mail["From"].contains("parabolagnulinux.org")
- or mail["From"].contains("@facebookmail.com>")
- or mail["List-Id"].matches(".*\.(gnu|archlinux|parabolagnulinuxlibre)\.org")
+ or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre)\.org")
+ or mail["List-Id"].matches(".*\.parabola\.nu")
+ or mail["Subject"].contains("[Dev]")
+ or mail["Subject"].contains("[Maintenance]")
+ or mail["Subject"].contains("[PATCH")
+ or mail["Subject"].contains("[systemd-devel]")
):
handle_incoming_ham_training(mail)
return
@@ -84,10 +105,10 @@ def handle_incoming_unknown(mail):
handle_incoming_ham(mail)
return
elif spam == 2:
- mail.move("Inbox")
+ mail.move("FOLDERS.MysteryMeat")
return
else:
- mail.move("FOLDERS.Error")
+ mail.move("FOLDERS.BogoFail")
return
def my_filters(mail):
@@ -98,7 +119,7 @@ def my_filters(mail):
or mail["List-Id"].matches(list+"\.gnu\.org")
or mail["Subject"].contains('['+list+']')
):
- mail.move("FOLDERS.software."+list)
+ move_ham(mail,".software."+list)
return
# Sort mail from other software mailing lists
@@ -107,67 +128,54 @@ def my_filters(mail):
or mail["List-Id"].matches("social-discuss\.gnu\.org")
or mail["Subject"].contains("social-discuss")
):
- mail.move("FOLDERS.software.social")
+ move_ham(mail,".software.social")
return
if mail["List-Id"].matches("networkmanager-list\.gnome\.org"):
- mail.move("FOLDERS.software.networkmanager")
+ move_ham(mail,".software.networkmanager")
return
- if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"):
- if mail["From"].contains("monit@"):
- if mail["Message-Id"].contains("@repo.parabolagnulinux.org"):
- if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"):
- mail.move("FOLDERS.software.parabola-maintenance.monit-repo.sshd")
- return
- mail.move("FOLDERS.software.parabola-maintenance.monit-repo")
- return
- if mail["Message-Id"].contains("@rshg054.dnsready.net"):
- mail.move("FOLDERS.software.parabola-maintenance.monit-rshg054")
- return
- if mail["Subject"].matches("Cron <.*@repo>"):
- mail.move("FOLDERS.software.parabola-maintenance.cron-repo")
- return
- if mail["Subject"].matches("Cron <.*@rshg054>"):
- mail.move("FOLDERS.software.parabola-maintenance.cron-rshg054")
- return
- mail.move("FOLDERS.software.parabola-maintenance")
+ if mail["List-Id"].matches("maintenance\.lists\.parabola(gnulinux\.org|\.nu)"):
+ move_ham(mail,".software.parabola.maintenance")
return
- #if is_to_or_from(mail, "parabola.nu"):
- # mail.move("FOLDERS.software.parabola-labs")
- # return
+ if is_to_or_from(mail, "labs@parabola.nu"):
+ move_ham(mail,".software.parabola.labs")
+ return
if (
False
- or mail["List-Id"].matches("parabolagnulinux.org")
+ or mail["List-Id"].matches("parabolagnulinux\.org")
+ or mail["List-Id"].matches("parabola\.nu")
or is_to_or_from(mail, "parabolagnulinux.org")
or is_to_or_from(mail, "kiwwwi.com.ar")
+ or is_to_or_from(mail, "parabola.nu")
):
if mail["Subject"].contains("[Django]"):
- mail.move("FOLDERS.software.parabola-maintenance.django")
+ move_ham(mail,".software.parabola.maintenance.django")
+ return
+ else:
+ move_ham(mail,".software.parabola.dev")
return
- mail.move("FOLDERS.software.parabola-dev")
- return
if (mail["List-Id"].matches("pacman-dev.archlinux.org")):
- mail.move("FOLDERS.software.pacman-dev")
+ move_ham(mail,".software.pacman-dev")
return
if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org") or is_to_or_from(mail, "systemd-devel@lists.freedesktop.org")):
- mail.move("FOLDERS.software.systemd-devel")
+ move_ham(mail,".software.systemd-devel")
return
for subject_re in [
"\[Stow-[^\]]*\].*",
]:
if mail["Subject"].matches(subject_re):
- mail.move("FOLDERS.software")
+ move_ham(mail,".software")
return
# Sort mail from some social websites
if mail["From"].matches("facebook(|mail)\.com"):
- mail.move("FOLDERS.Social.Facebook")
+ move_ham(mail,".Social.Facebook")
return
if (
@@ -175,15 +183,24 @@ def my_filters(mail):
or mail["From"].matches("identi\.ca")
or mail["From"].matches("statusnet")
):
- mail.move("FOLDERS.Social.Identica")
+ move_ham(mail,".Social.Identica")
return
+ if (
+ False
+ or mail["From"].contains("@gandi.net")
+ or mail["From"].contains("@ramhost.us")
+ or mail["From"].contains("@startcom.org")
+ ):
+ move_ham(mail,".lukeshu-com")
+ return
+
if mail["From"].matches("twitter\.com"):
- mail.move("FOLDERS.Social.Twitter")
+ move_ham(mail,".Social.Twitter")
return
if mail["From"].matches("@xkcd\.com"):
- mail.move("FOLDERS.Social.xkcd")
+ move_ham(mail,".Social.xkcd")
return
# Sort mail related to Troop 276
@@ -207,30 +224,24 @@ def my_filters(mail):
or is_to_or_from(mail,"mytroop.us")
or is_to_or_from(mail,"crossroadsbsa.org")
):
- mail.move("FOLDERS.BoyScouts")
+ move_ham(mail,".BoyScouts")
return
# Sort mail from misc people
- if mail["From"].matches("margieshu@sbcglobal\.net"):
- mail.move("FOLDERS.misc.Mom")
+ if (
+ False
+ or is_to_or_from(mail,"margieshu@sbcglobal.net")
+ or is_to_or_from(mail,"3174451635@mms.att.net")
+ ):
+ move_ham(mail,".misc.Mom")
return
for address in [
- "justicejade10@aol.com",
- "parsonsjade@aol.com",
- "parsonstjade@gmail.com",
- "jadparso@umail.iu.edu",
- ]:
- if is_to_or_from(mail,address):
- mail.move("FOLDERS.misc.Jade")
- return
-
- for address in [
"nintendo.com",
"nintendo-news.com",
]:
if mail["From"].contains(address):
- mail.move("FOLDERS.misc.Nintendo")
+ move_ham(mail,".misc.Nintendo")
return
for address in [
@@ -239,7 +250,7 @@ def my_filters(mail):
"CompTIA",
]:
if mail["From"].contains(address):
- mail.move("FOLDERS.misc.CompTIA")
+ move_ham(mail,".misc.CompTIA")
return
# Sort mail from FRC people
@@ -264,37 +275,38 @@ def my_filters(mail):
"william.walk@gmail.com",
]:
if is_to_or_from(mail,address):
- mail.move("FOLDERS.School.Robotics")
+ move_ham(mail,".School.Robotics")
return
for subject_re in [
"robotics",
- "1024",
+ "\b1024\b",
+ "\b4272\b",
"kil-?a-?bytes",
]:
if mail["Subject"].matches(subject_re):
- mail.move("FOLDERS.School.Robotics")
+ move_ham(mail,".School.Robotics")
return
# Sort mail from software people
for address in [
"@archlinux.org",
+ "@canonical.org",
+ "@cnuk.org",
+ "@eff.org",
+ "@foocorp.net",
"@fsf.org",
"@github.com",
- "canonical.org",
- "cnuk.org",
- "eff.org",
- "esr@thyrsus.com",
- "foocorp.net",
- "gitorious.org",
- "gnome.org",
- "gnu.org",
- "ietf.org",
- "kde.org",
- "sourceforge.com",
+ "@gitorious.org",
+ "@gnome.org",
+ "@gnu.org",
+ "@ietf.org",
+ "@kde.org",
+ "@sourceforge.com",
+ "@thyrsus.com",
"trustees@core3.amsl.com",
]:
if is_to_or_from(mail,address):
- mail.move("FOLDERS.software")
+ move_ham(mail,".software")
return
@@ -304,16 +316,16 @@ def my_filters(mail):
or is_to_or_from(mail, "@lnnorthstar.org")
or is_to_or_from(mail, "lnnorthstar.org@tigertech.net")
):
- mail.move("FOLDERS.School.Newspaper")
+ move_ham(mail,".School.Newspaper")
return
# Sort mail from various employers/people who pay me
if is_to_or_from(mail, "@precisepath.com"):
- mail.move("FOLDERS.Work.PrecisePath")
+ move_ham(mail,".Work.PrecisePath")
return
if is_to_or_from(mail,"susyphil@aol.com"):
- mail.move("FOLDERS.Work.PMCH")
+ move_ham(mail,".Work.PMCH")
for address in [
"d.farrar@comcast.net",
@@ -321,7 +333,7 @@ def my_filters(mail):
"@vmware.com",
]:
if is_to_or_from(mail,address):
- mail.move("FOLDERS.Work.FAST")
+ move_ham(mail,".Work.FAST")
return
# Sort misc newsletters
@@ -335,7 +347,7 @@ def my_filters(mail):
or mail["From"].contains("info@demandprogress.org")
or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net"))
):
- mail.move("FOLDERS.misc.Newsletters")
+ move_ham(mail,".misc.Newsletters")
return
if (
@@ -351,7 +363,7 @@ def my_filters(mail):
or mail["Subject"].contains("NHS")
or mail["Subject"].contains("National Honor Society")
):
- mail.move("FOLDERS.School")
+ move_ham(mail,".School")
return
# from college stuff
@@ -360,44 +372,41 @@ def my_filters(mail):
or mail["Subject"].contains("NYLF") # National Youth Leadership Conference
or mail["Subject"].contains("NSHSS")
):
- mail.move("FOLDERS.College.Societies")
+ move_ham(mail,".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("FOLDERS.College")
+ move_ham(mail,".College")
return
if mail["From"].contains("@projectwonderful.com"):
- mail.move("FOLDERS.misc.ProjectWonderful")
+ move_ham(mail,".misc.ProjectWonderful")
return
if (
False
or mail["From"].matches("@localhost")
or mail["From"].matches("@[^,>]*\.local")
- or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx")
+ or mail["From"].matches("@[^,>]*\.lan")
or mail["To"].matches("luke@")
):
- mail.move("FOLDERS.LocalSystems")
+ move_ham(mail,".LocalSystems")
return
if (
False
or mail["Subject"].contains("password")
or mail["Subject"].contains("account")
):
- mail.move("FOLDERS.misc.accounts")
+ move_ham(mail,".misc.accounts")
return
- mail.move("FOLDERS.Ham")
+ move_ham(mail,"")
handle_mapping = {
"Inbox": handle_incoming_unknown,
diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc
index 6d4b913..9f6bf37 100644
--- a/.config/maildirproc/purdue.rc
+++ b/.config/maildirproc/purdue.rc
@@ -70,21 +70,38 @@ def my_filters(mail):
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 (
+ False
+ or is_to_or_from(mail,"@hunterlp.com")
+ or is_to_or_from(mail, "@duke-energy.com")
+ or is_to_or_from(mail, "@alerts.comcast.net")
+ or is_to_or_from(mail, "rentpayment.com")
+ or is_to_or_from(mail, "@vectren.com")
+ ):
+ mail.move("INBOX.housing.BeauJardin")
+ return
if mail["From"].matches("facebook(|mail)\.com"):
mail.move("INBOX.crap.Facebook")
return
+ if is_to_or_from(mail,"@cerias.purdue.edu"):
+ mail.move("INBOX.crap.CERIAS")
+ return
+
+ if is_to_or_from(mail,"royfu@purdue.edu"):
+ mail.move("INBOX.crap.Hackers")
+ 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")
+ mail.move("INBOX.work.2013.Comcast")
return
if (
@@ -100,20 +117,24 @@ def my_filters(mail):
# Fall 2012 ############################################################
+ # SCI210 (Teaming principles)
if mail["Subject"].contains("Fall-2012-SCI-21000-001:"):
mail.move("INBOX.classes.2012-2.SCI210")
+ # CS180 (Java)
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
+ # SOC100
if mail["Subject"].contains("Fall-2012-SOC-10000"):
mail.move("INBOX.classes.2012-2.SOC100")
return
# Spring 2013 ##########################################################
+ # CS240 (C)
if mail["Subject"].contains("[CS240] Submission result for"):
mail.move("INBOX.classes.2013-1.CS240.autograder")
return
@@ -123,33 +144,40 @@ def my_filters(mail):
if piazza_topic(mail, "CS 240"):
mail.move("INBOX.classes.2013-1.CS240.Piazza")
return
+ # PHYS220
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
+ # SOC220 (Social Problems)
if mail["Subject"].contains("Spring-2013-SOC-22000"):
mail.move("INBOX.classes.2013-1.SOC220")
return
# Fall 2013 ############################################################
+ # CS250 (Computer Architecture)
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
+ # CS251 (Intro Algo)
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
+ # SPAN101
if mail["Subject"].contains("Fall-2013-SPAN-10100"):
mail.move("INBOX.classes.2013-2.SPAN101")
return
+ # MA261 (Calc III)
if mail["Subject"].contains("Fall-2013-MA-26100"):
mail.move("INBOX.classes.2013-2.MA261")
return
+ # MA265 (Linear Algebra)
if mail["Subject"].contains("Fall-2013-MA-26500"):
mail.move("INBOX.classes.2013-2.MA265")
return
@@ -163,11 +191,11 @@ def my_filters(mail):
if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"):
mail.move("INBOX.classes.2014-1.COM217.Mixable")
return
- # CS252
+ # CS252 (Systems Programming)
if piazza_topic(mail, "CS 25200"):
mail.move("INBOX.classes.2014-1.CS252.Piazza")
return
- # CS307
+ # CS307 (Software Engineering)
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
@@ -183,6 +211,65 @@ def my_filters(mail):
mail.move("INBOX.classes.2014-1.STAT350.Piazza")
return
+ # Fall 2014 ############################################################
+
+ # CS334 (Graphics)
+ if (is_to_or_from(mail, "lin553@purdue.edu") or mail["Subject"].contains("Fall-2014-CS-33400")):
+ mail.move("INBOX.classes.2014-2.CS334")
+ return
+ # CS354 (OS)
+ if piazza_topic(mail, "CS 354"):
+ mail.move("INBOX.classes.2014-2.CS354.Piazza")
+ return
+ # CS381 (Algo)
+ if piazza_topic(mail, "CS 381"):
+ mail.move("INBOX.classes.2014-2.CS381.Piazza")
+ return
+ # CS456 (Programming languages)
+ if piazza_topic(mail, "CS 456"):
+ mail.move("INBOX.classes.2014-2.CS456.Piazza")
+ return
+ # MA416
+ if mail["Subject"].contains("Fall-2014-MA-41600"):
+ mail.move("INBOX.classes.2014-2.MA416")
+ return
+ # PHYS221
+ if (False
+ or is_to_or_from(mail, "cui@purdue.edu")
+ or is_to_or_from(mail, "shina@purdue.edu")
+ or is_to_or_from(mail, "ajith@purdue.edu")
+ ):
+ mail.move("INBOX.classes.2014-2.PHYS221")
+ return
+
+ # Spring 2015 #########################################################
+
+ # CS352 (Compilers)
+ if is_to_or_from(mail, "wjg@cs.purdue.edu"):
+ mail.move("INBOX.classes.2015-1.CS352")
+ return
+ if piazza_topic(mail, "CS 352"):
+ mail.move("INBOX.classes.2015-1.CS352.Piazza")
+ return
+ # CS408 (Software testing)
+ if (False
+ or mail["Subject"].contains("spring-2015-cs-40800")
+ or is_to_or_from(mail, "li1471@purdue.edu")
+ or is_to_or_from(mail, "kirby@purdue.edu")
+ or is_to_or_from(mail, "webb39@purdue.edu")
+ or is_to_or_from(mail, "Jkou@purdue.edu")
+ or is_to_or_from(mail, "nstodda@purdue.edu")
+ or is_to_or_from(mail, "aryker@purdue.edu") # TA
+ ):
+ mail.move("INBOX.classes.2015-1.CS408")
+ return
+ # CS448 (Databases)
+ # ME297 (FRC)
+ if mail["Subject"].contains("[ME297]"):
+ mail.move("INBOX.classes.2015-1.ME297")
+ return
+ # SOC324 (Criminology)
+
handle_mapping = {
"INBOX": my_filters,
}
diff --git a/.config/offlineimaprc b/.config/offlineimaprc
index bdc2c66..36b382c 100644
--- a/.config/offlineimaprc
+++ b/.config/offlineimaprc
@@ -12,7 +12,7 @@ remoterepository = Remote-SBCGlobal
type = Maildir
localfolders = ~/Maildir
sep = .
-folderfilter = lambda folder: folder in [ 'Inbox' ]
+folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ]
[Repository Remote-SBCGlobal]
type = IMAP
@@ -20,7 +20,7 @@ ssl = yes
cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8
remotehost = imap.mail.yahoo.com
remoteuser = lukeshu@sbcglobal.net
-folderfilter = lambda folder: folder in [ 'Inbox' ]
+folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ]
## Purdue ############################################################
diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf
new file mode 100644
index 0000000..8dc4536
--- /dev/null
+++ b/.config/pacman/makepkg.conf
@@ -0,0 +1,8 @@
+PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest"
+SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest"
+SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest"
+LOGDEST="${LIBREHOME:-$HOME}/packages/logdest"
+
+PACKAGER="Luke Shumaker <lukeshu@sbcglobal.net>"
+
+MAKEFLAGS="-j3"
diff --git a/.config/redshift.conf b/.config/redshift.conf
new file mode 100644
index 0000000..25e731a
--- /dev/null
+++ b/.config/redshift.conf
@@ -0,0 +1,13 @@
+[redshift]
+; Don't mess with the color, just brightness
+temp-day=6500K
+temp-night=6500K
+brightness-day=1.0
+brightness-night=0.45
+
+location-provider=manual
+transition=0
+
+[manual]
+lat=39.9030
+lon=-85.9979
diff --git a/.config/selected_editor b/.config/selected_editor
index eca2482..1cc76a7 100644
--- a/.config/selected_editor
+++ b/.config/selected_editor
@@ -1,5 +1,5 @@
# Generated by /usr/bin/select-editor
-SELECTED_EDITOR="emacsclient -a '' -c"
+SELECTED_EDITOR="emacsclient -c"
if [[ -n $SSH_CONNECTION ]]; then
SELECTED_EDITOR+=' -nw'
fi
diff --git a/.config/ssh/config b/.config/ssh/config
index 2a5b79a..7bab06d 100644
--- a/.config/ssh/config
+++ b/.config/ssh/config
@@ -15,17 +15,7 @@ Host *.cs.purdue.edu
# Parabola #################################################
-# short names
-Host repo
- HostName repo.parabolagnulinux.org
-Host wiki
- HostName wiki.parabolagnulinux.org
-Host projects
- HostName projects.parabolagnulinux.org
-Host parabola
- HostName parabolagnulinux.org
-
-Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu
+Host parabola.nu
Port 1863
User lukeshu
@@ -34,3 +24,14 @@ Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu
Host lukeshu.com
Port 1863
User lukeshu
+
+Host build64-par
+ Port 22
+ User luke
+ ForwardX11 yes
+ ForwardX11Trusted yes
+
+Host build64-par-far
+ Port 1864
+ HostName lukeshu.com
+ User luke
diff --git a/.config/systemd/user/default.target.wants/batterymon.service b/.config/systemd/user/default.target.wants/batterymon.service
deleted file mode 100644
index c8abc0d..0000000
--- a/.config/systemd/user/default.target.wants/batterymon.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Battery monitor
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/batterymon 20 "amixer sset Master unmute 100%; espeak 'PLUG ME IN'; sleep 7;"
-
-[Install]
-WantedBy=default.target
diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service
index ef8f65f..e3a3cc0 100644..120000
--- a/.config/systemd/user/default.target.wants/emacs-daemon.service
+++ b/.config/systemd/user/default.target.wants/emacs-daemon.service
@@ -1,9 +1 @@
-[Unit]
-Description=Emacs deamon
-
-[Service]
-Type=forking
-ExecStart=/bin/bash -l -c 'emacs --daemon'
-
-[Install]
-WantedBy=default.target
+../emacs-daemon.service \ No newline at end of file
diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service
deleted file mode 100644
index 93c12b0..0000000
--- a/.config/systemd/user/default.target.wants/gpg-agent.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description="GnuPG agent daemon"
-
-[Service]
-Type=forking
-ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg
-
-[Install]
-WantedBy=default.target
diff --git a/.config/systemd/user/dunst@.service b/.config/systemd/user/dunst@.service
new file mode 100644
index 0000000..2aff6be
--- /dev/null
+++ b/.config/systemd/user/dunst@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Dunst notification-daemon
+Documentation=man:dunst(1)
+StopWhenUnneeded=true
+
+[Service]
+Type=simple
+Environment=DISPLAY=%I
+ExecStart=/usr/bin/dunst
+Restart=always
diff --git a/.config/systemd/user/emacs-daemon.service b/.config/systemd/user/emacs-daemon.service
new file mode 100644
index 0000000..279d83a
--- /dev/null
+++ b/.config/systemd/user/emacs-daemon.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Emacs deamon
+
+[Service]
+Type=forking
+ExecStart=/bin/bash -l -c 'emacs --daemon'
+ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"'
+
+[Install]
+WantedBy=default.target
diff --git a/.config/systemd/user/lxpanel@.service b/.config/systemd/user/lxpanel@.service
new file mode 100644
index 0000000..3327ab4
--- /dev/null
+++ b/.config/systemd/user/lxpanel@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=LXDE Desktop Panel
+Documentation=man:lxpanel(1)
+StopWhenUnneeded=true
+
+[Service]
+Type=simple
+Environment=DISPLAY=%I
+ExecStart=/usr/bin/lxpanel
+Restart=always
diff --git a/.config/systemd/user/maildirproc@.service b/.config/systemd/user/maildirproc@.service
new file mode 100644
index 0000000..bdca746
--- /dev/null
+++ b/.config/systemd/user/maildirproc@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=maildirproc mail filter
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/maildirproc -r ${HOME}/.config/maildirproc/%I.rc
+Restart=on-failure
+
+[Install]
+WantedBy=default.target
diff --git a/.config/systemd/user/rbar@.service b/.config/systemd/user/rbar@.service
new file mode 100644
index 0000000..18d6201
--- /dev/null
+++ b/.config/systemd/user/rbar@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=WMII rbar %I
+StopWhenUnneeded=true
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/bash -c '%h/.wmii-hg/rbar %I'
diff --git a/.config/systemd/user/redshift@.service b/.config/systemd/user/redshift@.service
new file mode 100644
index 0000000..149bb74
--- /dev/null
+++ b/.config/systemd/user/redshift@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Redshift display colour temperature adjustment
+Documentation=http://jonls.dk/redshift/
+StopWhenUnneeded=true
+
+[Service]
+Type=simple
+Environment=DISPLAY=%I
+ExecStart=/usr/bin/redshift
+ExecStopPost=/usr/bin/redshift -x
+Restart=always
diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service
new file mode 100644
index 0000000..8c1d818
--- /dev/null
+++ b/.config/systemd/user/vncserver@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=VNC desktop
+Conflicts=x0vncserver@%i.service
+
+[Service]
+Type=simple
+ExecStart=/bin/bash -l -c 'vncserver -fg %I'
+Restart=always
+ExecStopPost=/bin/rm /tmp/.X%I-lock /tmp/.X11-unix/X%I
+
+[Install]
+WantedBy=default.target
diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service
new file mode 100644
index 0000000..10fc4e9
--- /dev/null
+++ b/.config/systemd/user/wmii@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Window Manager Improved Improved
+Documentation=file:/usr/share/doc/wmii/wmii.pdf
+
+[Service]
+Type=simple
+Restart=no
+
+Environment=DISPLAY=%I
+ExecStart=/usr/bin/bash -l -c /usr/bin/wmii
+ExecStop=/usr/bin/wmiir xwrite /ctl Quit
+ExecStopPost=/usr/bin/bash -c ": > ${XDG_RUNTIME_DIR}/x11-wm@%I"
diff --git a/.config/systemd/user/wmii@.service.wants/lxpanel@.service b/.config/systemd/user/wmii@.service.wants/lxpanel@.service
new file mode 120000
index 0000000..06ed03f
--- /dev/null
+++ b/.config/systemd/user/wmii@.service.wants/lxpanel@.service
@@ -0,0 +1 @@
+../lxpanel@.service \ No newline at end of file
diff --git a/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service b/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service
new file mode 120000
index 0000000..286989e
--- /dev/null
+++ b/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service
@@ -0,0 +1 @@
+../rbar@.service \ No newline at end of file
diff --git a/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service b/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service
new file mode 120000
index 0000000..286989e
--- /dev/null
+++ b/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service
@@ -0,0 +1 @@
+../rbar@.service \ No newline at end of file
diff --git a/.config/systemd/user/wmii@.service.wants/xcompmgr@.service b/.config/systemd/user/wmii@.service.wants/xcompmgr@.service
new file mode 120000
index 0000000..be8518c
--- /dev/null
+++ b/.config/systemd/user/wmii@.service.wants/xcompmgr@.service
@@ -0,0 +1 @@
+../xcompmgr@.service \ No newline at end of file
diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service
new file mode 100644
index 0000000..02165a7
--- /dev/null
+++ b/.config/systemd/user/x0vncserver@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=VNC server for X displays
+Conflicts=vncserver@%i.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/x0vncserver display=%I PasswordFile=%h/.vnc/passwd
+Restart=always
diff --git a/.config/systemd/user/xcompmgr@.service b/.config/systemd/user/xcompmgr@.service
new file mode 100644
index 0000000..c7844d2
--- /dev/null
+++ b/.config/systemd/user/xcompmgr@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Composite Window-Effects Manger
+Documentation=man:xcompmgr(1)
+StopWhenUnneeded=true
+
+[Service]
+Type=simple
+Environment=DISPLAY=%I
+ExecStart=/usr/bin/xcompmgr
+Restart=always
diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart
deleted file mode 100755
index cd040b3..0000000
--- a/.config/wmii-hg/autostart
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-. include.sh
-
-daemon xcompmgr &> /dev/null
-daemon lxpanel &> /dev/null
-daemon nm-applet &> /dev/null
-daemon dunst &> /dev/null
-daemon clipit -dn &> /dev/null
-
-#Action rbar_cpu 01 &
-#Action rbar_wifi 97 &
-#Action rbar_battery 98 &
-Action rbar_clock 99 &
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index 3ddc8d5..be75d65 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -7,13 +7,13 @@ LEFT=b
RIGHT=f
HIST="$XDG_CACHE_HOME/wmii/history"
-mkdir -p "${HIST%/*}"
+mkdir -p -- "${HIST%/*}"
# Colors tuples: "<text> <background> <border>"
. theme-tango-dark
Event() {
- event=$1; shift;
+ local event=$1; shift;
case "$event" in
## Mouse event meanings:
## MouseDown = mouse down
@@ -36,22 +36,18 @@ Event() {
< "`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"
+ #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
+ local tag seltag="$(sed 1q $WMII_DIR/tag/sel/ctl)"
+ while read -r tag; do
Event CreateTag "$tag"
if [ "$tag" = "$seltag" ]; then
Event FocusTag "$tag"
fi
- done
-
- # Run the autostart action
- Action autostart 2>/dev/null &
+ done < <(lstags)
;;
WmiircQuit) ## No args
echo ' ==> Stopping wmiirc'
@@ -65,7 +61,7 @@ Event() {
echo " -> Unmounting WMII_DIR=$WMII_DIR..."
9umount "$WMII_DIR"
echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..."
- rmdir "$WMII_DIR";;
+ rmdir -p "$WMII_DIR" 2>/dev/null;;
## WMII-meta events
Quit) ## No args
echo ' ==> wmii quit: unmounting'
@@ -99,14 +95,14 @@ Event() {
NotUrgent) ## $1=client $2=[Manager|Client]
;;
ClientMouseDown) ## $1=client $2=button
- client=$1
- button=$2
+ local client=$1
+ local button=$2
case $button in
1) ;;
2) ;;
3)
{
- case `wmii9menu Delete Fullscreen` in
+ case $(wmii9menu Delete Fullscreen) in
Delete)
echo kill >> $WMII_DIR/client/$client/ctl;;
Fullscreen)
@@ -117,8 +113,9 @@ Event() {
ClientClick) ## $1=client $2=button
;;
Unresponsive) ## $1=client
- client=$1
- client_name=`cat $WMII_DIR/client/$client/label`
+ local client=$1
+ local client_name=$(< $WMII_DIR/client/$client/label)
+ local msg resp
msg="The client \`${client_name}' is not responding."
msg+=" What would you like to do?"
{
@@ -138,13 +135,13 @@ Event() {
DestroyTag) ## $1=tag
rm $WMII_DIR/lbar/$1;;
FocusTag) ## $1=tag
- echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;;
+ echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;;
UnfocusTag) ## $1=tag
- echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;;
- UrgentTag) ## $1=tag $2=[Manager|Client]
- echo "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;;
- NotUrgentTag) ## $1=tag $2=[Manager|Client]
- echo "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;;
+ echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;;
+ UrgentTag) ## $1=[Manager|Client] $2=tag
+ echo colors "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$2;;
+ NotUrgentTag) ## $1=[Manager|Client] $2=tag
+ echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$2;;
## LeftBar events (usually tag buttons)
LeftBarMouseDown) ## $1=button $2=bar_item
@@ -157,17 +154,20 @@ Event() {
## RightBar events
RightBarMouseDown) ## $1=button $2=bar_item
- ;;
+ local button=$1
+ local item=$2
+ local name=${item#[0-9][0-9]_}
+ name=${name%.*}
+ Action "rbar_$name" "$button" & ;;
RightBarClick) ## $1=button $2=bar_item
;;
RightMouseDND) ## $1=button $2=bar_item
Event RightBarClick "$@";;
esac
-} ## End Event
+}
-# Key Bindings
Key() {
- key=$1
+ local key=$1
case "$key" in
## Moving around
@@ -218,33 +218,34 @@ Key() {
## Running programs
$MODKEY-a) ## Open wmii actions menu
- Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;;
+ local action
+ action="$(path_ls "$WMII_CONFPATH" | wimenu -h "${HIST}.actions" -n 5000)" || return
+ Action "$action" & ;;
$MODKEY-x) ## Open program menu
- PATH=$_PATH setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;;
+ local command
+ command="$(path_ls "$_PATH" | wimenu -h "${HIST}.progs" -n 5000)" || return
+ ( PATH=$_PATH; unset _PATH; exec $command ) & ;;
$MODKEY-Return) ## Launch a terminal
- PATH=$_PATH setsid x-terminal-emulator & ;;
+ ( PATH=$_PATH; unset _PATH; exec x-terminal-emulator ) & ;;
## Tag actions
$MODKEY-t) ## Change to another tag
- {
- tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return
- echo view $tag >> $WMII_DIR/ctl
- }& ;;
+ local tag
+ tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return
+ echo view "$tag" >> $WMII_DIR/ctl;;
$MODKEY-Shift-t) ## Retag the selected client
+ local sel tag
sel=$(sed 1q $WMII_DIR/client/sel/ctl)
- {
- tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return
- echo "$tag" >> $WMII_DIR/client/$sel/tags
- }& ;;
+ tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return
+ echo "$tag" >> $WMII_DIR/client/$sel/tags;;
esac
-} ## End Key
+}
Action() {
- prog=`path_which "$WMII_CONFPATH" $1`; shift
+ local prog=$(path_which "$WMII_CONFPATH" "$1"); shift
if [ -n "$prog" ]; then
- "$prog" "$@"
- return $?
+ exec "$prog" "$@"
else
- return 1
+ exec false
fi
-} ## End Action
+}
diff --git a/.config/wmii-hg/fixes.sh b/.config/wmii-hg/fixes.sh
deleted file mode 100644
index 5858859..0000000
--- a/.config/wmii-hg/fixes.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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/rbar b/.config/wmii-hg/rbar
new file mode 100755
index 0000000..9aaa485
--- /dev/null
+++ b/.config/wmii-hg/rbar
@@ -0,0 +1,9 @@
+#!/bin/bash
+IFS=:
+read -r name prefix DISPLAY <<<"$1"
+export DISPLAY
+
+id=$1
+name=${id#[0-9][0-9]_}
+
+exec "$0"_"$name" "${id}"
diff --git a/.config/wmii-hg/rbar.sh b/.config/wmii-hg/rbar.sh
new file mode 100644
index 0000000..8297b71
--- /dev/null
+++ b/.config/wmii-hg/rbar.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+setup_trap() {
+ trap "rm -f -- ${HOME}/n/wmii*/rbar/${1}" EXIT
+}
+
+write() {
+ dirs=("${HOME}"/n/wmii*/rbar/)
+ sponge|tee -a "${dirs[@]/%/${1}}" > /dev/null
+}
+
+set -eE
+shopt -s nullglob
+case "$1" in
+ 1) left-click;;
+ 2) middle-click;;
+ 3) right-click;;
+ *) update "$1";;
+esac
diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi
new file mode 100755
index 0000000..bdcdf0f
--- /dev/null
+++ b/.config/wmii-hg/rbar_acpi
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+update() {
+ id=$1
+ setup_trap "${id}.*"
+
+ while true; do
+ acpi -bt | sed -r \
+ -e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \
+ -e 's/\s*degrees\s*/°/g' |
+ cat -n | while read -r n line; do
+ printf "label %s\n" "$line" | write "${id}.${n}"
+ done
+ sleep 1
+ done
+}
+
+. "$(dirname "$0")/rbar.sh"
diff --git a/.config/wmii-hg/rbar_battery b/.config/wmii-hg/rbar_battery
deleted file mode 100755
index f632f7e..0000000
--- a/.config/wmii-hg/rbar_battery
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-. include.sh
-
-priority=$1
-
-while connected_to_x_server; do
- printf 'label %s\n' "$(acpi -b)" >> "$WMII_DIR/rbar/${priority}_battery"
- sleep 1
-done
diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock
index 6aecb92..a09f016 100755
--- a/.config/wmii-hg/rbar_clock
+++ b/.config/wmii-hg/rbar_clock
@@ -1,9 +1,16 @@
#!/bin/bash
-. include.sh
-priority=$1
+update() {
+ id=$1
+ setup_trap "$id"
-while connected_to_x_server; do
- printf 'label %s\n' "$(date)" >> "$WMII_DIR/rbar/${priority}_clock"
- sleep .5
-done
+ while true; do
+ {
+ printf 'label '
+ date +'%a, %F %T %Z(%:::z)'
+ } | write "$id"
+ sleep .5
+ done
+}
+
+. "$(dirname "$0")/rbar.sh"
diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu
deleted file mode 100755
index 5531e60..0000000
--- a/.config/wmii-hg/rbar_cpu
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-. include.sh
-
-priority=$1
-
-while connected_to_x_server; do
- # This doesn't work for me, it shows capacity
- #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') >> "$WMII_DIR/rbar/${priority}_cpu"
- # This actually displays %idle
- echo 'label CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' >> "$WMII_DIR/rbar/${priority}_cpu"
- sleep 1
-done
diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi
index 18395a3..63dc653 100755
--- a/.config/wmii-hg/rbar_wifi
+++ b/.config/wmii-hg/rbar_wifi
@@ -1,9 +1,47 @@
#!/bin/bash
-. include.sh
-priority=$1
+iwinfo() {
+ local interface=$1
+ iwconfig "$interface" |
+ sed -r 's/ {2,}/\n/g' |
+ sed -e '/^\s*$/d' -e 's/:\s*/=/' \
+ -e '1s/^/Interface=/' \
+ -e '2s/^/MAC Protocol=/'
+}
-while connected_to_x_server; do
- echo 'label Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi"
- sleep 1
-done
+update() {
+ local id
+ id=$1
+ setup_trap "$id"
+ while true; do
+ {
+ printf 'label '
+ iwinfo wlp2s0|grep -E '^(ESSID|Link Quality)='|sed 'N;s/\n/ | /'
+ } | write "$id"
+ sleep 1
+ done
+}
+
+right-click() {
+ local list cur item
+
+ list=()
+ IFS=''
+ while read -r line; do
+ list+=("$line")
+ done < <(netctl-auto list | sed 's,$,$,' | column -s '$' -t)
+
+ cur=''
+ for item in "${list[@]}"; do
+ if [[ "$item" = '* '* ]]; then
+ cur="$item"
+ fi
+ done
+
+ item=$(wmii9menu -i "$cur" "${list[@]}")
+ if [[ -n $item ]] && [[ "$item" != '* '* ]]; then
+ netctl-auto switch-to "$item"
+ fi
+}
+
+. "$(dirname "$0")/rbar.sh"
diff --git a/.config/wmii-hg/rules b/.config/wmii-hg/rules
index cf735c9..3576983 100644
--- a/.config/wmii-hg/rules
+++ b/.config/wmii-hg/rules
@@ -4,5 +4,7 @@
/nm-applet/ floating=off
+/^FLTK:FLTK:/ floating=always
+
/Emacs|Navigator/ force-tags=+sel floating=never
/.*/ floating=off
diff --git a/.config/wmii-hg/theme-tango b/.config/wmii-hg/theme-tango
index e0e35d4..f4c20a2 100644
--- a/.config/wmii-hg/theme-tango
+++ b/.config/wmii-hg/theme-tango
@@ -7,4 +7,3 @@ TANGO_plum=( "#ad7fa8" "#75507b" "#5c3566")
TANGO_red=( "#ef2929" "#cc0000" "#a40000")
TANGO_alum=( "#eeeeec" "#d3d7cf" "#babdb6"
"#888a85" "#555753" "#2e3436")
-
diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh
index 71dbc41..b28a3b6 100644
--- a/.config/wmii-hg/util.sh
+++ b/.config/wmii-hg/util.sh
@@ -1,8 +1,5 @@
#!/bin/bash
-# I moved "fixes" into a separate file because it isn't so much configuration...
-. fixes.sh
-
################################################################################
# Added shell features #
################################################################################
@@ -25,17 +22,17 @@ dquote() {
# Usage: expand_variables
# Expands variables read from /dev/stdin
##
-expand_variables() {
- while read; do
- eval printf "'%s\n'" "$(dquote "$REPLY")"
+expand_variables() (
+ IFS=''
+ while read -r line; do
+ eval printf "'%s\n'" "$(dquote "$line")"
done
-}
+)
is_mounted() {
local dir="$(readlink -m $1)"
local mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -Fx -- "$dir")"
[[ $dir = "$mntpnt" ]]
- return $?
}
################################################################################
@@ -72,7 +69,7 @@ path_which() {
# Lists wmii tags
##
lstags() {
- ls "$WMII_DIR/tag" | sed -e 's@/$@@' -e '/^sel$/d'
+ ls "$WMII_DIR/tag" | sed -e 's,/$,,' -e '/^sel$/d'
}
################################################################################
@@ -85,7 +82,6 @@ lstags() {
##
connected_to_x_server() {
xdpyinfo &>/dev/null
- return $?
}
################################################################################
@@ -93,32 +89,25 @@ connected_to_x_server() {
################################################################################
##
-# Usage: scansection [SECTION]
+# 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
+
+ local file=$(conffile config.sh)
+ # Isolate the section we want.
+ < "$file" sed -n "/^\s*$sec\s*()/,/^}/{ /##/p }" |
+ # Parse each line.
+ while read -r line; do
+ symbol="$(sed -nr 's/^\s*(.*)\)\s*##.*/\1/p' <<<"$line")"
+ comment="$(sed -r 's/.*## ?//' <<<"$line")"
+ if [ -z "$symbol" ]; then
printf '%s\n' "$comment"
else
- printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment"
+ printf '\t%s\t%s\n' "$(expand_variables <<<"$symbol")" "$comment"
fi
done
- rm -- "$tmp"
}
##
diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc
index a7dd80c..396bed2 100755
--- a/.config/wmii-hg/wmiirc
+++ b/.config/wmii-hg/wmiirc
@@ -2,8 +2,10 @@
unset WMII_NAMESPACE
unset WMII_DIR
-export _PATH="$PATH"
-export PATH="$WMII_CONFPATH:$PATH"
+if [[ -z $_PATH ]]; then
+ export _PATH="$PATH"
+ export PATH="$WMII_CONFPATH:$PATH"
+fi
. include.sh
@@ -13,6 +15,6 @@ Event WmiircStart
trap "Event Quit" EXIT
-wmiir read /event 2>/dev/null | while read event; do
+while read -r event; do
Event $event
-done
+done < <(wmiir read /event 2>/dev/null)