diff options
-rwxr-xr-x | .Xrc.cs | 31 | ||||
-rw-r--r-- | .Xresources | 20 | ||||
-rw-r--r-- | .config/X11/clientrc | 21 | ||||
-rw-r--r-- | .config/bash/rc.d/emacs.sh | 43 | ||||
-rw-r--r-- | .config/bash/rc.sh | 158 | ||||
-rw-r--r-- | .config/cron/.crontab | 0 | ||||
-rw-r--r-- | .config/cron/.crontab.local | 0 | ||||
-rw-r--r-- | .config/emacs/.gitignore | 1 | ||||
-rw-r--r-- | .config/emacs/custom.el | 23 | ||||
-rw-r--r-- | .config/irbrc | 3 | ||||
-rw-r--r-- | .config/login.local.sh | 6 | ||||
-rw-r--r-- | .config/login.sh | 104 | ||||
-rw-r--r-- | .config/maildirproc/att.rc | 102 | ||||
-rw-r--r-- | .config/offlineimaprc | 38 | ||||
-rwxr-xr-x | .config/wmii-hg/autostart | 14 | ||||
-rw-r--r-- | .config/wmii-hg/include.sh | 71 | ||||
-rwxr-xr-x | .config/wmii-hg/quit | 4 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_battery | 7 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_clock | 7 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_cpu | 9 | ||||
-rwxr-xr-x | .config/wmii-hg/rbar_wifi | 7 | ||||
-rw-r--r-- | .cshrc | 18 | ||||
-rw-r--r-- | .dmrc | 4 | ||||
-rw-r--r-- | .kshrc | 10 | ||||
-rwxr-xr-x | .local.sun4u/bin/grep | 2 | ||||
-rwxr-xr-x | .local.sun4u/bin/make | 2 | ||||
-rwxr-xr-x | .local.sun4u/bin/sed | 2 | ||||
-rw-r--r-- | .login | 6 |
28 files changed, 381 insertions, 332 deletions
@@ -0,0 +1,31 @@ +#!/bin/sh + +eval `/usr/local/bin/defaultpaths -sh` + +eval `xrdb -global -symbols | sed -ne '/=/!d;s/^-D//;p'` + +host=`/usr/local/bin/shorthostname | sed -e 'h;s/.//;x;s/\(.\).*/\1/;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;G;s/\n//'` + +# For OpenWindows apps +if [ -d /usr/openwin ]; then + OPENWINHOME=/usr/openwin; export OPENWINHOME + HELPPATH=$OPENWINHOME/lib/help; export HELPPATH + PATH=${PATH}:/usr/openwin/bin +fi + +# load .Xresources and .Xdefaults into the X resource database +for i in $HOME/.Xresources $HOME/.Xdefaults; do + [ -f $i ] && xrdb -merge $i +done + +# do these in a subshell so they don't become zombies on exit +( + xscreensaver & + fvwm & # window manager + xterm -geometry 80x24-0+257 -T "$host" -n "$host" & +) + +# only grab the actual console when we're running on a local display +[ "$SERVERHOST" != "lore.cs.purdue.edu" -a "$SERVERHOST" = "$CLIENTHOST" ] && consflag=-C +# kill this xterm to end your session +exec xterm $consflag -geometry 80x14-0+15 -T console -n console -fg darkslategray -bg burlywood3 diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..2b8f856 --- /dev/null +++ b/.Xresources @@ -0,0 +1,20 @@ +xscreensaver.timeout: 0:10:00 +xscreensaver.cycle: 0:10:00 +xscreensaver.lock: True +xscreensaver.lockTimeout: 0:00:00 +xscreensaver.passwdTimeout: 0:01:00 +xscreensaver.passwdTimeoutEnable: True +xscreensaver.dpmsEnabled: True +xscreensaver.dpmsStandby: 0:10:00 +xscreensaver.dpmsSuspend: 0:10:00 +xscreensaver.dpmsOff: 0:10:00 + +XTerm*iconic: off +XTerm*loginShell: on +XTerm*reverseWrap: on +XTerm*saveLines: 200 +XTerm*scrollBar: on +XTerm*visualBell: off +XTerm*font: 7x13 + +Dtterm*loginShell: on diff --git a/.config/X11/clientrc b/.config/X11/clientrc index d1e1725..9c5ce55 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -5,23 +5,22 @@ # Executed by startx (run your window manager from here) if [ -d /etc/X11/xinit/xinitrc.d ]; then - echo ' ==> Running scripts in Entering xinitrc.d/*' - for f in /etc/X11/xinit/xinitrc.d/*; do - echo " -> $f" - [ -x "$f" ] && "$f" & - done - unset f - echo ' -> done' + echo ' ==> Running scripts in Entering xinitrc.d/*' + for f in /etc/X11/xinit/xinitrc.d/*; do + echo " -> $f" + [ -x "$f" ] && "$f" & + done + unset f + echo ' -> done' fi -usermodmap="$XDG_CONFIG_HOME/X11/modmap" +usermodmap="$HOME/.xmodmap" if [ -f "$usermodmap" ]; then - xmodmap "$usermodmap" + xmodmap "$usermodmap" fi # exec gnome-session # exec startkde # exec startxfce4 # ...or the Window Manager of your choice -#export WMII_CONFPATH="$XDG_CONFIG_HOME/wmii" -exec wmii +exec ck-launch-session wmii diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 9c1bf4d..f484bbb 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -1,41 +1,8 @@ -#!/bin/bash - case "$TERM" in eterm*) - SELECTED_EDITOR='emacsclient' - EDITOR=$SELECTED_EDITOR - VISUAL=$SELECTED_EDITOR - export SELECTED_EDITOR EDITOR VISUAL - # The following uses the variable _EMACS_BUFFER to store some state - _emacs_quote() { - local str="$*" - str="${str//\\/\\\\}" - str="${str//\"/\\\"}" - str="\"${str}\"" - printf '%s' "$str" - } - _emacs_rename_terminal() { - local name="$(_emacs_quote "$(_emacs_get_desired_buffer_name)")" - if [[ -n $_EMACS_BUFFER ]]; then - local buffer="(get-buffer $_EMACS_BUFFER)" - else - local buffer='(window-buffer (selected-window))' - fi - _EMACS_BUFFER="$(emacsclient -e "(with-current-buffer ${buffer} (rename-buffer ${name} t)))" 2>/dev/null)" - } - _emacs_get_short_cwd() { - local base=$1 - local suffix='' - if [[ $base =~ (/(src|pkg|doc|pkg-libre|src-libre|trunk|tags|branches))*$ ]]; then - suffix=$BASH_REMATCH - base=${base%$suffix} - fi - base=${base##*/} - echo ${base}${suffix} - } - _emacs_get_desired_buffer_name() { - echo "*ansi-term*<$(_emacs_get_short_cwd "$PWD")>" - } - PROMPT_COMMAND='_emacs_rename_terminal "$(_emacs_get_desired_buffer_name)"' - :;; + SELECTED_EDITOR='emacsclient' + EDITOR=$SELECTED_EDITOR + VISUAL=$SELECTED_EDITOR + export SELECTED_EDITOR EDITOR VISUAL + :;; esac diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index 2bf60bc..ed5d87e 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -1,79 +1,117 @@ -# ~/.bashrc: executed by bash(1) for interactive non-login shells. +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + # I include this file for all interactive invocations of bash(1), whether # they are login shells or not. # If not running interactively, don't do anything -[[ $- != *i* ]] && return +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# don't overwrite GNU Midnight Commander's setting of `ignorespace'. +export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups +# ... or force ignoredups and ignorespace +export HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# Let ** recursively scan directories +shopt -s globstar # Why is this not on by default? # "We have a cached value, but it isn't valid anymore. Should we trash it?" -# "Duh, yes!" shopt -s checkhash -################################################################################ - -# History settings -HISTCONTROL=ignoredups -HISTFILE=${XDG_CACHE_HOME}/bash/history -HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' -HISTSIZE=5000 -shopt -s histappend # append to the history file, don't overwrite it -mkdir -p "${HISTFILE%/*}" - -# General settings -shopt -s checkwinsize # update the values of LINES and COLUMNS -shopt -s globstar # Let ** recursively scan directories - -################################################################################ -# Overly complicated setting of PS1 # -################################################################################ - -# Belongs in aliases, but I use it here -term-title() { - local fmt='' - case "$TERM" in - screen|tmux) fmt='\ek%s\e\\';; - xterm*|rxvt*) fmt='\e]0;%s\a';; - esac - printf "$fmt" "$*" -} -PROMPT_COMMAND='' - -make_prompt() { - echo "${BOLD}${GREEN}\u@\h${BLUE}:\w${RESET}" -} - -if tput setaf 1 &>/dev/null; then +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +case "$TERM" in + xterm) export TERM=xterm-256color;; +esac + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + linux) color_prompt=yes;; + *-*color*) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) - RESET="$(tput sgr0)" - BOLD="$(tput bold)" - RED="$(tput setaf 1)" - GREEN="$(tput setaf 2)" - BLUE="$(tput setaf 4)" - - _STATUS="${BOLD}[" - _STATUS+="\$(v=\$?; [[ \$v = 0 ]] && c='${GREEN}' || c='${RED}'; printf %s%03i \$c \$v)" - _STATUS+="${RESET}${BOLD}]${RESET}" + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ ' else - _STATUS='[$(printf "%03i" $?)]' + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ ' fi -PS1="${_STATUS} $(make_prompt)"'\n\$ ' -unset RESET BOLD RED GREEN BLUE _STATUS -PS1="$(term-title $(make_prompt))$PS1" -unset make_prompt +unset color_prompt force_color_prompt -################################################################################ +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac -# Load my alaises -if [[ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]]; then - . ${XDG_CONFIG_HOME}/bash/aliases.sh +# Include modular config files +if [ -d ~/.bash.d ]; then + for file in ~/.bash.d/*.sh; do + . $file; + done fi -# Include modular config files -if [[ -d ${XDG_CONFIG_HOME}/bash/rc.d ]]; then - for file in "${XDG_CONFIG_HOME}/bash/rc.d"/*.sh; do - . "$file" - done +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion fi + +if [ -f "$HOME/.login-daemons" ]; then + . "$HOME/.login-daemons" +fi + +if [ -f "${HOME}/.gnupg/agent-info" ]; then + . "${HOME}/.gnupg/agent-info" + export GPG_AGENT_INFO + #export SSH_AUTH_SOCK +fi + +export PERL_LOCAL_LIB_ROOT="/home/luke/perl5"; +export PERL_MB_OPT="--install_base /home/luke/perl5"; +export PERL_MM_OPT="INSTALL_BASE=/home/luke/perl5"; +export PERL5LIB="/home/luke/perl5/lib/perl5/i686-linux-thread-multi:/home/luke/perl5/lib/perl5"; +export PATH="/home/luke/perl5/bin:$PATH"; diff --git a/.config/cron/.crontab b/.config/cron/.crontab new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.config/cron/.crontab diff --git a/.config/cron/.crontab.local b/.config/cron/.crontab.local new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.config/cron/.crontab.local diff --git a/.config/emacs/.gitignore b/.config/emacs/.gitignore index ef4ec20..0b3a0d4 100644 --- a/.config/emacs/.gitignore +++ b/.config/emacs/.gitignore @@ -7,3 +7,4 @@ server/* session.* tramp url/* +saves diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 47bf654..5a3e67f 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -3,33 +3,16 @@ ;; 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")) - '(custom-enabled-themes (quote (tango-dark))) - '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(custom-enabled-themes (quote (wombat))) + '(custom-safe-themes (quote ("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) - '(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")) + '(scroll-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/irbrc b/.config/irbrc index 27cce66..7596d96 100644 --- a/.config/irbrc +++ b/.config/irbrc @@ -1,4 +1 @@ require 'rubygems' unless defined? Gem # only needed in 1.8 -require 'irb/ext/save-history' -IRB.conf[:SAVE_HISTORY] = 5000 -IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history"
\ No newline at end of file diff --git a/.config/login.local.sh b/.config/login.local.sh new file mode 100644 index 0000000..1da7aa7 --- /dev/null +++ b/.config/login.local.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -x "`which daemon`" ]; then + # daemon ... + : +fi diff --git a/.config/login.sh b/.config/login.sh index 2687a8e..377dc9b 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -1,9 +1,4 @@ -#!/bin/bash # ~/.profile: executed by the command interpreter for login shells. -# Should be whether logging in graphically or not. -# -# This file should be executable by /bin/sh, but I'm going to assume bash(1) -# # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. @@ -13,85 +8,60 @@ umask 022 ## 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 -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions +# Unix +bins=$(echo $HOME/bin $HOME/.local.`uname -m`/bin $HOME/.local/bin $HOME/.prefix.`uname -m`/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin) +for dir in $bins; do + if [ -d "$dir" ]; then + export PATH="$dir:$PATH" + fi +done + +# Ruby +for dir in $HOME/.prefix/lib; do + if [ -d "$dir" ]; then + export RUBYLIB="$dir" + fi +done # 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}" +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 [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then - echo 'login: Starting gpg-agent' - mkdir -p "${XDG_RUNTIME_DIR}/sessions" - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null -fi -if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then - echo 'login: Setting gpg-agent info:' - cat "${XDG_RUNTIME_DIR}/sessions/gpg" - . "${XDG_RUNTIME_DIR}/sessions/gpg" - export GPG_AGENT_INFO - #export SSH_AUTH_SOCK -fi +export GPGKEY=D4FFBFC9 # 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 +_JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR" export _JAVA_OPTIONS # X11 -if [[ -z $XAUTHORITY ]]; then - #export XAUTHORITY="$HOME/.Xauthority" - mkdir -p "${XDG_RUNTIME_DIR}/sessions" - export XAUTHORITY="${XDG_RUNTIME_DIR}/sessions/Xauthority" +if [ -z "$XAUTHORITY" ]; then + export XAUTHORITY=$HOME/.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 +# Start background programs ########################################## +if [ -f "$HOME/.login-daemons" ]; then + . "$HOME/.login-daemons" +fi -# Load any box-specific stuff -if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then - . "$XDG_CONFIG_HOME/login.local.sh" +# BASH ############################################################### +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi fi + +export PERL5LIB=/homes/shumakl/.prefix.x86_64/lib64/perl5:$PERL5LIB +export GOROOT=/homes/shumakl/.prefix.x86_64/go diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 381ce8f..71bc00c 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -1,20 +1,16 @@ -# -*- mode: python; indent-tabs-mode: t -*- +# -*- mode: python; -*- -import os import subprocess processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/att.log" def is_to_or_from(mail,address): """ Return true if [mail] is to or from an address that contains [address]. """ return ( - False - or mail["From"].contains(address) - or mail["Reply-To"].contains(address) + mail["From"].contains(address) or mail.target.contains(address)) def is_to_or_from_re(mail,address): """ @@ -76,11 +72,11 @@ def handle_incoming_unknown(mail): def my_filters(mail): # Sort mail from GNU mailing lists - for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla', 'bug-librejs' ]: + for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]: if ( False or mail["List-Id"].matches(list+"\.gnu\.org") - or mail["Subject"].contains('['+list+']') + or mail["Subject"].contains(list) ): mail.move(".software."+list) return @@ -94,43 +90,15 @@ def my_filters(mail): mail.move(".software.social") return - if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move(".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(".software.parabola-maintenance.monit-repo.sshd") - return - mail.move(".software.parabola-maintenance.monit-repo") - return - if mail["Message-Id"].contains("@rshg054.dnsready.net"): - mail.move(".software.parabola-maintenance.monit-rshg054") - return - if mail["Subject"].matches("Cron <.*@repo>"): - mail.move(".software.parabola-maintenance.cron-repo") - return - if mail["Subject"].matches("Cron <.*@rshg054>"): - mail.move(".software.parabola-maintenance.cron-rshg054") - return mail.move(".software.parabola-maintenance") return - - if is_to_or_from(mail, "parabola.nu"): - mail.move(".software.parabola-labs") - return - if ( False or mail["List-Id"].matches("parabolagnulinux.org") 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(".software.parabola-maintenance.django") - return mail.move(".software.parabola-dev") return @@ -138,10 +106,6 @@ def my_filters(mail): mail.move(".software.pacman-dev") return - if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")): - mail.move(".software.systemd-devel") - return - for subject_re in [ "\[Stow-[^\]]*\].*", ]: @@ -189,7 +153,6 @@ def my_filters(mail): or is_to_or_from(mail,"mitchprather@sbcglobal.net") or is_to_or_from(mail,"oa_wap@yahoo.com") or is_to_or_from(mail,"mytroop.us") - or is_to_or_from(mail,"crossroadsbsa.org") ): mail.move(".Troop276") return @@ -202,10 +165,8 @@ def my_filters(mail): for address in [ "justicejade10@aol.com", "parsonsjade@aol.com", - "parsonstjade@gmail.com", - "jadparso@umail.iu.edu", ]: - if is_to_or_from(mail,address): + if mail["From"].contains(address): mail.move(".misc.Jade") return @@ -228,29 +189,29 @@ def my_filters(mail): # Sort mail from FRC people for address in [ - "@ni.com", - "@usfirst.org", - "BBonahoom@stanleyworks.com", + "jeffreysmith@msdlt.k12.in.us", + "jason.zielke@gmail.com", "allison.m.babcock@gmail.com", - "bryanbonahoom@gmail.com", - "cdewalt3@yahoo.com", - "dave.nelson@ecolab.com", - "dickaustin190@yahoo.com", + "william.walk@gmail.com", + "BBonahoom@stanleyworks.com", + "wcxctrack829@aim.com", # Pat "djnels1@comcast.net", # Dave and Julie Nelson - "gamefreak207@gmail.com", # Brett Leedy - "jason.zielke@gmail.com", - "jeffreysmith@msdlt.k12.in.us", "sarahlittell@comcast.net", - "silioso@gmail.com", "skiplittell@comcast.net", + "dave.nelson@ecolab.com", + "@ni.com", + "@usfirst.org", + "gamefreak207@gmail.com", # Brett Leedy "tswilson4801@att.net", - "wcxctrack829@aim.com", # Pat - "william.walk@gmail.com", + "silioso@gmail.com", + "cdewalt3@yahoo.com", + "bryanbonahoom@gmail.com", ]: if is_to_or_from(mail,address): mail.move(".School.Robotics") return for subject_re in [ + "FIRST", "robotics", "1024", "kil-?a-?bytes", @@ -261,21 +222,19 @@ def my_filters(mail): # Sort mail from software people for address in [ - "@archlinux.org", - "@fsf.org", - "@github.com", - "canonical.org", - "cnuk.org", + "gnu.org", "eff.org", - "esr@thyrsus.com", - "foocorp.net", "gitorious.org", - "gnome.org", - "gnu.org", + "sourceforge.com", "ietf.org", "kde.org", - "sourceforge.com", "trustees@core3.amsl.com", + "esr@thyrsus.com", + "canonical.org", + "foocorp.net", + "cnuk.org", + "@archlinux.org", + "@github.com", ]: if is_to_or_from(mail,address): mail.move(".software") @@ -317,7 +276,6 @@ def my_filters(mail): or mail["Subject"].contains("newsletter") or mail["From"].contains("Info@mailing.jamendo.com") or mail["From"].contains("info@demandprogress.org") - or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): mail.move(".misc.Newsletters") return @@ -347,10 +305,10 @@ def my_filters(mail): return if ( False - #or mail["From"].contains(".edu") + or mail["From"].contains(".edu") or mail["From"].contains("admissions@") - #or mail["From"].contains("college") - #or mail["From"].contains("university") + 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") diff --git a/.config/offlineimaprc b/.config/offlineimaprc index d027001..319593c 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -1,25 +1,25 @@ # -*- Mode: Conf -*- [general] -accounts = ATT,Purdue +accounts = LukeShu -## AT&T ############################################################### +[Account LukeShu] +localrepository = Local +remoterepository = Remote -[Account ATT] -localrepository = Local-Main -remoterepository = Remote-SBCGlobal - -[Repository Local-Main] +[Repository Local] type = Maildir localfolders = ~/Maildir sep = . folderfilter = lambda foldername: not re.search('(Trash|Del|-old|Draft)', foldername) + # transforms local -> remote nametrans = lambda foldername: re.sub('^$', 'Inbox', re.sub('^'+re.escape('%(sep)s'), '', foldername)) -[Repository Remote-SBCGlobal] + +[Repository Remote] type = IMAP ssl = yes -cert_fingerprint = a6ee8d759eb76dafacffffc47c4507d51f444984 +cert_fingerprint = 700d84baa7e852240178dc2de18e7e528a2854df remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net folderfilter = lambda foldername: not re.search('(Trash|Del)', foldername) @@ -27,23 +27,3 @@ folderfilter = lambda foldername: not re.search('(Trash|Del)', foldername) # transforms remote -> local # we must assume that sep=/ on the remote IMAP server. nametrans = lambda foldername: '/'+re.sub('^Inbox$', '', foldername) - -## Purdue ############################################################ - -[Account Purdue] -localrepository = Local-Purdue -remoterepository = Remote-Purdue - -[Repository Local-Purdue] -type = Maildir -localfolders = ~/Maildir.purdue -sep = . -folderfilter = lambda foldername: re.search('INBOX', foldername) - -[Repository Remote-Purdue] -type = IMAP -ssl = yes -cert_fingerprint = 2189e7d568d93352fcdccaa24137856191703c4a -remotehost = mymail.purdue.edu -remoteuser = shumakl -folderfilter = lambda foldername: re.search('INBOX', foldername) diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index 9c47a9d..aae23f4 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -1,12 +1,4 @@ #!/bin/bash -. include.sh - -daemon xcompmgr &> /dev/null -daemon lxpanel &> /dev/null -daemon nm-applet &> /dev/null -daemon dunst &> /dev/null - -#Action rbar_cpu 01 & -#Action rbar_wifi 97 & -#Action rbar_battery 98 & -Action rbar_clock 99 & +daemon lxpanel &> /dev/null +daemon wicd-client -t &> /dev/null +daemon notifyd &> /dev/null diff --git a/.config/wmii-hg/include.sh b/.config/wmii-hg/include.sh index bd9456f..36f8f3e 100644 --- a/.config/wmii-hg/include.sh +++ b/.config/wmii-hg/include.sh @@ -1,11 +1,70 @@ #!/bin/bash -if [[ -z "$WMII_NAMESPACE" ]]; then - export WMII_NAMESPACE="`wmiir namespace`" +if [ -z "$WMII_NAMESPACE" ]; then + export WMII_NAMESPACE=`wmiir namespace` fi -if [[ -z "$WMII_DIR" ]]; then - export WMII_DIR="$HOME/n/wmii${DISPLAY}" +if [ -z "$WMII_DIR" ]; then + export WMII_DIR=$WMII_NAMESPACE/mnt fi -. util.sh -. config.sh +# a -- a work-around for buggy IO append in 9pfuse +# useing '|a' should be just like using '>>', but will work +# when 9pfuse decides to bug out. +a() { + f="${1/#${WMII_DIR}/}" + if [ "$f" = "$1" ]; then + cat >> "$1" + else + if wmiir ls "$f" &>/dev/null; then + wmiir write "$f" + else + wmiir create "$f" + fi + fi +} + +# I like wmiir's setsid better than linux-utils' +setsid() { wmiir setsid "$@"; } + +path_ls() { + find -L `echo "$@"|sed 'y/:/ /'` -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null| sort -u +} + +path_which() { + mypath=$1 + prog=$2 + which=`which which` + PATH="$mypath" "$which" -- "$prog" 2>/dev/null +} + + +lstags() { + ls $WMII_DIR/tag | sed '/^sel$/d' +} + +scansection() { + file=`path_which "$WMII_CONFPATH" wmiirc` + sec=$1 + tmp=`mktemp` + if [ -n "$sec" ]; then + < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> $tmp + else + < "$file" sed "/\s*}\s*##\s*End\s/d" > $tmp + fi + < $tmp sed -n '/##/p'|sed -r 's/^\s*(.*)\)\s*## ?/\t\1\t/;s/\s*## ?//' + rm $tmp +} + +conffile() { + echo "$HOME/.wmii/$@" +} + +Action() { + prog=`path_which "$WMII_CONFPATH" $1`; shift + if [ -n "$prog" ]; then + "$prog" "$@" + return $? + else + return 1 + fi +} diff --git a/.config/wmii-hg/quit b/.config/wmii-hg/quit index 27d9052..54f64e7 100755 --- a/.config/wmii-hg/quit +++ b/.config/wmii-hg/quit @@ -1,3 +1,3 @@ #!/bin/bash -. include.sh -echo quit >> $WMII_DIR/ctl +. "$HOME/.wmii/include.sh" +echo quit |a $WMII_DIR/ctl diff --git a/.config/wmii-hg/rbar_battery b/.config/wmii-hg/rbar_battery index f632f7e..7a7f24f 100755 --- a/.config/wmii-hg/rbar_battery +++ b/.config/wmii-hg/rbar_battery @@ -1,9 +1,10 @@ #!/bin/bash -. include.sh +. "$HOME/.wmii/include.sh" priority=$1 -while connected_to_x_server; do - printf 'label %s\n' "$(acpi -b)" >> "$WMII_DIR/rbar/${priority}_battery" +set -e +while true; do + acpi -b |a "$WMII_DIR/rbar/${priority}_battery" sleep 1 done diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock index 6aecb92..8e7d2a4 100755 --- a/.config/wmii-hg/rbar_clock +++ b/.config/wmii-hg/rbar_clock @@ -1,9 +1,10 @@ #!/bin/bash -. include.sh +. "$HOME/.wmii/include.sh" priority=$1 -while connected_to_x_server; do - printf 'label %s\n' "$(date)" >> "$WMII_DIR/rbar/${priority}_clock" +set -e +while true; do + date |a "$WMII_DIR/rbar/${priority}_clock" sleep .5 done diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu index 5531e60..7f891da 100755 --- a/.config/wmii-hg/rbar_cpu +++ b/.config/wmii-hg/rbar_cpu @@ -1,12 +1,13 @@ #!/bin/bash -. include.sh +. "$HOME/.wmii/include.sh" priority=$1 -while connected_to_x_server; do +set -e +while true; 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" + #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') |a "$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" + echo 'CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' |a "$WMII_DIR/rbar/${priority}_cpu" sleep 1 done diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index 18395a3..608b164 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -1,9 +1,10 @@ #!/bin/bash -. include.sh +. "$HOME/.wmii/include.sh" priority=$1 -while connected_to_x_server; do - echo 'label Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi" +set -e +while true; do + echo 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) |a "$WMII_DIR/rbar/${priority}_wifi" sleep 1 done @@ -0,0 +1,18 @@ +# this file is processed on every csh invocation + +# set PATH and MANPATH based on machine type +eval `/usr/local/bin/defaultpaths -csh` + +# set default file/directory creation protection +umask 027 + +setenv ENTOMB yes + +# skip the rest if the shell is non-interactive, i.e. is running a script +if ( ! $?prompt ) exit + +set prompt = "`shorthostname` \! % " +set history = 50 +set notify = on + +alias mail mailx @@ -0,0 +1,4 @@ + + +[Desktop] +Session=gnome @@ -0,0 +1,10 @@ +# this file is processed on each invocation of ksh + +# skip the rest if the shell is non-interactive, i.e. is running a script +[[ "$-" != *i* ]] && return + +PS1="`shorthostname` ! $ " +HISTSIZE=50 +HISTFILE=$HOME/.sh_history # pdksh doesn't set this by default + +alias mail=mailx diff --git a/.local.sun4u/bin/grep b/.local.sun4u/bin/grep new file mode 100755 index 0000000..481a7a9 --- /dev/null +++ b/.local.sun4u/bin/grep @@ -0,0 +1,2 @@ +#/bin/bash +ggrep "$@" diff --git a/.local.sun4u/bin/make b/.local.sun4u/bin/make new file mode 100755 index 0000000..fff3f2d --- /dev/null +++ b/.local.sun4u/bin/make @@ -0,0 +1,2 @@ +#/bin/bash +gmake "$@" diff --git a/.local.sun4u/bin/sed b/.local.sun4u/bin/sed new file mode 100755 index 0000000..3707eb6 --- /dev/null +++ b/.local.sun4u/bin/sed @@ -0,0 +1,2 @@ +#/bin/bash +gsed "$@" @@ -0,0 +1,6 @@ +# this file is processed only when csh is running as a login (top-level) shell +# and should contain commands to be run once per session, e.g. setting +# environment variables and terminal-specific settings + +setenv EDITOR vi +setenv PAGER less |