From 2d34aa1498b04f0128d58cace1f5a275d74bdfe5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 26 Aug 2012 15:30:06 -0400 Subject: add .wicd/ --- .wicd/CLIENT_CURSES_WARNING | 6 ++++++ .wicd/WHEREAREMYFILES | 1 + 2 files changed, 7 insertions(+) create mode 100644 .wicd/CLIENT_CURSES_WARNING create mode 120000 .wicd/WHEREAREMYFILES diff --git a/.wicd/CLIENT_CURSES_WARNING b/.wicd/CLIENT_CURSES_WARNING new file mode 100644 index 0000000..c98f13a --- /dev/null +++ b/.wicd/CLIENT_CURSES_WARNING @@ -0,0 +1,6 @@ +The wicd-client script checks for the existence of this file to determine +whether it should warn the user before launching wicd-curses instead, in +the event of the gui client being launched outside of the X Window environment. + +If you delete this file, then wicd-client will print the warning if it is +launched outside of X (and then recreate this file again). diff --git a/.wicd/WHEREAREMYFILES b/.wicd/WHEREAREMYFILES new file mode 120000 index 0000000..5e06b02 --- /dev/null +++ b/.wicd/WHEREAREMYFILES @@ -0,0 +1 @@ +/var/lib/wicd/WHEREAREMYFILES \ No newline at end of file -- cgit v1.1-4-g5e80 From f05b2b29bc7e0273af1e39ef310d5b09f8ea3dbc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 15 Oct 2012 19:42:03 -0400 Subject: add .profile.local --- .profile.local | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .profile.local diff --git a/.profile.local b/.profile.local new file mode 100644 index 0000000..3bb0d5c --- /dev/null +++ b/.profile.local @@ -0,0 +1,11 @@ +#!/bin/sh + +# Start background programs ########################################## +if [ -x "`which daemon`" ]; then + daemon maildirproc + daemon batterymon 20 " + pactl set-sink-volume 0 100%; + pactl set-sink-mute 0 0; + espeak 'PLUG ME IN'; + sleep .2;" +fi -- cgit v1.1-4-g5e80 From abf3957398b2f97ed64c798fc4411b3b50f3880f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 26 Oct 2012 00:22:58 -0400 Subject: consolidate the .local/bin/x-* program-picking code into a `pick` command --- .local/bin/pick | 38 ++++++++++++++++++++++++++++++++++++++ .local/bin/x-pdf | 9 ++------- .local/bin/x-terminal-emulator | 12 +++--------- .local/bin/x-www-browser | 14 ++------------ 4 files changed, 45 insertions(+), 28 deletions(-) create mode 100755 .local/bin/pick diff --git a/.local/bin/pick b/.local/bin/pick new file mode 100755 index 0000000..ed2d44d --- /dev/null +++ b/.local/bin/pick @@ -0,0 +1,38 @@ +#!/bin/bash + +cmd=${0##*/} + +if [[ $1 = -h ]]; then + echo "Usage: $cmd PROG1 PROG2 PROG3..." + echo " $cmd -s PROG1 PROG2 PROG3..." + echo "" + echo "If \`-s' ISN'T given, print the first program name given that is" + echo "found in PATH." + echo "" + echo "If \`-s' IS given, print the first program name given that is" + echo "currently running. If no match is found, fall back to default" + echo "behavior." + exit 0 +fi + +if [[ $1 = -s ]]; then + shift + # Scan to find a running instance + for prog in "$@"; do + if [[ -n "`pgrep $prog`" ]]; then + printf '%s\n' "$prog" + exit 0 + fi + done +fi + +# Scan to find one that is installed +for prog in "$@"; do + if [[ -x "`which $prog 2>/dev/null`" ]]; then + printf '%s\n' "$prog" + exit 0 + fi +done + +printf '%s\n' "$cmd: no suitable program found" +exit 1 diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index a9893c0..1b23a3d 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,9 +1,4 @@ #!/bin/sh -if [ -x "`which okular 2>/dev/null`" ]; then - okular "$@" -elif [ -x "`which evince 2>/dev/null`" ]; then - evince "$@" -elif [ -x "`which xpdf 2>/dev/null`" ]; then - xpdf "$@" -fi +`pick evince okular xpdf` "$@" +exit $? diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator index f7290b4..049b081 100755 --- a/.local/bin/x-terminal-emulator +++ b/.local/bin/x-terminal-emulator @@ -1,10 +1,4 @@ #!/bin/sh -if [ -x "`which emacsterm`" ]; then - emacsterm $@ -elif [ -x "`which urxvt`" ]; then - urxvt $@ -elif [ -x "`which gnome-terminal`" ]; then - gnome-terminal $@ -elif [ -x "`which xterm`"]; then - xterm $@ -fi + +`pick emacsterm urxvt gnome-terminal xterm` "$@" +exit $? diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser index 0ead72a..bbd8943 100755 --- a/.local/bin/x-www-browser +++ b/.local/bin/x-www-browser @@ -1,14 +1,4 @@ #!/bin/sh -list='firefox iceweasel icecat conkeror' - -looking=true -for prog in $list; do - if $looking && [ -n "`pgrep $prog`" ]; then - $prog $@ - looking=false - fi -done -if $looking; then - conkeror $@ -fi +`pick -s conkeror iceweasel icecat firefox` "$@" +exit $? -- cgit v1.1-4-g5e80 From ae988f9679bd17c875501a4100503033071e19f9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 27 Nov 2012 00:11:58 -0500 Subject: use the system xserverrc --- .config/X11/serverrc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) mode change 100644 => 120000 .config/X11/serverrc diff --git a/.config/X11/serverrc b/.config/X11/serverrc deleted file mode 100644 index d6c6ffc..0000000 --- a/.config/X11/serverrc +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -VT=vt07 -#VT=$(tty|sed 's@/dev/tty@vt@') - -exec /usr/bin/X -nolisten tcp "$VT" "$@" diff --git a/.config/X11/serverrc b/.config/X11/serverrc new file mode 120000 index 0000000..ce14133 --- /dev/null +++ b/.config/X11/serverrc @@ -0,0 +1 @@ +/etc/X11/xinit/xserverrc \ No newline at end of file -- cgit v1.1-4-g5e80 From 1e9c2fdf6f8072002ef775a72c794170a7cea915 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 27 Nov 2012 00:12:43 -0500 Subject: largely redo my bash config --- .config/bash/aliases.sh | 3 +- .config/bash/rc.sh | 102 +++++++++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 51 deletions(-) diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index 8241b95..f47bf4c 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -53,7 +53,6 @@ unset redshift ###################################################################### # Some almost-function aliases # ###################################################################### -xterm-title() { echo "];$@"; } # Oh, wait this one *is* a function alias lock="clear; away -C 'This terminal is locked'" -alias plock="xterm-title Terminal Locked;lock" +alias plock="term-title Terminal Locked;lock" mvln() { mv $1 $2; ln -s $2 $1; } diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index ed55f75..bfba6d4 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -1,80 +1,84 @@ # ~/.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 -[ -z "$PS1" ] && return +[[ $- != *i* ]] && return + +# 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 -# don't put duplicate lines in the history. See bash(1) for more options +# 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 export HISTCONTROL=ignoredups export HISTFILE=${XDG_CACHE_HOME}/bash/history export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' 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 +PROMPT_COMMAND='' -# Why is this not on by default? -# "We have a cached value, but it isn't valid anymore. Should we trash it?" -shopt -s checkhash - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x "`which lesspipe 2>/dev/null`" ] && eval "$(SHELL=/bin/sh lesspipe)" +################################################################################ +# Overly complicated setting of PS1 # +################################################################################ -# 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 +# 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" "$*" +} make_prompt() { - local RESET='' - local BOLD='' - local GREEN='' - local BLUE='' - if $1; then - RESET="$(tput sgr0)" - BOLD="$(tput bold)" - GREEN="$(tput setaf 2)" - BLUE="$(tput setaf 4)" - fi - local CHROOT='${debian_chroot:+($debian_chroot)}' - echo "${RESET}${BOLD}${CHROOT}${GREEN}"'\u@\h'"${RESET}:${BOLD}${BLUE}"'\w'"${RESET}" + local _CHROOT='${debian_chroot:+($debian_chroot)}' + echo "${BOLD}${_CHROOT}${GREEN}\u@\h${RESET}${BOLD}${BLUE}:\w${RESET}" } -if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; 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.) - PS1="$(make_prompt true )"'\n\$ ' + RESET="$(tput sgr0)" + BOLD="$(tput bold)" + RED="$(tput setaf 1)" + GREEN="$(tput setaf 2)" + BLUE="$(tput setaf 4)" + + _STATUS="${BOLD}[" + _STATUS+='$(v=$?; if [[ $v = 0 ]]; then c='"'${GREEN}'"'; else c='"${RED}"'; fi; printf %s%03i $c $v)' + _STATUS+="${RESET}${BOLD}]${RESET}" else - PS1="$(make_prompt false)"'\n\$ ' + _STATUS='[$?]' fi - -# If this is an xterm set the title to user@host:dir -case "$TERM" in - xterm*|rxvt*) - PS1="\[\e]0;$(make_prompt false)\a\]$PS1";; -esac - +PS1="${_STATUS} $(make_prompt)"'\n\$ ' +unset RESET BOLD RED GREEN BLUE _STATUS use_color +PS1="$(term-title $(make_prompt))$PS1" unset make_prompt -# Include modular config files -if [ -d "${XDG_CONFIG_HOME}/rc.d" ]; then - for file in "${XDG_CONFIG_HOME}/rc.d"/*.sh; do - . "$file" - done -fi +################################################################################ -if [ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]; then +# Load my alaises +if [[ -f ${XDG_CONFIG_HOME}/bash/aliases.sh ]]; then . ${XDG_CONFIG_HOME}/bash/aliases.sh 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 +# 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 fi -- cgit v1.1-4-g5e80 From 3cfabeec77580bc28db8e4d3ae49c11da31adee3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 27 Nov 2012 00:25:48 -0500 Subject: stuff --- .arduino | 1 + .config/emacs/rc.d | 1 + .config/emacs/rc.el | 1 + .emacs | 1 + .emacs.d/custom.el | 5 ++- .git.info.exclude.in | 1 + .gitconfig | 4 +++ .maildirproc/default.rc | 42 +++++++++++++++---------- .maildirproc/purdue.rc | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ .offlineimaprc | 36 +++++++++++++++++----- .profile | 4 +-- .profile.local | 3 +- .ssh/config | 4 +++ 13 files changed, 157 insertions(+), 28 deletions(-) create mode 120000 .arduino create mode 120000 .config/emacs/rc.d create mode 120000 .config/emacs/rc.el create mode 100644 .maildirproc/purdue.rc diff --git a/.arduino b/.arduino new file mode 120000 index 0000000..25bbfc1 --- /dev/null +++ b/.arduino @@ -0,0 +1 @@ +.config/arduino \ No newline at end of file diff --git a/.config/emacs/rc.d b/.config/emacs/rc.d new file mode 120000 index 0000000..cbf0836 --- /dev/null +++ b/.config/emacs/rc.d @@ -0,0 +1 @@ +../../.emacs.d \ No newline at end of file diff --git a/.config/emacs/rc.el b/.config/emacs/rc.el new file mode 120000 index 0000000..6d539f6 --- /dev/null +++ b/.config/emacs/rc.el @@ -0,0 +1 @@ +../../.emacs \ No newline at end of file diff --git a/.emacs b/.emacs index 3cd2ea3..65634cb 100644 --- a/.emacs +++ b/.emacs @@ -170,6 +170,7 @@ )) (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) ;(require 'flymake) ;(add-hook 'php-mode-hook (lambda() (flymake-mode 1))) diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 5a3e67f..07c8d80 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -12,7 +12,10 @@ '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) '(ruby-deep-arglist nil) '(ruby-deep-indent-paren nil) - '(scroll-bar-mode nil)) + '(safe-local-variable-values (quote ((Nginx-indent-tabs-mode) (Nginx-indent-level . 4) (Nginx-indent-level . 8)))) + '(scroll-bar-mode nil) + '(sh-basic-offset 8) + '(sh-indent-comment t)) (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/.git.info.exclude.in b/.git.info.exclude.in index 612ecf2..cd60859 100644 --- a/.git.info.exclude.in +++ b/.git.info.exclude.in @@ -32,6 +32,7 @@ history *.lock .~lock.*# +*.lock.* lock *.state diff --git a/.gitconfig b/.gitconfig index 9846d72..218b006 100644 --- a/.gitconfig +++ b/.gitconfig @@ -8,3 +8,7 @@ smtpserver = plus.smtp.mail.yahoo.com smtpuser = lukeshu@sbcglobal.net smtpserverport = 465 +[push] + default = matching +[alias] + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc index c2ad6f2..cbdc908 100644 --- a/.maildirproc/default.rc +++ b/.maildirproc/default.rc @@ -10,7 +10,9 @@ def is_to_or_from(mail,address): Return true if [mail] is to or from an address that contains [address]. """ return ( - mail["From"].contains(address) + False + or mail["From"].contains(address) + or mail["Reply-To"].contains(address) or mail.target.contains(address)) def is_to_or_from_re(mail,address): """ @@ -90,6 +92,10 @@ 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"): mail.move(".software.parabola-maintenance") return @@ -97,6 +103,7 @@ def my_filters(mail): 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") ): mail.move(".software.parabola-dev") @@ -166,6 +173,7 @@ def my_filters(mail): "justicejade10@aol.com", "parsonsjade@aol.com", "parsonstjade@gmail.com", + "jadparso@umail.iu.edu", ]: if mail["From"].contains(address): mail.move(".misc.Jade") @@ -190,23 +198,24 @@ def my_filters(mail): # Sort mail from FRC people for address in [ - "jeffreysmith@msdlt.k12.in.us", - "jason.zielke@gmail.com", - "allison.m.babcock@gmail.com", - "william.walk@gmail.com", + "@ni.com", + "@usfirst.org", "BBonahoom@stanleyworks.com", - "wcxctrack829@aim.com", # Pat + "allison.m.babcock@gmail.com", + "bryanbonahoom@gmail.com", + "cdewalt3@yahoo.com", + "dave.nelson@ecolab.com", + "dickaustin190@yahoo.com", "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", - "silioso@gmail.com", - "cdewalt3@yahoo.com", - "bryanbonahoom@gmail.com", + "wcxctrack829@aim.com", # Pat + "william.walk@gmail.com", ]: if is_to_or_from(mail,address): mail.move(".School.Robotics") @@ -224,6 +233,7 @@ def my_filters(mail): # Sort mail from software people for address in [ "gnu.org", + "gnome.org", "eff.org", "gitorious.org", "sourceforge.com", @@ -306,10 +316,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/.maildirproc/purdue.rc b/.maildirproc/purdue.rc new file mode 100644 index 0000000..546b792 --- /dev/null +++ b/.maildirproc/purdue.rc @@ -0,0 +1,82 @@ +# -*- mode: python; -*- + +import subprocess + +processor.maildir_base = "~/Maildir.purdue" +processor.auto_reload_rcfile = True + +def is_to_or_from(mail,address): + """ + Return true if [mail] is to or from an address that contains [address]. + """ + return ( + mail["From"].contains(address) + or mail.target.contains(address)) +def is_to_or_from_re(mail,address): + """ + Return true if [mail] is to or from an address that matches the + regex [address]. + """ + return ( + mail["From"].matches(address) + or mail.target.matches(address)) + +def handle_incoming_ham(mail): + my_filters(mail) + +def handle_incoming_unknown(mail): + # Filter spam + + spam = bogofilter_auto(mail) + if spam == 0: + handle_incoming_spam(mail) + return + elif spam == 1: + handle_incoming_ham(mail) + return + elif spam == 2: + # maybe spam + return + else: + mail.move(".Error") + return + +def my_filters(mail): + if mail["Subject"].contains("[PASE]"): + mail.move("INBOX.PASE") + return + if mail["Subject"].contains("[PLUG]"): + mail.move("INBOX.PLUG") + return + if mail["Subject"].contains("Fall-2012-SCI-21000-001:"): + mail.move("INBOX.classes.SCI210") + if ( + False + or mail["Subject"].contains("[CS Opportunity Update]") + or mail["Subject"].contains("[CS Majors]") + ): + mail.move("INBOX.CS") + return + if is_to_or_from(mail,"linkedin.com"): + mail.move("INBOX.LinkedIn") + return + if mail["Subject"].contains("fall-2012-cs-18000"): + mail.move("INBOX.classes.CS180") + return + if ( + False + or is_to_or_from(mail,"CS 18000 on Piazza") + or mail["Subject"].contains("CS 18000 on Piazza") + ): + mail.move("INBOX.classes.CS180.Piazza") + return + if mail["Subject"].contains("Fall-2012-SOC-10000"): + mail.move("INBOX.classes.SOC100") + return + +handle_mapping = { + "INBOX": handle_incoming_ham, + } +processor.maildirs = handle_mapping.keys() +for mail in processor: + handle_mapping[mail.maildir](mail) diff --git a/.offlineimaprc b/.offlineimaprc index 319593c..8ea8f30 100644 --- a/.offlineimaprc +++ b/.offlineimaprc @@ -1,22 +1,22 @@ # -*- Mode: Conf -*- [general] -accounts = LukeShu +accounts = ATT,Purdue -[Account LukeShu] -localrepository = Local -remoterepository = Remote +## AT&T ############################################################### -[Repository Local] +[Account ATT] +localrepository = Local-Main +remoterepository = Remote-SBCGlobal + +[Repository Local-Main] 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] +[Repository Remote-SBCGlobal] type = IMAP ssl = yes cert_fingerprint = 700d84baa7e852240178dc2de18e7e528a2854df @@ -27,3 +27,23 @@ 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 = 32bdd134cad8da1bea57aa379b98b1cff692e4fd +remotehost = mymail.purdue.edu +remoteuser = shumakl +folderfilter = lambda foldername: re.search('INBOX', foldername) diff --git a/.profile b/.profile index a6c4d91..2d6f370 100644 --- a/.profile +++ b/.profile @@ -43,8 +43,8 @@ if [ -z "$GPGKEY" ] && [ -f "${HOME}/.gnupg/gpg.conf" ]; then export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi if [ -z "$(pgrep -u `whoami` gpg-agent)" ]; then - mkdir -p ${XDG_RUNTIME_DIR}/sessions/gpg - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" + 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 . "${XDG_RUNTIME_DIR}/sessions/gpg" diff --git a/.profile.local b/.profile.local index 3bb0d5c..4ee523a 100644 --- a/.profile.local +++ b/.profile.local @@ -2,7 +2,8 @@ # Start background programs ########################################## if [ -x "`which daemon`" ]; then - daemon maildirproc + daemon -i maildirproc.att maildirproc + daemon -i maildirproc.purdue maildirproc -r .maildirproc/purdue.rc daemon batterymon 20 " pactl set-sink-volume 0 100%; pactl set-sink-mute 0 0; diff --git a/.ssh/config b/.ssh/config index 5c271b5..63519e1 100644 --- a/.ssh/config +++ b/.ssh/config @@ -9,3 +9,7 @@ Host parabola Port 1863 HostName repo.parabolagnulinux.org User repo + +Host lore + HostName lore.cs.purdue.edu + User shumakl -- cgit v1.1-4-g5e80 From 9498321c9b825d57612a2210b4f6490d2757657c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Dec 2012 16:29:04 -0500 Subject: mv .emacs .emacs.d/init.el --- .emacs | 181 ------------------------------------------------------- .emacs.d/init.el | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+), 181 deletions(-) delete mode 100644 .emacs create mode 100644 .emacs.d/init.el diff --git a/.emacs b/.emacs deleted file mode 100644 index 65634cb..0000000 --- a/.emacs +++ /dev/null @@ -1,181 +0,0 @@ -;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(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 -(defun eval-url (url) - (let ((buffer (url-retrieve-synchronously url))) - (save-excursion - (set-buffer buffer) - (goto-char (point-min)) - (re-search-forward "^$" nil 'move) - (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 -(unless (require 'el-get nil t) - (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) - -(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;(load "mdmua") -(load "emacsutils") - -(tool-bar-mode -1) -(ido-mode t) -(show-paren-mode 1) -(setq org-hide-leading-stars t) -(setq org-log-done 'time) -;(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) - - -(setq - backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.emacs.d/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 - show-paren-mode t) - -(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(global-set-key [f11] 'toggle-fullscreen) -(global-set-key "\C-cw" 'global-whitespace-mode) - -;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(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) - )) - -(add-hook 'emacs-lisp-mode-hook - '(lambda () - (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 tab-width 8 ) - (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term - )) - -(add-hook 'ruby-mode-hook - '(lambda () - (set (make-local-variable 'indent-tabs-mode) t) - (set (make-local-variable 'ruby-indent-level) 4) - (set (make-local-variable 'tab-width) 4) - )) - -(add-hook 'coffee-mode-hook - '(lambda () - (set (make-local-variable 'indent-tabs-mode) nil) - )) - -(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) -(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-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) diff --git a/.emacs.d/init.el b/.emacs.d/init.el new file mode 100644 index 0000000..65634cb --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,181 @@ +;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(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 +(defun eval-url (url) + (let ((buffer (url-retrieve-synchronously url))) + (save-excursion + (set-buffer buffer) + (goto-char (point-min)) + (re-search-forward "^$" nil 'move) + (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 +(unless (require 'el-get nil t) + (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) + +(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;(load "mdmua") +(load "emacsutils") + +(tool-bar-mode -1) +(ido-mode t) +(show-paren-mode 1) +(setq org-hide-leading-stars t) +(setq org-log-done 'time) +;(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) + + +(setq + backup-by-copying t ;; don't clobber symlinks + backup-directory-alist '(("." . "~/.emacs.d/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 + show-paren-mode t) + +(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(global-set-key [f11] 'toggle-fullscreen) +(global-set-key "\C-cw" 'global-whitespace-mode) + +;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(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) + )) + +(add-hook 'emacs-lisp-mode-hook + '(lambda () + (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 tab-width 8 ) + (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term + )) + +(add-hook 'ruby-mode-hook + '(lambda () + (set (make-local-variable 'indent-tabs-mode) t) + (set (make-local-variable 'ruby-indent-level) 4) + (set (make-local-variable 'tab-width) 4) + )) + +(add-hook 'coffee-mode-hook + '(lambda () + (set (make-local-variable 'indent-tabs-mode) nil) + )) + +(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-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) -- cgit v1.1-4-g5e80 From c11ba65551852010e112158fd8b28519a8bac0db Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Dec 2012 16:35:30 -0500 Subject: rm the symlinks in .config/emacs --- .config/emacs/rc.d | 1 - .config/emacs/rc.el | 1 - 2 files changed, 2 deletions(-) delete mode 120000 .config/emacs/rc.d delete mode 120000 .config/emacs/rc.el diff --git a/.config/emacs/rc.d b/.config/emacs/rc.d deleted file mode 120000 index cbf0836..0000000 --- a/.config/emacs/rc.d +++ /dev/null @@ -1 +0,0 @@ -../../.emacs.d \ No newline at end of file diff --git a/.config/emacs/rc.el b/.config/emacs/rc.el deleted file mode 120000 index 6d539f6..0000000 --- a/.config/emacs/rc.el +++ /dev/null @@ -1 +0,0 @@ -../../.emacs \ No newline at end of file -- cgit v1.1-4-g5e80 From 0b746ef1515bbede74963535c79dc3e9631be9a1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Dec 2012 16:37:07 -0500 Subject: mv .emacs.d .config/emacs; ln -s .config/emacs .emacs.d --- .config/emacs/.gitignore | 9 +++ .config/emacs/custom.el | 24 ++++++ .config/emacs/emacsutils.el | 13 ++++ .config/emacs/init.el | 181 ++++++++++++++++++++++++++++++++++++++++++++ .emacs.d | 1 + .emacs.d/.gitignore | 9 --- .emacs.d/custom.el | 24 ------ .emacs.d/emacsutils.el | 13 ---- .emacs.d/init.el | 181 -------------------------------------------- 9 files changed, 228 insertions(+), 227 deletions(-) create mode 100644 .config/emacs/.gitignore create mode 100644 .config/emacs/custom.el create mode 100644 .config/emacs/emacsutils.el create mode 100644 .config/emacs/init.el create mode 120000 .emacs.d delete mode 100644 .emacs.d/.gitignore delete mode 100644 .emacs.d/custom.el delete mode 100644 .emacs.d/emacsutils.el delete mode 100644 .emacs.d/init.el diff --git a/.config/emacs/.gitignore b/.config/emacs/.gitignore new file mode 100644 index 0000000..ef4ec20 --- /dev/null +++ b/.config/emacs/.gitignore @@ -0,0 +1,9 @@ +auto-save-list/* +el-get/* +elmo/* +elpa/* +image-dired/* +server/* +session.* +tramp +url/* diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el new file mode 100644 index 0000000..07c8d80 --- /dev/null +++ b/.config/emacs/custom.el @@ -0,0 +1,24 @@ +(custom-set-variables + ;; custom-set-variables 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. + '(custom-enabled-themes (quote (wombat))) + '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(erc-nick "lukeshu") + '(explicit-shell-file-name "/bin/bash") + '(inhibit-startup-screen t) + '(mdmua-maildir "~/Maildir") + '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) + '(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) + '(sh-basic-offset 8) + '(sh-indent-comment t)) +(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. + ) diff --git a/.config/emacs/emacsutils.el b/.config/emacs/emacsutils.el new file mode 100644 index 0000000..966d16e --- /dev/null +++ b/.config/emacs/emacsutils.el @@ -0,0 +1,13 @@ +(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 new file mode 100644 index 0000000..65634cb --- /dev/null +++ b/.config/emacs/init.el @@ -0,0 +1,181 @@ +;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(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 +(defun eval-url (url) + (let ((buffer (url-retrieve-synchronously url))) + (save-excursion + (set-buffer buffer) + (goto-char (point-min)) + (re-search-forward "^$" nil 'move) + (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 +(unless (require 'el-get nil t) + (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) + +(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;(load "mdmua") +(load "emacsutils") + +(tool-bar-mode -1) +(ido-mode t) +(show-paren-mode 1) +(setq org-hide-leading-stars t) +(setq org-log-done 'time) +;(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) + + +(setq + backup-by-copying t ;; don't clobber symlinks + backup-directory-alist '(("." . "~/.emacs.d/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 + show-paren-mode t) + +(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(global-set-key [f11] 'toggle-fullscreen) +(global-set-key "\C-cw" 'global-whitespace-mode) + +;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(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) + )) + +(add-hook 'emacs-lisp-mode-hook + '(lambda () + (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 tab-width 8 ) + (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term + )) + +(add-hook 'ruby-mode-hook + '(lambda () + (set (make-local-variable 'indent-tabs-mode) t) + (set (make-local-variable 'ruby-indent-level) 4) + (set (make-local-variable 'tab-width) 4) + )) + +(add-hook 'coffee-mode-hook + '(lambda () + (set (make-local-variable 'indent-tabs-mode) nil) + )) + +(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-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) diff --git a/.emacs.d b/.emacs.d new file mode 120000 index 0000000..294c1df --- /dev/null +++ b/.emacs.d @@ -0,0 +1 @@ +.config/emacs \ No newline at end of file diff --git a/.emacs.d/.gitignore b/.emacs.d/.gitignore deleted file mode 100644 index ef4ec20..0000000 --- a/.emacs.d/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -auto-save-list/* -el-get/* -elmo/* -elpa/* -image-dired/* -server/* -session.* -tramp -url/* diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el deleted file mode 100644 index 07c8d80..0000000 --- a/.emacs.d/custom.el +++ /dev/null @@ -1,24 +0,0 @@ -(custom-set-variables - ;; custom-set-variables 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. - '(custom-enabled-themes (quote (wombat))) - '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) - '(erc-nick "lukeshu") - '(explicit-shell-file-name "/bin/bash") - '(inhibit-startup-screen t) - '(mdmua-maildir "~/Maildir") - '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) - '(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) - '(sh-basic-offset 8) - '(sh-indent-comment t)) -(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. - ) diff --git a/.emacs.d/emacsutils.el b/.emacs.d/emacsutils.el deleted file mode 100644 index 966d16e..0000000 --- a/.emacs.d/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/.emacs.d/init.el b/.emacs.d/init.el deleted file mode 100644 index 65634cb..0000000 --- a/.emacs.d/init.el +++ /dev/null @@ -1,181 +0,0 @@ -;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(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 -(defun eval-url (url) - (let ((buffer (url-retrieve-synchronously url))) - (save-excursion - (set-buffer buffer) - (goto-char (point-min)) - (re-search-forward "^$" nil 'move) - (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 -(unless (require 'el-get nil t) - (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) - -(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;(load "mdmua") -(load "emacsutils") - -(tool-bar-mode -1) -(ido-mode t) -(show-paren-mode 1) -(setq org-hide-leading-stars t) -(setq org-log-done 'time) -;(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) - - -(setq - backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.emacs.d/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 - show-paren-mode t) - -(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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(global-set-key [f11] 'toggle-fullscreen) -(global-set-key "\C-cw" 'global-whitespace-mode) - -;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(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) - )) - -(add-hook 'emacs-lisp-mode-hook - '(lambda () - (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 tab-width 8 ) - (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term - )) - -(add-hook 'ruby-mode-hook - '(lambda () - (set (make-local-variable 'indent-tabs-mode) t) - (set (make-local-variable 'ruby-indent-level) 4) - (set (make-local-variable 'tab-width) 4) - )) - -(add-hook 'coffee-mode-hook - '(lambda () - (set (make-local-variable 'indent-tabs-mode) nil) - )) - -(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) -(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-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) -- cgit v1.1-4-g5e80 From 906b645cdb3286076affbb942ff23d99e409db86 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 10:42:16 -0500 Subject: enlarge Bash's HISTSIZE (500 -> 5000) --- .config/bash/rc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index bfba6d4..faf8116 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -21,6 +21,7 @@ shopt -s checkhash export HISTCONTROL=ignoredups export HISTFILE=${XDG_CACHE_HOME}/bash/history export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' +export HISTSIZE=5000 shopt -s histappend # append to the history file, don't overwrite it mkdir -p "${HISTFILE%/*}" -- cgit v1.1-4-g5e80 From 2b4d180dc87571e8650f4d7998f98b69b4519ee9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 10:44:21 -0500 Subject: mess with emacs color themes --- .config/emacs/custom.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 07c8d80..40516e3 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -3,8 +3,8 @@ ;; 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. - '(custom-enabled-themes (quote (wombat))) - '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(custom-enabled-themes (quote (zenburn))) + '(custom-safe-themes (quote ("1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") '(inhibit-startup-screen t) -- cgit v1.1-4-g5e80 From 6c00940af5265238bbeae7efce8e334d92771848 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 10:44:44 -0500 Subject: use mailcrypt with wanderlust --- .config/emacs/init.el | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 65634cb..c026dd7 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -58,6 +58,34 @@ ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(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") -- cgit v1.1-4-g5e80 From af5f17aa5ae91e507c454dd65996934d76103084 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 10:53:47 -0500 Subject: don't track gimp --- .git.info.exclude.in | 1 + 1 file changed, 1 insertion(+) diff --git a/.git.info.exclude.in b/.git.info.exclude.in index cd60859..4db3ff0 100644 --- a/.git.info.exclude.in +++ b/.git.info.exclude.in @@ -103,5 +103,6 @@ lock .config/libreoffice .config/transmission .eclipse +.gimp-* .mozilla .netbeans -- cgit v1.1-4-g5e80 From 9cff97ea2560cb7c7b5d57eb228d173f703a0666 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Jan 2013 10:55:51 -0500 Subject: speed up `make .git.info.exclude` --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 160a64c..f6dcd17 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ clean: .folders: Maildir ( echo '..'; find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' -.git.info.exclude: .git.info.exclude.in . - ( cat $<; find . -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ +.git.info.exclude: .git.info.exclude.in $(shell echo .??*/) + ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ .crontab.cookie: .crontab .crontab.local -(cat $^; echo) | crontab - 2>/dev/null -- cgit v1.1-4-g5e80 From 226a456dc05274e6ab1eb74769c9b06db8b461af Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 26 Jan 2013 22:01:53 -0500 Subject: change for new urxvt --- .config/X11/defaults | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/X11/defaults b/.config/X11/defaults index ceabc5c..07d35b4 100644 --- a/.config/X11/defaults +++ b/.config/X11/defaults @@ -14,5 +14,5 @@ URxvt.scrollTtyKeypress: false URxvt.scrollWithBuffer: true URxvt.perl-ext-common: default,matcher -URxvt.urlLauncher: v-www-browser +URxvt.url-launcher: v-www-browser URxvt.matcher.button: 1 -- cgit v1.1-4-g5e80 From f2282f6cc0011fc761986c0e3b4e3735d4629e81 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 26 Jan 2013 22:02:06 -0500 Subject: avoid bug in sed 4.2.2 --- .config/bash/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index f47bf4c..0964a83 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -37,7 +37,7 @@ alias l='ls -CF' ###################################################################### #alias rm='gvfs-trash' alias ssh='ssh -XC' -alias sed='sed --follow-symlinks' +#alias sed='sed --follow-symlinks' # breaks sed 4.2.2 alias tree='tree --charset utf8' alias cd=pushd alias gitk='gitk --all --date-order' -- cgit v1.1-4-g5e80 From 7b5d6d5f2e9be95cd1acdc5eb07f4487da8a1f64 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 14:43:14 -0500 Subject: mv .wmii .config/wmii; ln -s .config/wmii .wmii --- .config/wmii/autostart | 11 ++ .config/wmii/config.sh | 249 ++++++++++++++++++++++++++++++++++++++ .config/wmii/ctl-init | 5 + .config/wmii/fixes.sh | 24 ++++ .config/wmii/help-events | 3 + .config/wmii/help-keys | 3 + .config/wmii/include.sh | 11 ++ .config/wmii/quit | 3 + .config/wmii/rbar_battery | 9 ++ .config/wmii/rbar_clock | 9 ++ .config/wmii/rbar_cpu | 12 ++ .config/wmii/rbar_wifi | 9 ++ .config/wmii/tagrules | 3 + .config/wmii/theme-solarized | 16 +++ .config/wmii/theme-solarized-dark | 12 ++ .config/wmii/util.sh | 128 ++++++++++++++++++++ .config/wmii/wmiirc | 12 ++ .wmii | 1 + .wmii/autostart | 11 -- .wmii/config.sh | 249 -------------------------------------- .wmii/ctl-init | 5 - .wmii/fixes.sh | 24 ---- .wmii/help-events | 3 - .wmii/help-keys | 3 - .wmii/include.sh | 11 -- .wmii/quit | 3 - .wmii/rbar_battery | 9 -- .wmii/rbar_clock | 9 -- .wmii/rbar_cpu | 12 -- .wmii/rbar_wifi | 9 -- .wmii/tagrules | 3 - .wmii/theme-solarized | 16 --- .wmii/theme-solarized-dark | 12 -- .wmii/util.sh | 128 -------------------- .wmii/wmiirc | 12 -- 35 files changed, 520 insertions(+), 519 deletions(-) create mode 100755 .config/wmii/autostart create mode 100644 .config/wmii/config.sh create mode 100644 .config/wmii/ctl-init create mode 100644 .config/wmii/fixes.sh create mode 100755 .config/wmii/help-events create mode 100755 .config/wmii/help-keys create mode 100644 .config/wmii/include.sh create mode 100755 .config/wmii/quit create mode 100755 .config/wmii/rbar_battery create mode 100755 .config/wmii/rbar_clock create mode 100755 .config/wmii/rbar_cpu create mode 100755 .config/wmii/rbar_wifi create mode 100644 .config/wmii/tagrules create mode 100644 .config/wmii/theme-solarized create mode 100644 .config/wmii/theme-solarized-dark create mode 100644 .config/wmii/util.sh create mode 100755 .config/wmii/wmiirc create mode 120000 .wmii delete mode 100755 .wmii/autostart delete mode 100644 .wmii/config.sh delete mode 100644 .wmii/ctl-init delete mode 100644 .wmii/fixes.sh delete mode 100755 .wmii/help-events delete mode 100755 .wmii/help-keys delete mode 100644 .wmii/include.sh delete mode 100755 .wmii/quit delete mode 100755 .wmii/rbar_battery delete mode 100755 .wmii/rbar_clock delete mode 100755 .wmii/rbar_cpu delete mode 100755 .wmii/rbar_wifi delete mode 100644 .wmii/tagrules delete mode 100644 .wmii/theme-solarized delete mode 100644 .wmii/theme-solarized-dark delete mode 100644 .wmii/util.sh delete mode 100755 .wmii/wmiirc diff --git a/.config/wmii/autostart b/.config/wmii/autostart new file mode 100755 index 0000000..d95ce34 --- /dev/null +++ b/.config/wmii/autostart @@ -0,0 +1,11 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +daemon lxpanel &> /dev/null +daemon nm-applet &> /dev/null +daemon notifyd &> /dev/null + +#Action rbar_cpu 01 & +#Action rbar_wifi 97 & +Action rbar_battery 98 & +Action rbar_clock 99 & diff --git a/.config/wmii/config.sh b/.config/wmii/config.sh new file mode 100644 index 0000000..1dac0ad --- /dev/null +++ b/.config/wmii/config.sh @@ -0,0 +1,249 @@ +#!/bin/bash + +MODKEY=Mod4 # "super" +UP=p +DOWN=n +LEFT=b +RIGHT=f + +HIST="`conffile history`" + +# Colors tuples: " " +. `conffile theme-solarized-dark` + +Event() { + event=$1; shift; + case "$event" in + ## Mouse event meanings: + ## MouseDown = mouse down + ## Click = mouse up + ## DND = hover, while dragging something (Drag 'n' Drop) + ## The associated mouse button is always "1" + ## + ## Mouse-button IDs: + ## 1 = left + ## 2 = middle + ## 3 = right + + ## Custom (non-WMII-generated) events + WmiircStart) ## No args + echo ' ==> Starting wmiirc' + is_mounted $WMII_DIR && Event WmiircUnmount + Event WmiircMount + + # Configure wmii + < "`conffile tagrules`" expand_variables >> $WMII_DIR/tagrules + < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl + scansection Key | cut -sf2 >> $WMII_DIR/keys + # Configure X11 + xsetroot -solid "$WMII_BACKGROUND" + + # Clear the LBar and RBar + find $WMII_DIR/{l,r}bar -type f -delete + # Populate the LBar by emulating [Create|Focus]Tag events + seltag=`sed 1q $WMII_DIR/tag/sel/ctl` + lstags | while read tag; do + Event CreateTag "$tag" + if [ "$tag" = "$seltag" ]; then + Event FocusTag "$tag" + fi + done + + # Run the autostart action + Action autostart 2>/dev/null & + ;; + WmiircQuit) ## No args + echo ' ==> Stopping wmiirc' + exit;; + WmiircMount) ## No args + echo " -> Creating mountpoint WMII_DIR=$WMII_DIR..." + mkdir -p "$WMII_DIR" + echo " -> Mounting WMII_DIR=$WMII_DIR..." + 9mount -i "unix!$WMII_NAMESPACE/wmii" "$WMII_DIR";; + WmiircUnmount) ## No args + echo " -> Unmounting WMII_DIR=$WMII_DIR..." + 9umount "$WMII_DIR" + echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..." + rmdir "$WMII_DIR";; + ## WMII-meta events + Quit) ## No args + echo ' ==> wmii quit: unmounting' + trap - EXIT + Event WmiircUnmount + Event WmiircQuit;; + Warning) ## $@=string + notify-send "wmii warning: $*";; + Key) ## $1=keystroke + Key "$@";; + + ## WMII Window management events + FocusFloating) ## No args + ;; + AreaFocus) ## $1=area + ;; + DestroyArea) ## $1=area + ;; + ColumnFocus) ## $1=column + ;; + CreateColumn) ## $1=column + ;; + + ## Client events + CreateClient) ## $1=client + ;; + DestroyClient) ## $1=client + ;; + Urgent) ## $1=client $2=[Manager|Client] + ;; + NotUrgent) ## $1=client $2=[Manager|Client] + ;; + ClientMouseDown) ## $1=client $2=button + client=$1 + button=$2 + case $button in + 1) ;; + 2) ;; + 3) + { + case `wmii9menu Delete Fullscreen` in + Delete) + echo kill >> $WMII_DIR/client/$client/ctl;; + Fullscreen) + echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; + esac + }& ;; + esac;; + ClientClick) ## $1=client $2=button + ;; + Unresponsive) ## $1=client + client=$1 + client_name=`cat $WMII_DIR/client/$client/label` + msg="The client \`${client_name}' is not responding." + msg+=" What would you like to do?" + { + resp=$(wihack -transient $client \ + xmessage -nearmouse -buttons Kill,Wait -print "$msg") + if [ "$resp" = Kill ]; then + echo slay >> $WMII_DIR/client/$client/ctl + fi + }& ;; + Fullscreen) ## $1=client $2=[on|off] + # TODO: hide any clients with the 'panel' class + ;; + + ## Tag events + CreateTag) ## $1=tag + echo "$WMII_NORMCOLORS" $@ >> $WMII_DIR/lbar/$1;; + DestroyTag) ## $1=tag + rm $WMII_DIR/lbar/$1;; + FocusTag) ## $1=tag + echo "$WMII_FOCUSCOLORS" $1 >> $WMII_DIR/lbar/$1;; + UnfocusTag) ## $1=tag + echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; + UrgentTag) ## $1=tag $2=[Manager|Client] + echo "$WMII_URGENTCOLORS" $1 >> $WMII_DIR/lbar/$1;; + NotUrgentTag) ## $1=tag $2=[Manager|Client] + echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; + + ## LeftBar events (usually tag buttons) + LeftBarMouseDown) ## $1=button $2=bar_item + ;; + LeftBarClick) ## $1=button $2=bar_item + shift # ignore the button + echo view "$@" >> $WMII_DIR/ctl;; + LeftMouseDND) ## $1=button $2=bar_item + Event LeftBarClick "$@";; + + ## RightBar events + RightBarMouseDown) ## $1=button $2=bar_item + ;; + RightBarClick) ## $1=button $2=bar_item + ;; + RightMouseDND) ## $1=button $2=bar_item + Event RightBarClick "$@";; + esac +} ## End Event + +# Key Bindings +Key() { + key=$1 + case "$key" in + ## Moving around + + $MODKEY-$LEFT) ## Select the client to the left + echo select left >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-$RIGHT) ## Select the client to the right + echo select right >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-$UP) ## Select the client above + echo select up >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-$DOWN) ## Select the client below + echo select down >> $WMII_DIR/tag/sel/ctl;; + + $MODKEY-space) ## Toggle between floating and managed layers + echo select toggle >> $WMII_DIR/tag/sel/ctl;; + + ## Moving clients around + + $MODKEY-Shift-$LEFT) ## Move selected client to the left + echo send sel left >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Shift-$RIGHT) ## Move selected client to the right + echo send sel right >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Shift-$UP) ## Move selected client up + echo send sel up >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Shift-$DOWN) ## Move selected client down + echo send sel down >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Shift-space) ## Toggle selected client between floating and managed layers + echo send sel toggle >> $WMII_DIR/tag/sel/ctl;; + + ## Moving through stacks + $MODKEY-Control-$UP) ## Select the stack above + echo select up stack >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-Control-$DOWN) ## Select the stack below + echo select down stack >> $WMII_DIR/tag/sel/ctl;; + + ## Client actions + $MODKEY-shift-1) ## Toggle selected client's fullsceen state + echo Fullscreen toggle >> $WMII_DIR/client/sel/ctl;; + $MODKEY-shift-0) ## Close client + echo kill >> $WMII_DIR/client/sel/ctl;; + + ## Changing column modes + $MODKEY-d) ## Set column to default mode + echo colmode sel default-max >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-s) ## Set column to stack mode + echo colmode sel stack-max >> $WMII_DIR/tag/sel/ctl;; + $MODKEY-m) ## Set column to max mode + echo colmode sel stack+max >> $WMII_DIR/tag/sel/ctl;; + + ## Running programs + $MODKEY-a) ## Open wmii actions menu + Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;; + $MODKEY-x) ## Open program menu + setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;; + $MODKEY-Return) ## Launch a terminal + setsid 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 + }& ;; + $MODKEY-Shift-t) ## Retag the selected client + sel=$(sed 1q $WMII_DIR/client/sel/ctl) + { + 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 + if [ -n "$prog" ]; then + "$prog" "$@" + return $? + else + return 1 + fi +} ## End Action diff --git a/.config/wmii/ctl-init b/.config/wmii/ctl-init new file mode 100644 index 0000000..026c0d5 --- /dev/null +++ b/.config/wmii/ctl-init @@ -0,0 +1,5 @@ +font xft:Monospace-8 +focuscolors $WMII_FOCUSCOLORS +normcolors $WMII_NORMCOLORS +grabmod $MODKEY +border 1 diff --git a/.config/wmii/fixes.sh b/.config/wmii/fixes.sh new file mode 100644 index 0000000..aa09157 --- /dev/null +++ b/.config/wmii/fixes.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Fix various deficiencies in either the shell or the filesystem + +## +# Usage: ls DIRECTORY +# Linux's 9p kernel module sometimes omits entries in directory listings +## +unalias ls &>/dev/null +ls() { + 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/help-events b/.config/wmii/help-events new file mode 100755 index 0000000..25b7d41 --- /dev/null +++ b/.config/wmii/help-events @@ -0,0 +1,3 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" +scansection Event | xmessage -file - diff --git a/.config/wmii/help-keys b/.config/wmii/help-keys new file mode 100755 index 0000000..c6e7038 --- /dev/null +++ b/.config/wmii/help-keys @@ -0,0 +1,3 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" +scansection Key | xmessage -file - diff --git a/.config/wmii/include.sh b/.config/wmii/include.sh new file mode 100644 index 0000000..d4e58c3 --- /dev/null +++ b/.config/wmii/include.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ -z "$WMII_NAMESPACE" ]; then + export WMII_NAMESPACE="`wmiir namespace`" +fi +if [ -z "$WMII_DIR" ]; then + export WMII_DIR="$HOME/n/wmii" +fi + +. "$HOME/.wmii/util.sh" +. "$HOME/.wmii/config.sh" diff --git a/.config/wmii/quit b/.config/wmii/quit new file mode 100755 index 0000000..876a60e --- /dev/null +++ b/.config/wmii/quit @@ -0,0 +1,3 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" +echo quit >> $WMII_DIR/ctl diff --git a/.config/wmii/rbar_battery b/.config/wmii/rbar_battery new file mode 100755 index 0000000..ae8980a --- /dev/null +++ b/.config/wmii/rbar_battery @@ -0,0 +1,9 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +priority=$1 + +while connected_to_x_server; do + acpi -b >> "$WMII_DIR/rbar/${priority}_battery" + sleep 1 +done diff --git a/.config/wmii/rbar_clock b/.config/wmii/rbar_clock new file mode 100755 index 0000000..18c4493 --- /dev/null +++ b/.config/wmii/rbar_clock @@ -0,0 +1,9 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +priority=$1 + +while connected_to_x_server; do + date >> "$WMII_DIR/rbar/${priority}_clock" + sleep .5 +done diff --git a/.config/wmii/rbar_cpu b/.config/wmii/rbar_cpu new file mode 100755 index 0000000..22da985 --- /dev/null +++ b/.config/wmii/rbar_cpu @@ -0,0 +1,12 @@ +#!/bin/bash +. "$HOME/.wmii/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 '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/rbar_wifi b/.config/wmii/rbar_wifi new file mode 100755 index 0000000..2ada834 --- /dev/null +++ b/.config/wmii/rbar_wifi @@ -0,0 +1,9 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +priority=$1 + +while connected_to_x_server; do + echo 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi" + sleep 1 +done diff --git a/.config/wmii/tagrules b/.config/wmii/tagrules new file mode 100644 index 0000000..990151f --- /dev/null +++ b/.config/wmii/tagrules @@ -0,0 +1,3 @@ +/Emacs|Navigator/ -> +sel +/Eclipse/ -> +sel +/panel/ -> /.*/ diff --git a/.config/wmii/theme-solarized b/.config/wmii/theme-solarized new file mode 100644 index 0000000..5dc830d --- /dev/null +++ b/.config/wmii/theme-solarized @@ -0,0 +1,16 @@ +SOL_BASE03='#002b36' +SOL_BASE02='#073642' +SOL_BASE01='#586e75' +SOL_BASE00='#657b83' +SOL_BASE0='#839496' +SOL_BASE1='#93a1a1' +SOL_BASE2='#eee8d5' +SOL_BASE3='#fdf6e3' +SOL_YELLOW='#b58900' +SOL_ORANGE='#cb4b16' +SOL_RED='#dc322f' +SOL_MAGENTA='#d33682' +SOL_VIOLET='#6c71c4' +SOL_BLUE='#268bd2' +SOL_CYAN='#2aa198' +SOL_GREEN='#859900' diff --git a/.config/wmii/theme-solarized-dark b/.config/wmii/theme-solarized-dark new file mode 100644 index 0000000..83285ba --- /dev/null +++ b/.config/wmii/theme-solarized-dark @@ -0,0 +1,12 @@ +#!/bin/sh +# Solarized-dark + +. $HOME/.wmii/theme-solarized + +WMII_BACKGROUND="$SOL_BASE02" + +# =" " +WMII_NORMCOLORS="$SOL_BASE0 $SOL_BASE03 $SOL_BASE02" +WMII_FOCUSCOLORS="$SOL_BASE0 $SOL_BASE02 $SOL_BASE0" +WMII_URGENTCOLORS="$SOL_RED $SOL_BASE03 $SOL_RED" + diff --git a/.config/wmii/util.sh b/.config/wmii/util.sh new file mode 100644 index 0000000..43d7d4a --- /dev/null +++ b/.config/wmii/util.sh @@ -0,0 +1,128 @@ +#!/bin/bash + +# I moved "fixes" into a separate file because it isn't so much configuration... +. "$HOME/.wmii/fixes.sh" + +################################################################################ +# Added shell features # +################################################################################ + +## +# Usage: dquote STRING +# Safely double-quotes a string. +# It escapes ways to execute code, but not variables. +## +dquote() { + str=$1 + str="${str//\\/\\\\}" # backslash + str="${str//\"/\\\"}" # dquote + str="${str//\$(/\\\$(}" # $(...) + str="${str//\`/\\\`}" # backtick + printf '"%s"\n' "$str" +} + +## +# Usage: expand_variables +# Expands variables read from /dev/stdin +## +expand_variables() { + while read; do + eval printf "'%s\n'" "$(dquote "$REPLY")" + done +} + +is_mounted() { + dir="$(readlink -m $1)" + mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -- "$dir")" + [[ $dir = "$mntpnt" ]] + return $? +} + +################################################################################ +# PATH manipulation # +################################################################################ + +## +# Usage: path_ls PATH +# List executables in PATH (PATH is delimited by `:') +## +path_ls() { + dirs="`echo "$@"|sed 'y/:/ /'`" + find -L $dirs -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null | sort -u +} + +## +# Usage: path_which PATH PROGRAM +# Find the full path of PROGRAM by searching PATH +## +path_which() { + mypath=$1 + prog=$2 + which=`which which` + PATH="$mypath" "$which" -- "$prog" 2>/dev/null +} + +################################################################################ +# wmii convenience functions # +################################################################################ + +## +# Usage: lstags +# Lists wmii tags +## +lstags() { + ls $WMII_DIR/tag | sed -e 's@/@@' -e '/^sel$/d' +} + +################################################################################ +# X11 functions # +################################################################################ + +## +# Usage: connected_to_x_server +# Return status indicates whether there is an X server at $DISPLAY +## +connected_to_x_server() { + xdpyinfo &>/dev/null + return $? +} + +################################################################################ +# My wmii configuration # +################################################################################ + +## +# Usage: scansection [SECTION] +# Reads the doc comments from a section of wmiirc. +# If SECTION is not given, it reads all doc comments. +## +scansection() { + file=`conffile config.sh` + sec=$1 + tmp=`mktemp` + # Isolate the sections we want. + if [ -n "$sec" ]; then + # Find the section + < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> $tmp + else + # Remove extra lines that mark the end of a section + < "$file" sed "/\s*}\s*##\s*End\s/d" > $tmp + fi + < $tmp sed -n '/##/p' | while read; do + var="$(echo "$REPLY" | sed -nr 's/^\s*(.*)\)\s*##.*/\1/p')" + comment="$(echo "$REPLY" | sed -r 's/.*## ?//')" + if [ -z "$var" ]; then + printf '%s\n' "$comment" + else + printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment" + fi + done + rm $tmp +} + +## +# Usage: conffile FILE +## +conffile() { + echo "$HOME/.wmii/$@" +} diff --git a/.config/wmii/wmiirc b/.config/wmii/wmiirc new file mode 100755 index 0000000..1f1ea18 --- /dev/null +++ b/.config/wmii/wmiirc @@ -0,0 +1,12 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +wmiir xwrite /event WmiircQuit # close any existing wmiirc's + +Event WmiircStart + +trap "Event Quit" EXIT + +wmiir read /event 2>/dev/null | while read event; do + Event $event +done diff --git a/.wmii b/.wmii new file mode 120000 index 0000000..e291b06 --- /dev/null +++ b/.wmii @@ -0,0 +1 @@ +.config/wmii \ No newline at end of file diff --git a/.wmii/autostart b/.wmii/autostart deleted file mode 100755 index d95ce34..0000000 --- a/.wmii/autostart +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" - -daemon lxpanel &> /dev/null -daemon nm-applet &> /dev/null -daemon notifyd &> /dev/null - -#Action rbar_cpu 01 & -#Action rbar_wifi 97 & -Action rbar_battery 98 & -Action rbar_clock 99 & diff --git a/.wmii/config.sh b/.wmii/config.sh deleted file mode 100644 index 1dac0ad..0000000 --- a/.wmii/config.sh +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/bash - -MODKEY=Mod4 # "super" -UP=p -DOWN=n -LEFT=b -RIGHT=f - -HIST="`conffile history`" - -# Colors tuples: " " -. `conffile theme-solarized-dark` - -Event() { - event=$1; shift; - case "$event" in - ## Mouse event meanings: - ## MouseDown = mouse down - ## Click = mouse up - ## DND = hover, while dragging something (Drag 'n' Drop) - ## The associated mouse button is always "1" - ## - ## Mouse-button IDs: - ## 1 = left - ## 2 = middle - ## 3 = right - - ## Custom (non-WMII-generated) events - WmiircStart) ## No args - echo ' ==> Starting wmiirc' - is_mounted $WMII_DIR && Event WmiircUnmount - Event WmiircMount - - # Configure wmii - < "`conffile tagrules`" expand_variables >> $WMII_DIR/tagrules - < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl - scansection Key | cut -sf2 >> $WMII_DIR/keys - # Configure X11 - xsetroot -solid "$WMII_BACKGROUND" - - # Clear the LBar and RBar - find $WMII_DIR/{l,r}bar -type f -delete - # Populate the LBar by emulating [Create|Focus]Tag events - seltag=`sed 1q $WMII_DIR/tag/sel/ctl` - lstags | while read tag; do - Event CreateTag "$tag" - if [ "$tag" = "$seltag" ]; then - Event FocusTag "$tag" - fi - done - - # Run the autostart action - Action autostart 2>/dev/null & - ;; - WmiircQuit) ## No args - echo ' ==> Stopping wmiirc' - exit;; - WmiircMount) ## No args - echo " -> Creating mountpoint WMII_DIR=$WMII_DIR..." - mkdir -p "$WMII_DIR" - echo " -> Mounting WMII_DIR=$WMII_DIR..." - 9mount -i "unix!$WMII_NAMESPACE/wmii" "$WMII_DIR";; - WmiircUnmount) ## No args - echo " -> Unmounting WMII_DIR=$WMII_DIR..." - 9umount "$WMII_DIR" - echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..." - rmdir "$WMII_DIR";; - ## WMII-meta events - Quit) ## No args - echo ' ==> wmii quit: unmounting' - trap - EXIT - Event WmiircUnmount - Event WmiircQuit;; - Warning) ## $@=string - notify-send "wmii warning: $*";; - Key) ## $1=keystroke - Key "$@";; - - ## WMII Window management events - FocusFloating) ## No args - ;; - AreaFocus) ## $1=area - ;; - DestroyArea) ## $1=area - ;; - ColumnFocus) ## $1=column - ;; - CreateColumn) ## $1=column - ;; - - ## Client events - CreateClient) ## $1=client - ;; - DestroyClient) ## $1=client - ;; - Urgent) ## $1=client $2=[Manager|Client] - ;; - NotUrgent) ## $1=client $2=[Manager|Client] - ;; - ClientMouseDown) ## $1=client $2=button - client=$1 - button=$2 - case $button in - 1) ;; - 2) ;; - 3) - { - case `wmii9menu Delete Fullscreen` in - Delete) - echo kill >> $WMII_DIR/client/$client/ctl;; - Fullscreen) - echo Fullscreen on >> $WMII_DIR/client/$1/ctl;; - esac - }& ;; - esac;; - ClientClick) ## $1=client $2=button - ;; - Unresponsive) ## $1=client - client=$1 - client_name=`cat $WMII_DIR/client/$client/label` - msg="The client \`${client_name}' is not responding." - msg+=" What would you like to do?" - { - resp=$(wihack -transient $client \ - xmessage -nearmouse -buttons Kill,Wait -print "$msg") - if [ "$resp" = Kill ]; then - echo slay >> $WMII_DIR/client/$client/ctl - fi - }& ;; - Fullscreen) ## $1=client $2=[on|off] - # TODO: hide any clients with the 'panel' class - ;; - - ## Tag events - CreateTag) ## $1=tag - echo "$WMII_NORMCOLORS" $@ >> $WMII_DIR/lbar/$1;; - DestroyTag) ## $1=tag - rm $WMII_DIR/lbar/$1;; - FocusTag) ## $1=tag - echo "$WMII_FOCUSCOLORS" $1 >> $WMII_DIR/lbar/$1;; - UnfocusTag) ## $1=tag - echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; - UrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_URGENTCOLORS" $1 >> $WMII_DIR/lbar/$1;; - NotUrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_NORMCOLORS" $1 >> $WMII_DIR/lbar/$1;; - - ## LeftBar events (usually tag buttons) - LeftBarMouseDown) ## $1=button $2=bar_item - ;; - LeftBarClick) ## $1=button $2=bar_item - shift # ignore the button - echo view "$@" >> $WMII_DIR/ctl;; - LeftMouseDND) ## $1=button $2=bar_item - Event LeftBarClick "$@";; - - ## RightBar events - RightBarMouseDown) ## $1=button $2=bar_item - ;; - RightBarClick) ## $1=button $2=bar_item - ;; - RightMouseDND) ## $1=button $2=bar_item - Event RightBarClick "$@";; - esac -} ## End Event - -# Key Bindings -Key() { - key=$1 - case "$key" in - ## Moving around - - $MODKEY-$LEFT) ## Select the client to the left - echo select left >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-$RIGHT) ## Select the client to the right - echo select right >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-$UP) ## Select the client above - echo select up >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-$DOWN) ## Select the client below - echo select down >> $WMII_DIR/tag/sel/ctl;; - - $MODKEY-space) ## Toggle between floating and managed layers - echo select toggle >> $WMII_DIR/tag/sel/ctl;; - - ## Moving clients around - - $MODKEY-Shift-$LEFT) ## Move selected client to the left - echo send sel left >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-Shift-$RIGHT) ## Move selected client to the right - echo send sel right >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-Shift-$UP) ## Move selected client up - echo send sel up >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-Shift-$DOWN) ## Move selected client down - echo send sel down >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-Shift-space) ## Toggle selected client between floating and managed layers - echo send sel toggle >> $WMII_DIR/tag/sel/ctl;; - - ## Moving through stacks - $MODKEY-Control-$UP) ## Select the stack above - echo select up stack >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-Control-$DOWN) ## Select the stack below - echo select down stack >> $WMII_DIR/tag/sel/ctl;; - - ## Client actions - $MODKEY-shift-1) ## Toggle selected client's fullsceen state - echo Fullscreen toggle >> $WMII_DIR/client/sel/ctl;; - $MODKEY-shift-0) ## Close client - echo kill >> $WMII_DIR/client/sel/ctl;; - - ## Changing column modes - $MODKEY-d) ## Set column to default mode - echo colmode sel default-max >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-s) ## Set column to stack mode - echo colmode sel stack-max >> $WMII_DIR/tag/sel/ctl;; - $MODKEY-m) ## Set column to max mode - echo colmode sel stack+max >> $WMII_DIR/tag/sel/ctl;; - - ## Running programs - $MODKEY-a) ## Open wmii actions menu - Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;; - $MODKEY-x) ## Open program menu - setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;; - $MODKEY-Return) ## Launch a terminal - setsid 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 - }& ;; - $MODKEY-Shift-t) ## Retag the selected client - sel=$(sed 1q $WMII_DIR/client/sel/ctl) - { - 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 - if [ -n "$prog" ]; then - "$prog" "$@" - return $? - else - return 1 - fi -} ## End Action diff --git a/.wmii/ctl-init b/.wmii/ctl-init deleted file mode 100644 index 026c0d5..0000000 --- a/.wmii/ctl-init +++ /dev/null @@ -1,5 +0,0 @@ -font xft:Monospace-8 -focuscolors $WMII_FOCUSCOLORS -normcolors $WMII_NORMCOLORS -grabmod $MODKEY -border 1 diff --git a/.wmii/fixes.sh b/.wmii/fixes.sh deleted file mode 100644 index aa09157..0000000 --- a/.wmii/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() { - 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/.wmii/help-events b/.wmii/help-events deleted file mode 100755 index 25b7d41..0000000 --- a/.wmii/help-events +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" -scansection Event | xmessage -file - diff --git a/.wmii/help-keys b/.wmii/help-keys deleted file mode 100755 index c6e7038..0000000 --- a/.wmii/help-keys +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" -scansection Key | xmessage -file - diff --git a/.wmii/include.sh b/.wmii/include.sh deleted file mode 100644 index d4e58c3..0000000 --- a/.wmii/include.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ -z "$WMII_NAMESPACE" ]; then - export WMII_NAMESPACE="`wmiir namespace`" -fi -if [ -z "$WMII_DIR" ]; then - export WMII_DIR="$HOME/n/wmii" -fi - -. "$HOME/.wmii/util.sh" -. "$HOME/.wmii/config.sh" diff --git a/.wmii/quit b/.wmii/quit deleted file mode 100755 index 876a60e..0000000 --- a/.wmii/quit +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" -echo quit >> $WMII_DIR/ctl diff --git a/.wmii/rbar_battery b/.wmii/rbar_battery deleted file mode 100755 index ae8980a..0000000 --- a/.wmii/rbar_battery +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" - -priority=$1 - -while connected_to_x_server; do - acpi -b >> "$WMII_DIR/rbar/${priority}_battery" - sleep 1 -done diff --git a/.wmii/rbar_clock b/.wmii/rbar_clock deleted file mode 100755 index 18c4493..0000000 --- a/.wmii/rbar_clock +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" - -priority=$1 - -while connected_to_x_server; do - date >> "$WMII_DIR/rbar/${priority}_clock" - sleep .5 -done diff --git a/.wmii/rbar_cpu b/.wmii/rbar_cpu deleted file mode 100755 index 22da985..0000000 --- a/.wmii/rbar_cpu +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/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 '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/.wmii/rbar_wifi b/.wmii/rbar_wifi deleted file mode 100755 index 2ada834..0000000 --- a/.wmii/rbar_wifi +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" - -priority=$1 - -while connected_to_x_server; do - echo 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi" - sleep 1 -done diff --git a/.wmii/tagrules b/.wmii/tagrules deleted file mode 100644 index 990151f..0000000 --- a/.wmii/tagrules +++ /dev/null @@ -1,3 +0,0 @@ -/Emacs|Navigator/ -> +sel -/Eclipse/ -> +sel -/panel/ -> /.*/ diff --git a/.wmii/theme-solarized b/.wmii/theme-solarized deleted file mode 100644 index 5dc830d..0000000 --- a/.wmii/theme-solarized +++ /dev/null @@ -1,16 +0,0 @@ -SOL_BASE03='#002b36' -SOL_BASE02='#073642' -SOL_BASE01='#586e75' -SOL_BASE00='#657b83' -SOL_BASE0='#839496' -SOL_BASE1='#93a1a1' -SOL_BASE2='#eee8d5' -SOL_BASE3='#fdf6e3' -SOL_YELLOW='#b58900' -SOL_ORANGE='#cb4b16' -SOL_RED='#dc322f' -SOL_MAGENTA='#d33682' -SOL_VIOLET='#6c71c4' -SOL_BLUE='#268bd2' -SOL_CYAN='#2aa198' -SOL_GREEN='#859900' diff --git a/.wmii/theme-solarized-dark b/.wmii/theme-solarized-dark deleted file mode 100644 index 83285ba..0000000 --- a/.wmii/theme-solarized-dark +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Solarized-dark - -. $HOME/.wmii/theme-solarized - -WMII_BACKGROUND="$SOL_BASE02" - -# =" " -WMII_NORMCOLORS="$SOL_BASE0 $SOL_BASE03 $SOL_BASE02" -WMII_FOCUSCOLORS="$SOL_BASE0 $SOL_BASE02 $SOL_BASE0" -WMII_URGENTCOLORS="$SOL_RED $SOL_BASE03 $SOL_RED" - diff --git a/.wmii/util.sh b/.wmii/util.sh deleted file mode 100644 index 43d7d4a..0000000 --- a/.wmii/util.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash - -# I moved "fixes" into a separate file because it isn't so much configuration... -. "$HOME/.wmii/fixes.sh" - -################################################################################ -# Added shell features # -################################################################################ - -## -# Usage: dquote STRING -# Safely double-quotes a string. -# It escapes ways to execute code, but not variables. -## -dquote() { - str=$1 - str="${str//\\/\\\\}" # backslash - str="${str//\"/\\\"}" # dquote - str="${str//\$(/\\\$(}" # $(...) - str="${str//\`/\\\`}" # backtick - printf '"%s"\n' "$str" -} - -## -# Usage: expand_variables -# Expands variables read from /dev/stdin -## -expand_variables() { - while read; do - eval printf "'%s\n'" "$(dquote "$REPLY")" - done -} - -is_mounted() { - dir="$(readlink -m $1)" - mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -- "$dir")" - [[ $dir = "$mntpnt" ]] - return $? -} - -################################################################################ -# PATH manipulation # -################################################################################ - -## -# Usage: path_ls PATH -# List executables in PATH (PATH is delimited by `:') -## -path_ls() { - dirs="`echo "$@"|sed 'y/:/ /'`" - find -L $dirs -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null | sort -u -} - -## -# Usage: path_which PATH PROGRAM -# Find the full path of PROGRAM by searching PATH -## -path_which() { - mypath=$1 - prog=$2 - which=`which which` - PATH="$mypath" "$which" -- "$prog" 2>/dev/null -} - -################################################################################ -# wmii convenience functions # -################################################################################ - -## -# Usage: lstags -# Lists wmii tags -## -lstags() { - ls $WMII_DIR/tag | sed -e 's@/@@' -e '/^sel$/d' -} - -################################################################################ -# X11 functions # -################################################################################ - -## -# Usage: connected_to_x_server -# Return status indicates whether there is an X server at $DISPLAY -## -connected_to_x_server() { - xdpyinfo &>/dev/null - return $? -} - -################################################################################ -# My wmii configuration # -################################################################################ - -## -# Usage: scansection [SECTION] -# Reads the doc comments from a section of wmiirc. -# If SECTION is not given, it reads all doc comments. -## -scansection() { - file=`conffile config.sh` - sec=$1 - tmp=`mktemp` - # Isolate the sections we want. - if [ -n "$sec" ]; then - # Find the section - < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> $tmp - else - # Remove extra lines that mark the end of a section - < "$file" sed "/\s*}\s*##\s*End\s/d" > $tmp - fi - < $tmp sed -n '/##/p' | while read; do - var="$(echo "$REPLY" | sed -nr 's/^\s*(.*)\)\s*##.*/\1/p')" - comment="$(echo "$REPLY" | sed -r 's/.*## ?//')" - if [ -z "$var" ]; then - printf '%s\n' "$comment" - else - printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment" - fi - done - rm $tmp -} - -## -# Usage: conffile FILE -## -conffile() { - echo "$HOME/.wmii/$@" -} diff --git a/.wmii/wmiirc b/.wmii/wmiirc deleted file mode 100755 index 1f1ea18..0000000 --- a/.wmii/wmiirc +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -. "$HOME/.wmii/include.sh" - -wmiir xwrite /event WmiircQuit # close any existing wmiirc's - -Event WmiircStart - -trap "Event Quit" EXIT - -wmiir read /event 2>/dev/null | while read event; do - Event $event -done -- cgit v1.1-4-g5e80 From b5110458395fd1fac66aa644d938feeac5bcb5af Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 14:43:59 -0500 Subject: mv .bazaar .config/bazaar; ln -s .config/bazaar .bazaar --- .bazaar | 1 + .bazaar/ignore | 10 ---------- .config/bazaar/ignore | 10 ++++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) create mode 120000 .bazaar delete mode 100644 .bazaar/ignore create mode 100644 .config/bazaar/ignore diff --git a/.bazaar b/.bazaar new file mode 120000 index 0000000..42697a1 --- /dev/null +++ b/.bazaar @@ -0,0 +1 @@ +.config/bazaar \ No newline at end of file diff --git a/.bazaar/ignore b/.bazaar/ignore deleted file mode 100644 index 0e498f2..0000000 --- a/.bazaar/ignore +++ /dev/null @@ -1,10 +0,0 @@ -*.a -*.o -*.py[co] -*.so -*.sw[nop] -*~ -.#* -[#]*# -__pycache__ -bzr-orphans diff --git a/.config/bazaar/ignore b/.config/bazaar/ignore new file mode 100644 index 0000000..0e498f2 --- /dev/null +++ b/.config/bazaar/ignore @@ -0,0 +1,10 @@ +*.a +*.o +*.py[co] +*.so +*.sw[nop] +*~ +.#* +[#]*# +__pycache__ +bzr-orphans -- cgit v1.1-4-g5e80 From 4707f1c8454ea70102926598f87bc68104ddb4f5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 14:44:41 -0500 Subject: rm .gnuzilla # IceCat now uses .mozilla --- .gnuzilla | 1 - 1 file changed, 1 deletion(-) delete mode 120000 .gnuzilla diff --git a/.gnuzilla b/.gnuzilla deleted file mode 120000 index 49c36a2..0000000 --- a/.gnuzilla +++ /dev/null @@ -1 +0,0 @@ -.mozilla/ \ No newline at end of file -- cgit v1.1-4-g5e80 From 70770495b898a267e80bed8202652604e16f9617 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 14:48:03 -0500 Subject: rm .config/meld/meldrc.ini --- .config/meld/meldrc.ini | 1 - 1 file changed, 1 deletion(-) delete mode 120000 .config/meld/meldrc.ini diff --git a/.config/meld/meldrc.ini b/.config/meld/meldrc.ini deleted file mode 120000 index dc1dc0c..0000000 --- a/.config/meld/meldrc.ini +++ /dev/null @@ -1 +0,0 @@ -/dev/null \ No newline at end of file -- cgit v1.1-4-g5e80 From 8122a96f65e767d86d483a465367dd5ccba1d5a7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 15:05:34 -0500 Subject: symlink git files to .config/git --- .config/git/config | 14 ++++++++++++++ .config/git/gitk | 36 ++++++++++++++++++++++++++++++++++++ .config/git/ignore | 0 .gitconfig | 15 +-------------- .gitignore | 1 + .gitk | 1 + 6 files changed, 53 insertions(+), 14 deletions(-) create mode 100644 .config/git/config create mode 100644 .config/git/gitk create mode 100644 .config/git/ignore mode change 100644 => 120000 .gitconfig create mode 120000 .gitignore create mode 120000 .gitk diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 0000000..218b006 --- /dev/null +++ b/.config/git/config @@ -0,0 +1,14 @@ +[user] + name = Luke Shumaker + email = LukeShu@sbcglobal.net +[color] + ui = auto +[sendemail] + smtpencryption = ssl + smtpserver = plus.smtp.mail.yahoo.com + smtpuser = lukeshu@sbcglobal.net + smtpserverport = 465 +[push] + default = matching +[alias] + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative diff --git a/.config/git/gitk b/.config/git/gitk new file mode 100644 index 0000000..c0a0171 --- /dev/null +++ b/.config/git/gitk @@ -0,0 +1,36 @@ +set mainfont {Helvetica 9} +set textfont {{DejaVu Sans Mono} 9} +set uifont {Helvetica 9 bold} +set tabstop 8 +set findmergefiles 0 +set maxgraphpct 50 +set maxwidth 16 +set cmitmode patch +set wrapcomment none +set autoselect 1 +set autosellen 40 +set showneartags 1 +set hideremotes 0 +set showlocalchanges 1 +set datetimeformat {%Y-%m-%d %H:%M:%S} +set limitdiffs 1 +set uicolor grey85 +set want_ttk 1 +set bgcolor white +set fgcolor black +set colors {green red blue magenta darkgrey brown orange} +set diffcolors {red "#00a000" blue} +set markbgcolor #e0e0ff +set diffcontext 4 +set selectbgcolor gray85 +set extdifftool meld +set perfile_attrs 0 +set geometry(main) 1364x690+0+0 +set geometry(state) normal +set geometry(topwidth) 1364 +set geometry(topheight) 358 +set geometry(pwsash0) "617 1" +set geometry(pwsash1) "1025 1" +set geometry(botwidth) 889 +set geometry(botheight) 327 +set permviews {} diff --git a/.config/git/ignore b/.config/git/ignore new file mode 100644 index 0000000..e69de29 diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 218b006..0000000 --- a/.gitconfig +++ /dev/null @@ -1,14 +0,0 @@ -[user] - name = Luke Shumaker - email = LukeShu@sbcglobal.net -[color] - ui = auto -[sendemail] - smtpencryption = ssl - smtpserver = plus.smtp.mail.yahoo.com - smtpuser = lukeshu@sbcglobal.net - smtpserverport = 465 -[push] - default = matching -[alias] - lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative diff --git a/.gitconfig b/.gitconfig new file mode 120000 index 0000000..653bc6e --- /dev/null +++ b/.gitconfig @@ -0,0 +1 @@ +.config/git/config \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 120000 index 0000000..9592ae4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.config/git/ignore \ No newline at end of file diff --git a/.gitk b/.gitk new file mode 120000 index 0000000..a0a4a0f --- /dev/null +++ b/.gitk @@ -0,0 +1 @@ +.config/git/gitk \ No newline at end of file -- cgit v1.1-4-g5e80 From 616881193f56dbc6943a63c0201874b60c075188 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 16:02:37 -0500 Subject: move nanorc into .config --- .config/nanorc | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .nanorc | 1 + .nanorc.in | 233 --------------------------------------------------------- Makefile | 2 +- 4 files changed, 235 insertions(+), 234 deletions(-) create mode 100644 .config/nanorc create mode 120000 .nanorc delete mode 100644 .nanorc.in diff --git a/.config/nanorc b/.config/nanorc new file mode 100644 index 0000000..b21e86b --- /dev/null +++ b/.config/nanorc @@ -0,0 +1,233 @@ +## Please note that you must have configured nano with --enable-nanorc +## for this file to be read! Also note that this file should not be in +## DOS or Mac format, and that characters specially interpreted by the +## shell should not be escaped here. +## +## To make sure a value is disabled, use "unset