From 94871d71e604c5a8ea42cf1dc217ca1d588193da Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 22 May 2012 23:56:36 -0400 Subject: un-genericize build64-par --- .crontab.local | 0 .full.asound | 554 +++++++++++++++++++++++++++++++++++++++++++++++++++++ .wmii/wmiirc_local | 37 ++++ .xmodmap | 7 + 4 files changed, 598 insertions(+) create mode 100644 .crontab.local create mode 100644 .full.asound create mode 100755 .wmii/wmiirc_local create mode 100644 .xmodmap diff --git a/.crontab.local b/.crontab.local new file mode 100644 index 0000000..e69de29 diff --git a/.full.asound b/.full.asound new file mode 100644 index 0000000..87a70f2 --- /dev/null +++ b/.full.asound @@ -0,0 +1,554 @@ +state.SB { + control.1 { + iface MIXER + name 'Front Playback Volume' + value.0 17 + value.1 17 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 -2100 + dbvalue.1 -2100 + } + } + control.2 { + iface MIXER + name 'Front Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.3 { + iface MIXER + name 'Surround Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 -4650 + dbvalue.1 -4650 + } + } + control.4 { + iface MIXER + name 'Surround Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.5 { + iface MIXER + name 'Center Playback Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 -4650 + } + } + control.6 { + iface MIXER + name 'LFE Playback Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 -4650 + } + } + control.7 { + iface MIXER + name 'Center Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.8 { + iface MIXER + name 'LFE Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.9 { + iface MIXER + name 'Side Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 -4650 + dbvalue.1 -4650 + } + } + control.10 { + iface MIXER + name 'Side Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.11 { + iface MIXER + name 'Headphone Playback Volume' + value.0 31 + value.1 31 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.12 { + iface MIXER + name 'Headphone Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.13 { + iface MIXER + name 'Rear Mic Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -3450 + dbmax 1200 + dbvalue.0 -3450 + dbvalue.1 -3450 + } + } + control.14 { + iface MIXER + name 'Rear Mic Playback Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.15 { + iface MIXER + name 'Front Mic Playback Volume' + value.0 31 + value.1 31 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -3450 + dbmax 1200 + dbvalue.0 1200 + dbvalue.1 1200 + } + } + control.16 { + iface MIXER + name 'Front Mic Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.17 { + iface MIXER + name 'Line Playback Volume' + value.0 31 + value.1 31 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -3450 + dbmax 1200 + dbvalue.0 1200 + dbvalue.1 1200 + } + } + control.18 { + iface MIXER + name 'Line Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.19 { + iface MIXER + name 'Auto-Mute Mode' + value Enabled + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 Disabled + item.1 Enabled + } + } + control.20 { + iface MIXER + name 'Rear Mic Boost Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 3' + dbmin 0 + dbmax 3000 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.21 { + iface MIXER + name 'Front Mic Boost Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 3' + dbmin 0 + dbmax 3000 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.22 { + iface MIXER + name 'Capture Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.23 { + iface MIXER + name 'Capture Switch' + index 1 + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.24 { + iface MIXER + name 'Capture Volume' + value.0 31 + value.1 31 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 3000 + dbvalue.1 3000 + } + } + control.25 { + iface MIXER + name 'Capture Volume' + index 1 + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -1650 + dbmax 3000 + dbvalue.0 -1650 + dbvalue.1 -1650 + } + } + control.26 { + iface MIXER + name 'Input Source' + value 'Rear Mic' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Rear Mic' + item.1 'Front Mic' + item.2 Line + } + } + control.27 { + iface MIXER + name 'Input Source' + index 1 + value 'Rear Mic' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'Rear Mic' + item.1 'Front Mic' + item.2 Line + } + } + control.28 { + iface MIXER + name 'IEC958 Playback Con Mask' + value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.29 { + iface MIXER + name 'IEC958 Playback Pro Mask' + value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.30 { + iface MIXER + name 'IEC958 Playback Default' + value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.31 { + iface MIXER + name 'IEC958 Playback Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.32 { + iface MIXER + name 'IEC958 Default PCM Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.33 { + iface MIXER + name 'Master Playback Volume' + value 31 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + dbmin -4650 + dbmax 0 + dbvalue.0 0 + } + } + control.34 { + iface MIXER + name 'Master Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.35 { + iface CARD + name 'Line Out Front Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.36 { + iface CARD + name 'Line Out Surround Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.37 { + iface CARD + name 'Line Out CLFE Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.38 { + iface CARD + name 'Line Out Side Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.39 { + iface CARD + name 'Front Headphone Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.40 { + iface CARD + name 'Rear Mic Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.41 { + iface CARD + name 'Front Mic Jack' + value true + comment { + access read + type BOOLEAN + count 1 + } + } + control.42 { + iface CARD + name 'Line Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.43 { + iface MIXER + name 'PCM Playback Volume' + value.0 155 + value.1 155 + comment { + access 'read write user' + type INTEGER + count 2 + range '0 - 255' + tlv '0000000100000008ffffec1400000014' + dbmin -5100 + dbmax 0 + dbvalue.0 -2000 + dbvalue.1 -2000 + } + } + control.44 { + iface MIXER + name 'Digital Capture Volume' + value.0 60 + value.1 60 + comment { + access 'read write user' + type INTEGER + count 2 + range '0 - 120' + tlv '0000000100000008fffff44800000032' + dbmin -3000 + dbmax 3000 + dbvalue.0 0 + dbvalue.1 0 + } + } +} diff --git a/.wmii/wmiirc_local b/.wmii/wmiirc_local new file mode 100755 index 0000000..8e1321c --- /dev/null +++ b/.wmii/wmiirc_local @@ -0,0 +1,37 @@ +#!/bin/dash -f +# -*- mode: sh; -*- + +# wmiirc file for my HP Pavilion dv6426us laptop + +MODKEY=Mod4 + +status() { + buffer=$( + echo -n ' ' + # Wifi status + echo -n 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) + + echo -n ' | ' + + # Battery charge (not status) + echo -n $(acpi -b | sed 's/.*, \{0,2\}\([0-9]\{1,3\}%\),.*/Bat: \1/') + + echo -n ' | ' + # CPU + # This doesn't work for me, it shows capacity + #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') + # This actually displays %idle + echo -n 'CPU: [ '$(tail -n3 ~/tmp/cputime|sed -u 's/ */\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' + + #echo -n ' | ' + + #echo -n $(uptime | sed 's/.*://; s/,//g') + + echo -n ' | ' + + echo -n $(date) + + echo -n ' ' + ) + echo "$buffer" +} diff --git a/.xmodmap b/.xmodmap new file mode 100644 index 0000000..e4ade24 --- /dev/null +++ b/.xmodmap @@ -0,0 +1,7 @@ +remove lock = Caps_Lock +keysym Caps_Lock = Super_L + +keycode 135 = Super_R + +clear mod4 +add mod4 = Super_L Super_R Hyper_L Hyper_R Menu -- cgit v1.1-4-g5e80 From 2f550711d01c7aa731d75edca9bc4d2a1f718045 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 25 May 2012 22:45:02 -0400 Subject: don't run email on this box --- .crontab | 1 - .login-daemons | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.crontab b/.crontab index 28d7b0a..990c00e 100644 --- a/.crontab +++ b/.crontab @@ -1,3 +1,2 @@ # m h dom mon dow command */5 * * * * cd $HOME && make - -*/5 * * * * offlineimap-runner diff --git a/.login-daemons b/.login-daemons index 380b3f1..f088914 100644 --- a/.login-daemons +++ b/.login-daemons @@ -3,7 +3,7 @@ if [ -x "`which daemon`" ]; then daemon emacs --daemon daemon sysfiles - daemon maildirproc + #daemon maildirproc daemon gpg-agent --daemon --write-env-file "${HOME}/.gnupg/agent-info" daemon batterymon 20 " alsactl restore --file $HOME/.full.asound; -- cgit v1.1-4-g5e80 From cd0a25f0d6533b972b77bf14b4aed52e00bb0e1d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 16 Oct 2012 20:17:22 -0400 Subject: wmii: fix autostart --- .wmii/autostart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wmii/autostart b/.wmii/autostart index e78b22b..1370689 100755 --- a/.wmii/autostart +++ b/.wmii/autostart @@ -7,5 +7,5 @@ daemon notifyd &> /dev/null daemon blueman-applet &> /dev/null #daemon linphone --iconified &> /dev/null -Action rbar_cpu 01 -Action rbar_clock 99 +Action rbar_cpu 01 & +Action rbar_clock 99 & -- cgit v1.1-4-g5e80 From 44885fa01e6348f211eac0cfed47d3e237410286 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 17:42:06 -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..1370689 --- /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 +daemon blueman-applet &> /dev/null +#daemon linphone --iconified &> /dev/null + +Action rbar_cpu 01 & +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..4d13294 --- /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 1370689..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 -daemon blueman-applet &> /dev/null -#daemon linphone --iconified &> /dev/null - -Action rbar_cpu 01 & -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 efe15f2fd711686d9e1d790e597cf0c032f6af73 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 17:42:51 -0500 Subject: rm .kde; mv .kde4 .kde; ln -s .kde .kde4 --- .kde | 1 - .kde/share/apps | 1 + .kde/share/config | 1 + .kde4 | 1 + .kde4/share/apps | 1 - .kde4/share/config | 1 - 6 files changed, 3 insertions(+), 3 deletions(-) delete mode 120000 .kde create mode 120000 .kde/share/apps create mode 120000 .kde/share/config create mode 120000 .kde4 delete mode 120000 .kde4/share/apps delete mode 120000 .kde4/share/config diff --git a/.kde b/.kde deleted file mode 120000 index e604d30..0000000 --- a/.kde +++ /dev/null @@ -1 +0,0 @@ -.kde4 \ No newline at end of file diff --git a/.kde/share/apps b/.kde/share/apps new file mode 120000 index 0000000..7f8f949 --- /dev/null +++ b/.kde/share/apps @@ -0,0 +1 @@ +../../.config \ No newline at end of file diff --git a/.kde/share/config b/.kde/share/config new file mode 120000 index 0000000..7f8f949 --- /dev/null +++ b/.kde/share/config @@ -0,0 +1 @@ +../../.config \ No newline at end of file diff --git a/.kde4 b/.kde4 new file mode 120000 index 0000000..bdb1556 --- /dev/null +++ b/.kde4 @@ -0,0 +1 @@ +.kde \ No newline at end of file diff --git a/.kde4/share/apps b/.kde4/share/apps deleted file mode 120000 index 7f8f949..0000000 --- a/.kde4/share/apps +++ /dev/null @@ -1 +0,0 @@ -../../.config \ No newline at end of file diff --git a/.kde4/share/config b/.kde4/share/config deleted file mode 120000 index 7f8f949..0000000 --- a/.kde4/share/config +++ /dev/null @@ -1 +0,0 @@ -../../.config \ No newline at end of file -- cgit v1.1-4-g5e80 From 7141fb7935a75d3015c16396477e6b9a8e0c518d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 17:46:22 -0500 Subject: mv .maildirproc .config/maildirproc ; ln -s .config/maidirproc .maildirproc --- .config/maildirproc/default.rc | 352 +++++++++++++++++++++++++++++++++++++++++ .maildirproc | 1 + .maildirproc/default.rc | 352 ----------------------------------------- 3 files changed, 353 insertions(+), 352 deletions(-) create mode 100644 .config/maildirproc/default.rc create mode 120000 .maildirproc delete mode 100644 .maildirproc/default.rc diff --git a/.config/maildirproc/default.rc b/.config/maildirproc/default.rc new file mode 100644 index 0000000..c2ad6f2 --- /dev/null +++ b/.config/maildirproc/default.rc @@ -0,0 +1,352 @@ +# -*- mode: python; -*- + +import subprocess + +processor.maildir_base = "~/Maildir" +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 bogofilter_auto(mail): + p = subprocess.Popen( + ["bogofilter", "-u", "-v", "-I", mail.path], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + (output, _) = p.communicate() + processor.log("*** Bogofilter result: {0!r}".format(output.rstrip())) + if p.returncode not in [0, 1, 2]: + processor.log_error( + "Error running bogofilter: Return code = {0!r}".format( + p.returncode)) + return p.returncode + +def bogofilter_ham(mail): + subprocess.call(["bogofilter", "-S", "-n", "-I", mail.path]) + +def bogofilter_spam(mail): + subprocess.call(["bogofilter", "-N", "-s", "-I", mail.path]) + +def handle_incoming_spam_training(mail): + bogofilter_spam(mail) + mail.move(".Bulk Mail") + +def handle_incoming_ham_training(mail): + bogofilter_ham(mail) + handle_incoming_ham(mail) + +def handle_incoming_ham(mail): + my_filters(mail) +def handle_incoming_spam(mail): + mail.move(".Bulk 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): + # Sort mail from GNU mailing lists + for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]: + if ( + False + or mail["List-Id"].matches(list+"\.gnu\.org") + or mail["Subject"].contains(list) + ): + mail.move(".software."+list) + return + + # Sort mail from other software mailing lists + if ( + False + or mail["List-Id"].matches("social-discuss\.gnu\.org") + or mail["Subject"].contains("social-discuss") + ): + mail.move(".software.social") + return + + if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): + mail.move(".software.parabola-maintenance") + return + if ( + False + or mail["List-Id"].matches("parabolagnulinux.org") + or is_to_or_from(mail, "parabolagnulinux.org") + or is_to_or_from(mail, "parabola.nu") + ): + mail.move(".software.parabola-dev") + return + + if (mail["List-Id"].matches("pacman-dev.archlinux.org")): + mail.move(".software.pacman-dev") + return + + for subject_re in [ + "\[Stow-[^\]]*\].*", + ]: + if mail["Subject"].matches(subject_re): + mail.move(".software") + return + + # Sort mail from some social websites + if mail["From"].matches("facebook(|mail)\.com"): + mail.move(".Social.Facebook") + return + + if ( + False + or mail["From"].matches("identi\.ca") + or mail["From"].matches("statusnet") + ): + mail.move(".Social.Identica") + return + + if mail["From"].matches("twitter\.com"): + mail.move(".Social.Twitter") + return + + if mail["From"].matches("@xkcd\.com"): + mail.move(".Social.xkcd") + return + + # Sort mail related to Troop 276 + if ( + False + or mail["List-Id"].contains("troopmailinglist.troop276.net") + or is_to_or_from(mail,"t276_announcements@att.net") + or mail["Subject"].matches("troop") + or mail["Subject"].matches("merit\s*badge") + or is_to_or_from(mail,"jsting@sbcglobal.net") + or is_to_or_from(mail,"trdindy@comcast.net") + or is_to_or_from(mail,"wjensen111@aol.com") + or is_to_or_from(mail,"dhoyt@yourhomecompany.com") + or is_to_or_from(mail,"salupo_vincent_p@lilly.com") + or is_to_or_from(mail,"basu@maharjan.org") + or is_to_or_from(mail,"muellerindy@yahoo.com") + or is_to_or_from(mail,"solorzano.luis@rocketmail.com") + or is_to_or_from(mail,"eldredmac@comcast.net")# MacDonell + or is_to_or_from(mail,"mitchprather@sbcglobal.net") + or is_to_or_from(mail,"oa_wap@yahoo.com") + or is_to_or_from(mail,"mytroop.us") + ): + mail.move(".Troop276") + return + + # Sort mail from misc people + if mail["From"].matches("margieshu@sbcglobal\.net"): + mail.move(".misc.Mom") + return + + for address in [ + "justicejade10@aol.com", + "parsonsjade@aol.com", + "parsonstjade@gmail.com", + ]: + if mail["From"].contains(address): + mail.move(".misc.Jade") + return + + for address in [ + "nintendo.com", + "nintendo-news.com", + ]: + if mail["From"].contains(address): + mail.move(".misc.Nintendo") + return + + for address in [ + "@lpi.org", + "@pearson.com", + "CompTIA", + ]: + if mail["From"].contains(address): + mail.move(".misc.CompTIA") + return + + # 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", + "BBonahoom@stanleyworks.com", + "wcxctrack829@aim.com", # Pat + "djnels1@comcast.net", # Dave and Julie Nelson + "sarahlittell@comcast.net", + "skiplittell@comcast.net", + "dave.nelson@ecolab.com", + "@ni.com", + "@usfirst.org", + "gamefreak207@gmail.com", # Brett Leedy + "tswilson4801@att.net", + "silioso@gmail.com", + "cdewalt3@yahoo.com", + "bryanbonahoom@gmail.com", + ]: + if is_to_or_from(mail,address): + mail.move(".School.Robotics") + return + for subject_re in [ + "FIRST", + "robotics", + "1024", + "kil-?a-?bytes", + ]: + if mail["Subject"].matches(subject_re): + mail.move(".School.Robotics") + return + + # Sort mail from software people + for address in [ + "gnu.org", + "eff.org", + "gitorious.org", + "sourceforge.com", + "ietf.org", + "kde.org", + "trustees@core3.amsl.com", + "esr@thyrsus.com", + "canonical.org", + "foocorp.net", + "cnuk.org", + "@archlinux.org", + "@github.com", + ]: + if is_to_or_from(mail,address): + mail.move(".software") + return + + + # Sort mail from the school newspaper + if ( + False + or is_to_or_from(mail, "@lnnorthstar.org") + or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") + ): + mail.move(".School.Newspaper") + return + + # Sort mail from various employers/people who pay me + if is_to_or_from(mail, "@precisepath.com"): + mail.move(".Work.PrecisePath") + return + + if is_to_or_from(mail,"susyphil@aol.com"): + mail.move(".Work.PMCH") + + for address in [ + "d.farrar@comcast.net", + "dfarrar@avacoustics.net", + "@vmware.com", + ]: + if is_to_or_from(mail,address): + mail.move(".Work.FAST") + return + + # Sort misc newsletters + if ( + False + or mail["From"].contains("newsletter") + or mail["From"].contains("auto@comicsbyemail.com") + or mail["From"].contains("oreilly.com") + or mail["Subject"].contains("newsletter") + or mail["From"].contains("Info@mailing.jamendo.com") + or mail["From"].contains("info@demandprogress.org") + ): + mail.move(".misc.Newsletters") + return + + if ( + False + or mail["From"].contains("@msdlt.k12.in.us") + or mail["From"].contains("naviance.com") + or is_to_or_from(mail,"ibwhite@comcast.net") + or mail["Subject"].contains("IOA") + or mail["From"].contains("nths.org") + or mail["Subject"].contains("NTHS") + or mail["Subject"].contains("National Technical Honor Society") + or mail["Subject"].contains("NHS") + or mail["Subject"].contains("National Honor Society") + ): + mail.move(".School") + return + + # from college stuff + if ( + False + or mail["Subject"].contains("NYLF") # National Youth Leadership Conference + or mail["Subject"].contains("NSHSS") + ): + mail.move(".College.Societies") + return + if ( + False + or mail["From"].contains(".edu") + or mail["From"].contains("admissions@") + or mail["From"].contains("college") + or mail["From"].contains("university") + or mail["Subject"].contains("college") + # now we get to the BS + or mail["From"].contains("@dreamitdoitindiana.com") + or mail["From"].contains("@indianatechinfo.org") + ): + mail.move(".College") + return + + if mail["From"].contains("@projectwonderful.com"): + mail.move(".ProjectWonderful") + return + + if ( + False + or mail["From"].matches("@localhost") + or mail["From"].matches("@[^,>]*\.local") + or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") + or mail["To"].matches("luke@") + ): + mail.move(".LocalSystems") + return + if ( + False + or mail["Subject"].contains("password") + or mail["Subject"].contains("account") + ): + mail.move(".misc.accounts") + return + + mail.move(".Ham") + +handle_mapping = { + ".": handle_incoming_unknown, + ".spam-training": handle_incoming_spam_training, + ".ham-training": handle_incoming_ham_training, + #".Ham": handle_incoming_ham, + } +processor.maildirs = handle_mapping.keys() +for mail in processor: + handle_mapping[mail.maildir](mail) diff --git a/.maildirproc b/.maildirproc new file mode 120000 index 0000000..ac993e9 --- /dev/null +++ b/.maildirproc @@ -0,0 +1 @@ +.config/maidirproc \ No newline at end of file diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc deleted file mode 100644 index c2ad6f2..0000000 --- a/.maildirproc/default.rc +++ /dev/null @@ -1,352 +0,0 @@ -# -*- mode: python; -*- - -import subprocess - -processor.maildir_base = "~/Maildir" -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 bogofilter_auto(mail): - p = subprocess.Popen( - ["bogofilter", "-u", "-v", "-I", mail.path], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - (output, _) = p.communicate() - processor.log("*** Bogofilter result: {0!r}".format(output.rstrip())) - if p.returncode not in [0, 1, 2]: - processor.log_error( - "Error running bogofilter: Return code = {0!r}".format( - p.returncode)) - return p.returncode - -def bogofilter_ham(mail): - subprocess.call(["bogofilter", "-S", "-n", "-I", mail.path]) - -def bogofilter_spam(mail): - subprocess.call(["bogofilter", "-N", "-s", "-I", mail.path]) - -def handle_incoming_spam_training(mail): - bogofilter_spam(mail) - mail.move(".Bulk Mail") - -def handle_incoming_ham_training(mail): - bogofilter_ham(mail) - handle_incoming_ham(mail) - -def handle_incoming_ham(mail): - my_filters(mail) -def handle_incoming_spam(mail): - mail.move(".Bulk 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): - # Sort mail from GNU mailing lists - for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]: - if ( - False - or mail["List-Id"].matches(list+"\.gnu\.org") - or mail["Subject"].contains(list) - ): - mail.move(".software."+list) - return - - # Sort mail from other software mailing lists - if ( - False - or mail["List-Id"].matches("social-discuss\.gnu\.org") - or mail["Subject"].contains("social-discuss") - ): - mail.move(".software.social") - return - - if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): - mail.move(".software.parabola-maintenance") - return - if ( - False - or mail["List-Id"].matches("parabolagnulinux.org") - or is_to_or_from(mail, "parabolagnulinux.org") - or is_to_or_from(mail, "parabola.nu") - ): - mail.move(".software.parabola-dev") - return - - if (mail["List-Id"].matches("pacman-dev.archlinux.org")): - mail.move(".software.pacman-dev") - return - - for subject_re in [ - "\[Stow-[^\]]*\].*", - ]: - if mail["Subject"].matches(subject_re): - mail.move(".software") - return - - # Sort mail from some social websites - if mail["From"].matches("facebook(|mail)\.com"): - mail.move(".Social.Facebook") - return - - if ( - False - or mail["From"].matches("identi\.ca") - or mail["From"].matches("statusnet") - ): - mail.move(".Social.Identica") - return - - if mail["From"].matches("twitter\.com"): - mail.move(".Social.Twitter") - return - - if mail["From"].matches("@xkcd\.com"): - mail.move(".Social.xkcd") - return - - # Sort mail related to Troop 276 - if ( - False - or mail["List-Id"].contains("troopmailinglist.troop276.net") - or is_to_or_from(mail,"t276_announcements@att.net") - or mail["Subject"].matches("troop") - or mail["Subject"].matches("merit\s*badge") - or is_to_or_from(mail,"jsting@sbcglobal.net") - or is_to_or_from(mail,"trdindy@comcast.net") - or is_to_or_from(mail,"wjensen111@aol.com") - or is_to_or_from(mail,"dhoyt@yourhomecompany.com") - or is_to_or_from(mail,"salupo_vincent_p@lilly.com") - or is_to_or_from(mail,"basu@maharjan.org") - or is_to_or_from(mail,"muellerindy@yahoo.com") - or is_to_or_from(mail,"solorzano.luis@rocketmail.com") - or is_to_or_from(mail,"eldredmac@comcast.net")# MacDonell - or is_to_or_from(mail,"mitchprather@sbcglobal.net") - or is_to_or_from(mail,"oa_wap@yahoo.com") - or is_to_or_from(mail,"mytroop.us") - ): - mail.move(".Troop276") - return - - # Sort mail from misc people - if mail["From"].matches("margieshu@sbcglobal\.net"): - mail.move(".misc.Mom") - return - - for address in [ - "justicejade10@aol.com", - "parsonsjade@aol.com", - "parsonstjade@gmail.com", - ]: - if mail["From"].contains(address): - mail.move(".misc.Jade") - return - - for address in [ - "nintendo.com", - "nintendo-news.com", - ]: - if mail["From"].contains(address): - mail.move(".misc.Nintendo") - return - - for address in [ - "@lpi.org", - "@pearson.com", - "CompTIA", - ]: - if mail["From"].contains(address): - mail.move(".misc.CompTIA") - return - - # 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", - "BBonahoom@stanleyworks.com", - "wcxctrack829@aim.com", # Pat - "djnels1@comcast.net", # Dave and Julie Nelson - "sarahlittell@comcast.net", - "skiplittell@comcast.net", - "dave.nelson@ecolab.com", - "@ni.com", - "@usfirst.org", - "gamefreak207@gmail.com", # Brett Leedy - "tswilson4801@att.net", - "silioso@gmail.com", - "cdewalt3@yahoo.com", - "bryanbonahoom@gmail.com", - ]: - if is_to_or_from(mail,address): - mail.move(".School.Robotics") - return - for subject_re in [ - "FIRST", - "robotics", - "1024", - "kil-?a-?bytes", - ]: - if mail["Subject"].matches(subject_re): - mail.move(".School.Robotics") - return - - # Sort mail from software people - for address in [ - "gnu.org", - "eff.org", - "gitorious.org", - "sourceforge.com", - "ietf.org", - "kde.org", - "trustees@core3.amsl.com", - "esr@thyrsus.com", - "canonical.org", - "foocorp.net", - "cnuk.org", - "@archlinux.org", - "@github.com", - ]: - if is_to_or_from(mail,address): - mail.move(".software") - return - - - # Sort mail from the school newspaper - if ( - False - or is_to_or_from(mail, "@lnnorthstar.org") - or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") - ): - mail.move(".School.Newspaper") - return - - # Sort mail from various employers/people who pay me - if is_to_or_from(mail, "@precisepath.com"): - mail.move(".Work.PrecisePath") - return - - if is_to_or_from(mail,"susyphil@aol.com"): - mail.move(".Work.PMCH") - - for address in [ - "d.farrar@comcast.net", - "dfarrar@avacoustics.net", - "@vmware.com", - ]: - if is_to_or_from(mail,address): - mail.move(".Work.FAST") - return - - # Sort misc newsletters - if ( - False - or mail["From"].contains("newsletter") - or mail["From"].contains("auto@comicsbyemail.com") - or mail["From"].contains("oreilly.com") - or mail["Subject"].contains("newsletter") - or mail["From"].contains("Info@mailing.jamendo.com") - or mail["From"].contains("info@demandprogress.org") - ): - mail.move(".misc.Newsletters") - return - - if ( - False - or mail["From"].contains("@msdlt.k12.in.us") - or mail["From"].contains("naviance.com") - or is_to_or_from(mail,"ibwhite@comcast.net") - or mail["Subject"].contains("IOA") - or mail["From"].contains("nths.org") - or mail["Subject"].contains("NTHS") - or mail["Subject"].contains("National Technical Honor Society") - or mail["Subject"].contains("NHS") - or mail["Subject"].contains("National Honor Society") - ): - mail.move(".School") - return - - # from college stuff - if ( - False - or mail["Subject"].contains("NYLF") # National Youth Leadership Conference - or mail["Subject"].contains("NSHSS") - ): - mail.move(".College.Societies") - return - if ( - False - or mail["From"].contains(".edu") - or mail["From"].contains("admissions@") - or mail["From"].contains("college") - or mail["From"].contains("university") - or mail["Subject"].contains("college") - # now we get to the BS - or mail["From"].contains("@dreamitdoitindiana.com") - or mail["From"].contains("@indianatechinfo.org") - ): - mail.move(".College") - return - - if mail["From"].contains("@projectwonderful.com"): - mail.move(".ProjectWonderful") - return - - if ( - False - or mail["From"].matches("@localhost") - or mail["From"].matches("@[^,>]*\.local") - or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") - or mail["To"].matches("luke@") - ): - mail.move(".LocalSystems") - return - if ( - False - or mail["Subject"].contains("password") - or mail["Subject"].contains("account") - ): - mail.move(".misc.accounts") - return - - mail.move(".Ham") - -handle_mapping = { - ".": handle_incoming_unknown, - ".spam-training": handle_incoming_spam_training, - ".ham-training": handle_incoming_ham_training, - #".Ham": handle_incoming_ham, - } -processor.maildirs = handle_mapping.keys() -for mail in processor: - handle_mapping[mail.maildir](mail) -- cgit v1.1-4-g5e80 From 3565af1f5cc30ae56e151f24c63a0fd0d0d76828 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:31:00 -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..71ca147 --- /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 e23abe50526995efb67b83f88441dbecdd9d304a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:37:02 -0500 Subject: mv .maildirproc .config/maildirproc; ln -s .config/maildirproc/ .maildirproc --- .config/maildirproc/purdue.rc | 84 +++++++++++++++++++++++++++++++++++++++++++ .maildirproc | 2 +- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .config/maildirproc/purdue.rc diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc new file mode 100644 index 0000000..9a759f5 --- /dev/null +++ b/.config/maildirproc/purdue.rc @@ -0,0 +1,84 @@ +# -*- 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 piazza_topic(mail, topic): + return ( + is_to_or_from(mail, topic+" on Piazza") + or mail["Subject"].contains(topic+" on Piazza")) + +def my_filters(mail): + # Generic stuff ######################################################## + + if mail["Subject"].contains("[PASE]"): + mail.move("INBOX.PASE") + return + + if mail["Subject"].contains("[PLUG]"): + mail.move("INBOX.PLUG") + return + + if is_to_or_from(mail,"linkedin.com"): + mail.move("INBOX.LinkedIn") + return + + if ( + False + or mail["Subject"].contains("[CS Opportunity Update]") + or mail["Subject"].contains("[CS Majors]") + ): + mail.move("INBOX.CS") + return + + # Fall 2012 ############################################################ + + if mail["Subject"].contains("Fall-2012-SCI-21000-001:"): + mail.move("INBOX.classes.2012-2.SCI210") + if mail["Subject"].contains("fall-2012-cs-18000"): + mail.move("INBOX.classes.2012-2.CS180") + return + if piazza_topic(mail, "CS 18000"): + mail.move("INBOX.classes.2012-2.CS180.Piazza") + return + if mail["Subject"].contains("Fall-2012-SOC-10000"): + mail.move("INBOX.classes.2012-2.SOC100") + return + + # Spring 2013 ########################################################## + + if mail["Subject"].contains("[CS240]") or mail["Subject"].contains("Spring-2013-CS-24000"): + mail.move("INBOX.classes.2013-1.CS240") + return + if piazza_topic(mail, "CS 240"): + mail.move("INBOX.classes.2013-1.CS240.Piazza") + return + + if mail["Subject"].contains("Spring-2013-CS-18200"): + mail.move("INBOX.classes.2013-1.CS182") + return + +handle_mapping = { + "INBOX": my_filters, + } +processor.maildirs = handle_mapping.keys() +for mail in processor: + handle_mapping[mail.maildir](mail) diff --git a/.maildirproc b/.maildirproc index ac993e9..f29b6d2 120000 --- a/.maildirproc +++ b/.maildirproc @@ -1 +1 @@ -.config/maidirproc \ No newline at end of file +.config/maildirproc/ \ No newline at end of file -- cgit v1.1-4-g5e80 From 5444020b2f35626bbb56df37e391057ee4d31531 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:39:42 -0500 Subject: mv .{,config/}subversion; ln -s .config/subversion/ .subversion --- .config/subversion/README.txt | 124 ++++++++++++++++++++++++++++++++++++++++++ .config/subversion/config | 123 +++++++++++++++++++++++++++++++++++++++++ .config/subversion/servers | 81 +++++++++++++++++++++++++++ .subversion | 1 + 4 files changed, 329 insertions(+) create mode 100644 .config/subversion/README.txt create mode 100644 .config/subversion/config create mode 100644 .config/subversion/servers create mode 120000 .subversion diff --git a/.config/subversion/README.txt b/.config/subversion/README.txt new file mode 100644 index 0000000..7b78e5e --- /dev/null +++ b/.config/subversion/README.txt @@ -0,0 +1,124 @@ +This directory holds run-time configuration information for Subversion +clients. The configuration files all share the same syntax, but you +should examine a particular file to learn what configuration +directives are valid for that file. + +The syntax is standard INI format: + + - Empty lines, and lines starting with '#', are ignored. + The first significant line in a file must be a section header. + + - A section starts with a section header, which must start in + the first column: + + [section-name] + + - An option, which must always appear within a section, is a pair + (name, value). There are two valid forms for defining an + option, both of which must start in the first column: + + name: value + name = value + + Whitespace around the separator (:, =) is optional. + + - Section and option names are case-insensitive, but case is + preserved. + + - An option's value may be broken into several lines. The value + continuation lines must start with at least one whitespace. + Trailing whitespace in the previous line, the newline character + and the leading whitespace in the continuation line is compressed + into a single space character. + + - All leading and trailing whitespace around a value is trimmed, + but the whitespace within a value is preserved, with the + exception of whitespace around line continuations, as + described above. + + - When a value is a boolean, any of the following strings are + recognised as truth values (case does not matter): + + true false + yes no + on off + 1 0 + + - When a value is a list, it is comma-separated. Again, the + whitespace around each element of the list is trimmed. + + - Option values may be expanded within a value by enclosing the + option name in parentheses, preceded by a percent sign and + followed by an 's': + + %(name)s + + The expansion is performed recursively and on demand, during + svn_option_get. The name is first searched for in the same + section, then in the special [DEFAULT] section. If the name + is not found, the whole '%(name)s' placeholder is left + unchanged. + + Any modifications to the configuration data invalidate all + previously expanded values, so that the next svn_option_get + will take the modifications into account. + +The syntax of the configuration files is a subset of the one used by +Python's ConfigParser module; see + + http://www.python.org/doc/current/lib/module-ConfigParser.html + +Configuration data in the Windows registry +========================================== + +On Windows, configuration data may also be stored in the registry. The +functions svn_config_read and svn_config_merge will read from the +registry when passed file names of the form: + + REGISTRY:/path/to/config-key + +The REGISTRY: prefix must be in upper case. The part must be +one of: + + HKLM for HKEY_LOCAL_MACHINE + HKCU for HKEY_CURRENT_USER + +The values in config-key represent the options in the [DEFAULT] section. +The keys below config-key represent other sections, and their values +represent the options. Only values of type REG_SZ whose name doesn't +start with a '#' will be used; other values, as well as the keys' +default values, will be ignored. + + +File locations +============== + +Typically, Subversion uses two config directories, one for site-wide +configuration, + + Unix: + /etc/subversion/servers + /etc/subversion/config + /etc/subversion/hairstyles + Windows: + %ALLUSERSPROFILE%\Application Data\Subversion\servers + %ALLUSERSPROFILE%\Application Data\Subversion\config + %ALLUSERSPROFILE%\Application Data\Subversion\hairstyles + REGISTRY:HKLM\Software\Tigris.org\Subversion\Servers + REGISTRY:HKLM\Software\Tigris.org\Subversion\Config + REGISTRY:HKLM\Software\Tigris.org\Subversion\Hairstyles + +and one for per-user configuration: + + Unix: + ~/.subversion/servers + ~/.subversion/config + ~/.subversion/hairstyles + Windows: + %APPDATA%\Subversion\servers + %APPDATA%\Subversion\config + %APPDATA%\Subversion\hairstyles + REGISTRY:HKCU\Software\Tigris.org\Subversion\Servers + REGISTRY:HKCU\Software\Tigris.org\Subversion\Config + REGISTRY:HKCU\Software\Tigris.org\Subversion\Hairstyles + diff --git a/.config/subversion/config b/.config/subversion/config new file mode 100644 index 0000000..c35bbf1 --- /dev/null +++ b/.config/subversion/config @@ -0,0 +1,123 @@ +### This file configures various client-side behaviors. +### +### The commented-out examples below are intended to demonstrate +### how to use this file. + +### Section for authentication and authorization customizations. +[auth] +### Set store-passwords to 'no' to avoid storing passwords in the +### auth/ area of your config directory. It defaults to 'yes'. +### Note that this option only prevents saving of *new* passwords; +### it doesn't invalidate existing passwords. (To do that, remove +### the cache files by hand as described in the Subversion book.) +# store-passwords = no +### Set store-auth-creds to 'no' to avoid storing any subversion +### credentials in the auth/ area of your config directory. +### It defaults to 'yes'. Note that this option only prevents +### saving of *new* credentials; it doesn't invalidate existing +### caches. (To do that, remove the cache files by hand.) +# store-auth-creds = no + +### Section for configuring external helper applications. +[helpers] +### Set editor to the command used to invoke your text editor. +### This will override the environment variables that Subversion +### examines by default to find this information ($EDITOR, +### et al). +# editor-cmd = editor (vi, emacs, notepad, etc.) +### Set diff-cmd to the absolute path of your 'diff' program. +### This will override the compile-time default, which is to use +### Subversion's internal diff implementation. +# diff-cmd = diff_program (diff, gdiff, etc.) +### Set diff3-cmd to the absolute path of your 'diff3' program. +### This will override the compile-time default, which is to use +### Subversion's internal diff3 implementation. +# diff3-cmd = diff3_program (diff3, gdiff3, etc.) +### Set diff3-has-program-arg to 'true' or 'yes' if your 'diff3' +### program accepts the '--diff-program' option. +# diff3-has-program-arg = [true | false] +### Set merge-tool-cmd to the command used to invoke your external +### merging tool of choice. Subversion will pass 4 arguments to +### the specified command: base theirs mine merged +# merge-tool-cmd = merge_command + +### Section for configuring tunnel agents. +[tunnels] +### Configure svn protocol tunnel schemes here. By default, only +### the 'ssh' scheme is defined. You can define other schemes to +### be used with 'svn+scheme://hostname/path' URLs. A scheme +### definition is simply a command, optionally prefixed by an +### environment variable name which can override the command if it +### is defined. The command (or environment variable) may contain +### arguments, using standard shell quoting for arguments with +### spaces. The command will be invoked as: +### svnserve -t +### (If the URL includes a username, then the hostname will be +### passed to the tunnel agent as @.) Here we +### redefine the built-in 'ssh' scheme to avoid an unfortunate +### interaction with the "ControlMaster auto" feature (for +### details, see Debian Bug #413102): +ssh = $SVN_SSH ssh -o ControlMaster=no +### If you wanted to define a new 'rsh' scheme, to be used with +### 'svn+rsh:' URLs, you could do so as follows: +# rsh = rsh +### Or, if you wanted to specify a full path and arguments: +# rsh = /path/to/rsh -l myusername +### On Windows, if you are specifying a full path to a command, +### use a forward slash (/) or a paired backslash (\\) as the +### path separator. A single backslash will be treated as an +### escape for the following character. + +### Section for configuring miscelleneous Subversion options. +[miscellany] +### Set global-ignores to a set of whitespace-delimited globs +### which Subversion will ignore in its 'status' output, and +### while importing or adding files and directories. +### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'. +# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo +# *.rej *~ #*# .#* .*.swp .DS_Store +### Set log-encoding to the default encoding for log messages +# log-encoding = latin1 +### Set use-commit-times to make checkout/update/switch/revert +### put last-committed timestamps on every file touched. +# use-commit-times = yes +### Set no-unlock to prevent 'svn commit' from automatically +### releasing locks on files. +# no-unlock = yes +### Set mime-types-file to a MIME type registry file, used to +### provide hints to Subversion's MIME type auto-detection +### algorithm. +# mime-types-file = /path/to/mime.types +### Set preserved-conflict-file-exts to a whitespace-delimited +### list of patterns matching file extensions which should be +### preserved in generated conflict file names. By default, +### conflict files use custom extensions. +# preserved-conflict-file-exts = doc ppt xls od? +### Set enable-auto-props to 'yes' to enable automatic properties +### for 'svn add' and 'svn import', it defaults to 'no'. +### Automatic properties are defined in the section 'auto-props'. +# enable-auto-props = yes +### Set interactive-conflicts to 'no' to disable interactive +### conflict resolution prompting. It defaults to 'yes'. +# interactive-conflicts = no + +### Section for configuring automatic properties. +[auto-props] +### The format of the entries is: +### file-name-pattern = propname[=value][;propname[=value]...] +### The file-name-pattern can contain wildcards (such as '*' and +### '?'). All entries which match (case-insensitively) will be +### applied to the file. Note that auto-props functionality +### must be enabled, which is typically done by setting the +### 'enable-auto-props' option. +# *.c = svn:eol-style=native +# *.cpp = svn:eol-style=native +# *.h = svn:eol-style=native +# *.dsp = svn:eol-style=CRLF +# *.dsw = svn:eol-style=CRLF +# *.sh = svn:eol-style=native;svn:executable +# *.txt = svn:eol-style=native +# *.png = svn:mime-type=image/png +# *.jpg = svn:mime-type=image/jpeg +# Makefile = svn:eol-style=native + diff --git a/.config/subversion/servers b/.config/subversion/servers new file mode 100644 index 0000000..28e2d6f --- /dev/null +++ b/.config/subversion/servers @@ -0,0 +1,81 @@ +### This file specifies server-specific protocol parameters, +### including HTTP proxy information, and HTTP timeout settings. +### +### The currently defined server options are: +### http-proxy-host Proxy host for HTTP connection +### http-proxy-port Port number of proxy host service +### http-proxy-username Username for auth to proxy service +### http-proxy-password Password for auth to proxy service +### http-proxy-exceptions List of sites that do not use proxy +### http-timeout Timeout for HTTP requests in seconds +### http-compression Whether to compress HTTP requests +### neon-debug-mask Debug mask for Neon HTTP library +### http-auth-types Auth types to use for HTTP library +### ssl-authority-files List of files, each of a trusted CAs +### ssl-trust-default-ca Trust the system 'default' CAs +### ssl-client-cert-file PKCS#12 format client certificate file +### ssl-client-cert-password Client Key password, if needed. +### ssl-pkcs11-provider Name of PKCS#11 provider to use. +### http-library Which library to use for http/https +### connections (neon or serf) +### +### HTTP timeouts, if given, are specified in seconds. A timeout +### of 0, i.e. zero, causes a builtin default to be used. +### +### The commented-out examples below are intended only to +### demonstrate how to use this file; any resemblance to actual +### servers, living or dead, is entirely coincidental. + +### In this section, the URL of the repository you're trying to +### access is matched against the patterns on the right. If a +### match is found, the server info is from the section with the +### corresponding name. + +[groups] +# group1 = *.collab.net +# othergroup = repository.blarggitywhoomph.com +# thirdgroup = *.example.com + +### Information for the first group: +# [group1] +# http-proxy-host = proxy1.some-domain-name.com +# http-proxy-port = 80 +# http-proxy-username = blah +# http-proxy-password = doubleblah +# http-timeout = 60 +# http-auth-types = basic;digest;negotiate +# neon-debug-mask = 130 + +### Information for the second group: +# [othergroup] +# http-proxy-host = proxy2.some-domain-name.com +# http-proxy-port = 9000 +# No username and password, so use the defaults below. + +### You can set default parameters in the 'global' section. +### These parameters apply if no corresponding parameter is set in +### a specifically matched group as shown above. Thus, if you go +### through the same proxy server to reach every site on the +### Internet, you probably just want to put that server's +### information in the 'global' section and not bother with +### 'groups' or any other sections. +### +### If you go through a proxy for all but a few sites, you can +### list those exceptions under 'http-proxy-exceptions'. This only +### overrides defaults, not explicitly matched server names. +### +### 'ssl-authority-files' is a semicolon-delimited list of files, +### each pointing to a PEM-encoded Certificate Authority (CA) +### SSL certificate. See details above for overriding security +### due to SSL. +[global] +# http-proxy-exceptions = *.exception.com, www.internal-site.org +# http-proxy-host = defaultproxy.whatever.com +# http-proxy-port = 7000 +# http-proxy-username = defaultusername +# http-proxy-password = defaultpassword +# http-compression = no +# http-auth-types = basic;digest;negotiate +# No http-timeout, so just use the builtin default. +# No neon-debug-mask, so neon debugging is disabled. +# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem diff --git a/.subversion b/.subversion new file mode 120000 index 0000000..4e66627 --- /dev/null +++ b/.subversion @@ -0,0 +1 @@ +.config/subversion/ \ No newline at end of file -- cgit v1.1-4-g5e80 From 8ddc324abff0f72160be11d62e79818d30e3251f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:45:44 -0500 Subject: mv .emacs .emacs.d/init.el --- .emacs | 180 ------------------------------------------------------- .emacs.d/init.el | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 180 deletions(-) delete mode 100644 .emacs create mode 100644 .emacs.d/init.el diff --git a/.emacs b/.emacs deleted file mode 100644 index 3cd2ea3..0000000 --- a/.emacs +++ /dev/null @@ -1,180 +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)) - -;(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..3cd2ea3 --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,180 @@ +;; 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)) + +;(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 03af22ed8fcb4ef6b381a94cd18372487a28b49b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:46:34 -0500 Subject: mv .emacs.d .config/emacs; ln -s .config/emacs/ .emacs.d --- .config/emacs/.gitignore | 9 +++ .config/emacs/custom.el | 21 ++++++ .config/emacs/emacsutils.el | 13 ++++ .config/emacs/init.el | 180 ++++++++++++++++++++++++++++++++++++++++++++ .emacs.d | 1 + .emacs.d/.gitignore | 9 --- .emacs.d/custom.el | 21 ------ .emacs.d/emacsutils.el | 13 ---- .emacs.d/init.el | 180 -------------------------------------------- 9 files changed, 224 insertions(+), 223 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..5a3e67f --- /dev/null +++ b/.config/emacs/custom.el @@ -0,0 +1,21 @@ +(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) + '(scroll-bar-mode nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; 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..3cd2ea3 --- /dev/null +++ b/.config/emacs/init.el @@ -0,0 +1,180 @@ +;; 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)) + +;(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..d45c316 --- /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 5a3e67f..0000000 --- a/.emacs.d/custom.el +++ /dev/null @@ -1,21 +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) - '(scroll-bar-mode nil)) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; 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 3cd2ea3..0000000 --- a/.emacs.d/init.el +++ /dev/null @@ -1,180 +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)) - -;(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 614636d8e5a1f643d3c91d0d5e52482aef38bb5e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 20:48:23 -0500 Subject: git add .config/gkt-* --- .config/gtk-2.0/gtkfilechooser.ini | 12 ++++++++++++ .config/gtk-3.0/bookmarks | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 .config/gtk-2.0/gtkfilechooser.ini create mode 100644 .config/gtk-3.0/bookmarks diff --git a/.config/gtk-2.0/gtkfilechooser.ini b/.config/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..7cb92de --- /dev/null +++ b/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,12 @@ +[Filechooser Settings] +LastFolderUri=file:///home/luke +LocationMode=filename-entry +ShowHidden=false +ShowSizeColumn=true +GeometryX=287 +GeometryY=99 +GeometryWidth=792 +GeometryHeight=585 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/.config/gtk-3.0/bookmarks b/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..85af107 --- /dev/null +++ b/.config/gtk-3.0/bookmarks @@ -0,0 +1,5 @@ +file:///home/luke/Documents +file:///home/luke/Music +file:///home/luke/Pictures +file:///home/luke/Videos +file:///home/luke/Downloads -- cgit v1.1-4-g5e80 From 5f34e1611857c472e6e20077b875fa97f27a8587 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:45:08 -0400 Subject: touch up quoting in .config/bash/rc.sh --- .config/bash/rc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index faf8116..90e5b2d 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -60,7 +60,7 @@ if [[ -x /usr/bin/tput ]] && tput setaf 1 >&/dev/null; then BLUE="$(tput setaf 4)" _STATUS="${BOLD}[" - _STATUS+='$(v=$?; if [[ $v = 0 ]]; then c='"'${GREEN}'"'; else c='"${RED}"'; fi; printf %s%03i $c $v)' + _STATUS+="\$(v=\$?; if [[ \$v = 0 ]]; then c='${GREEN}'; else c='${RED}'; fi; printf %s%03i \$c \$v)" _STATUS+="${RESET}${BOLD}]${RESET}" else _STATUS='[$?]' -- cgit v1.1-4-g5e80 From c7fdd165d8d3ad7fe63b1acb5b0d6854eb01808d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:46:07 -0400 Subject: add DISPLAY to the wmii mount directory --- .config/wmii/include.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/wmii/include.sh b/.config/wmii/include.sh index d4e58c3..2df89b7 100644 --- a/.config/wmii/include.sh +++ b/.config/wmii/include.sh @@ -4,7 +4,7 @@ if [ -z "$WMII_NAMESPACE" ]; then export WMII_NAMESPACE="`wmiir namespace`" fi if [ -z "$WMII_DIR" ]; then - export WMII_DIR="$HOME/n/wmii" + export WMII_DIR="$HOME/n/wmii${DISPLAY}" fi . "$HOME/.wmii/util.sh" -- cgit v1.1-4-g5e80 From 9a3c1bf05ed68ca46863f05f24218cb0eaacc8f5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:46:50 -0400 Subject: .profile: set TMPDIR --- .profile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.profile b/.profile index 2d6f370..e5e593f 100644 --- a/.profile +++ b/.profile @@ -27,6 +27,14 @@ for dir in $HOME/.prefix/lib; do fi done +# TMPDIR ############################################################# + +if [[ ! -d "$HOME/tmp" ]]; then + tmp="$(mktemp --tmpdir -d "$USER-tmpdir.XXXXXXXXXXXXXXXXXXX")" + ln -sf "$tmp" "$HOME/tmp" +fi +export TMPDIR="$HOME/tmp" + # Settings ########################################################### # Text editor -- cgit v1.1-4-g5e80 From a1a37ea6b8fa859963c8fe686d82ce2d008cefcc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:47:04 -0400 Subject: .profile: set XDG variables --- .profile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.profile b/.profile index e5e593f..c5846e0 100644 --- a/.profile +++ b/.profile @@ -10,6 +10,12 @@ # for ssh logins, install and configure the libpam-umask package. umask 022 +[[ -n $XDG_DATA_HOME ]] || export XDG_DATA_HOME="$HOME/.local/share" +[[ -n $XDG_CONFIG_HOME ]] || export XDG_CONFIG_HOME="$HOME/.config" +[[ -n $XDG_DATA_DIRS ]] || export XDG_DATA_DIRS="/usr/local/share/:/usr/share" +[[ -n $XDG_CONFIG_DIRS ]] || export XDG_CONFIG_DIRS="/etc/xdg" +[[ -n $XDG_CACHE_HOME ]] || export XDG_CACHE_HOME="$HOME/.cache" + ## Paths ############################################################# # Unix -- cgit v1.1-4-g5e80 From 931cd4b11794b94e10d72d116d8cf20f914826a2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:47:16 -0400 Subject: .profile: unset temporary variable --- .profile | 1 + 1 file changed, 1 insertion(+) diff --git a/.profile b/.profile index c5846e0..f5a6389 100644 --- a/.profile +++ b/.profile @@ -25,6 +25,7 @@ for dir in "${bins[@]}"; do export PATH="$dir:$PATH" fi done +unset bins # Ruby for dir in $HOME/.prefix/lib; do -- cgit v1.1-4-g5e80 From 0e2d2d798ff057e6efa9b1a7a918c06aa18a1345 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:47:27 -0400 Subject: ssh: update config for new parabola hostname --- .ssh/config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ssh/config b/.ssh/config index 63519e1..7520099 100644 --- a/.ssh/config +++ b/.ssh/config @@ -5,10 +5,9 @@ Host * Compression yes # Parabola Repo Server -Host parabola +Host repo Port 1863 HostName repo.parabolagnulinux.org - User repo Host lore HostName lore.cs.purdue.edu -- cgit v1.1-4-g5e80 From 9d689e7d224b5c1ea3ab3018998135979f19c5a9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 14:48:21 -0400 Subject: add .wmii-hg --- .wmii-hg/autostart | 21 ++++ .wmii-hg/config.sh | 237 ++++++++++++++++++++++++++++++++++++++++++ .wmii-hg/ctl-init | 6 ++ .wmii-hg/fixes.sh | 24 +++++ .wmii-hg/help-events | 3 + .wmii-hg/help-keys | 3 + .wmii-hg/include.sh | 11 ++ .wmii-hg/quit | 3 + .wmii-hg/rbar_battery | 9 ++ .wmii-hg/rbar_clock | 9 ++ .wmii-hg/rbar_cpu | 12 +++ .wmii-hg/rbar_wifi | 9 ++ .wmii-hg/rules | 3 + .wmii-hg/theme-solarized | 16 +++ .wmii-hg/theme-solarized-dark | 12 +++ .wmii-hg/util.sh | 128 +++++++++++++++++++++++ .wmii-hg/wmiirc | 15 +++ 17 files changed, 521 insertions(+) create mode 100755 .wmii-hg/autostart create mode 100644 .wmii-hg/config.sh create mode 100644 .wmii-hg/ctl-init create mode 100644 .wmii-hg/fixes.sh create mode 100755 .wmii-hg/help-events create mode 100755 .wmii-hg/help-keys create mode 100644 .wmii-hg/include.sh create mode 100755 .wmii-hg/quit create mode 100755 .wmii-hg/rbar_battery create mode 100755 .wmii-hg/rbar_clock create mode 100755 .wmii-hg/rbar_cpu create mode 100755 .wmii-hg/rbar_wifi create mode 100644 .wmii-hg/rules create mode 100644 .wmii-hg/theme-solarized create mode 100644 .wmii-hg/theme-solarized-dark create mode 100644 .wmii-hg/util.sh create mode 100755 .wmii-hg/wmiirc diff --git a/.wmii-hg/autostart b/.wmii-hg/autostart new file mode 100755 index 0000000..3f94eff --- /dev/null +++ b/.wmii-hg/autostart @@ -0,0 +1,21 @@ +#!/bin/bash +. include.sh + +# return the number of windows in the current tag +w() { + sed '/^#/d' "${WMII_DIR}/tag/sel/index"|wc -l +} + +# start linphone +tfe linphone &> /dev/null & +# wait until linphone starts +while [[ $(w) < 1 ]]; do + sleep 1 +done +# THEN switch back to the home tag +echo view 1 >> "${WMII_DIR}/ctl" + +# start other services +daemon unclutter &> /dev/null +daemon fbpanel &> /dev/null +daemon notifyd &> /dev/null diff --git a/.wmii-hg/config.sh b/.wmii-hg/config.sh new file mode 100644 index 0000000..2eb5f22 --- /dev/null +++ b/.wmii-hg/config.sh @@ -0,0 +1,237 @@ +#!/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 rules`" expand_variables >> $WMII_DIR/rules + < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl + scansection Key | cut -sf2 >> $WMII_DIR/keys + # Configure X11 + xsetroot -solid "$WMII_BACKGROUND" + + # 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 + ;; + DestroyTag) ## $1=tag + ;; + FocusTag) ## $1=tag + ;; + UnfocusTag) ## $1=tag + ;; + UrgentTag) ## $1=tag $2=[Manager|Client] + ;; + NotUrgentTag) ## $1=tag $2=[Manager|Client] + ;; + + ## LeftBar events (usually tag buttons) + LeftBarMouseDown) ## $1=button $2=bar_item + ;; + LeftBarClick) ## $1=button $2=bar_item + ;; + LeftMouseDND) ## $1=button $2=bar_item + ;; + + ## RightBar events + RightBarMouseDown) ## $1=button $2=bar_item + ;; + RightBarClick) ## $1=button $2=bar_item + ;; + RightMouseDND) ## $1=button $2=bar_item + ;; + 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 + PATH=$_PATH setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;; + $MODKEY-Return) ## Launch a terminal + PATH=$_PATH 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-hg/ctl-init b/.wmii-hg/ctl-init new file mode 100644 index 0000000..ecba5b3 --- /dev/null +++ b/.wmii-hg/ctl-init @@ -0,0 +1,6 @@ +bar off +font xft:Monospace-8 +focuscolors $WMII_FOCUSCOLORS +normcolors $WMII_NORMCOLORS +grabmod $MODKEY +border 1 diff --git a/.wmii-hg/fixes.sh b/.wmii-hg/fixes.sh new file mode 100644 index 0000000..aa09157 --- /dev/null +++ b/.wmii-hg/fixes.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Fix various deficiencies in either the shell or the filesystem + +## +# Usage: ls DIRECTORY +# Linux's 9p kernel module sometimes omits entries in directory listings +## +unalias ls &>/dev/null +ls() { + 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-hg/help-events b/.wmii-hg/help-events new file mode 100755 index 0000000..08abd18 --- /dev/null +++ b/.wmii-hg/help-events @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Event | xmessage -file - diff --git a/.wmii-hg/help-keys b/.wmii-hg/help-keys new file mode 100755 index 0000000..6f4bd1c --- /dev/null +++ b/.wmii-hg/help-keys @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Key | xmessage -file - diff --git a/.wmii-hg/include.sh b/.wmii-hg/include.sh new file mode 100644 index 0000000..38551aa --- /dev/null +++ b/.wmii-hg/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 + +. util.sh +. config.sh diff --git a/.wmii-hg/quit b/.wmii-hg/quit new file mode 100755 index 0000000..27d9052 --- /dev/null +++ b/.wmii-hg/quit @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +echo quit >> $WMII_DIR/ctl diff --git a/.wmii-hg/rbar_battery b/.wmii-hg/rbar_battery new file mode 100755 index 0000000..f632f7e --- /dev/null +++ b/.wmii-hg/rbar_battery @@ -0,0 +1,9 @@ +#!/bin/bash +. include.sh + +priority=$1 + +while connected_to_x_server; do + printf 'label %s\n' "$(acpi -b)" >> "$WMII_DIR/rbar/${priority}_battery" + sleep 1 +done diff --git a/.wmii-hg/rbar_clock b/.wmii-hg/rbar_clock new file mode 100755 index 0000000..6aecb92 --- /dev/null +++ b/.wmii-hg/rbar_clock @@ -0,0 +1,9 @@ +#!/bin/bash +. include.sh + +priority=$1 + +while connected_to_x_server; do + printf 'label %s\n' "$(date)" >> "$WMII_DIR/rbar/${priority}_clock" + sleep .5 +done diff --git a/.wmii-hg/rbar_cpu b/.wmii-hg/rbar_cpu new file mode 100755 index 0000000..5531e60 --- /dev/null +++ b/.wmii-hg/rbar_cpu @@ -0,0 +1,12 @@ +#!/bin/bash +. include.sh + +priority=$1 + +while connected_to_x_server; do + # This doesn't work for me, it shows capacity + #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') >> "$WMII_DIR/rbar/${priority}_cpu" + # This actually displays %idle + echo 'label CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' >> "$WMII_DIR/rbar/${priority}_cpu" + sleep 1 +done diff --git a/.wmii-hg/rbar_wifi b/.wmii-hg/rbar_wifi new file mode 100755 index 0000000..18395a3 --- /dev/null +++ b/.wmii-hg/rbar_wifi @@ -0,0 +1,9 @@ +#!/bin/bash +. include.sh + +priority=$1 + +while connected_to_x_server; do + echo 'label Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi" + sleep 1 +done diff --git a/.wmii-hg/rules b/.wmii-hg/rules new file mode 100644 index 0000000..73cdf40 --- /dev/null +++ b/.wmii-hg/rules @@ -0,0 +1,3 @@ +/panel|notifyd/ tags=/.*/ floating=always +/wimenu/ floating=always +/Emacs/ force-tags=+sel floating=never diff --git a/.wmii-hg/theme-solarized b/.wmii-hg/theme-solarized new file mode 100644 index 0000000..5dc830d --- /dev/null +++ b/.wmii-hg/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/.wmii-hg/theme-solarized-dark b/.wmii-hg/theme-solarized-dark new file mode 100644 index 0000000..fde361b --- /dev/null +++ b/.wmii-hg/theme-solarized-dark @@ -0,0 +1,12 @@ +#!/bin/sh +# Solarized-dark + +. 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-hg/util.sh b/.wmii-hg/util.sh new file mode 100644 index 0000000..a4c4bb4 --- /dev/null +++ b/.wmii-hg/util.sh @@ -0,0 +1,128 @@ +#!/bin/bash + +# I moved "fixes" into a separate file because it isn't so much configuration... +. fixes.sh + +################################################################################ +# Added shell features # +################################################################################ + +## +# Usage: dquote STRING +# Safely double-quotes a string. +# It escapes ways to execute code, but not variables. +## +dquote() { + 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-hg/$@" +} diff --git a/.wmii-hg/wmiirc b/.wmii-hg/wmiirc new file mode 100755 index 0000000..a6bc4b4 --- /dev/null +++ b/.wmii-hg/wmiirc @@ -0,0 +1,15 @@ +#!/bin/bash +export _PATH="$PATH" +export PATH="$WMII_CONFPATH:$PATH" + +. include.sh + +wmiir xwrite /event WmiircQuit # close any existing wmiirc's + +Event WmiircStart + +trap "Event Quit" EXIT + +wmiir read /event 2>/dev/null | while read event; do + Event $event +done -- cgit v1.1-4-g5e80 From 952f28940bfa00c1ed0b983d8474ea51559cad44 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 15:07:26 -0400 Subject: remove subversion config --- .config/subversion/README.txt | 124 ------------------------------------------ .config/subversion/config | 123 ----------------------------------------- .config/subversion/servers | 81 --------------------------- 3 files changed, 328 deletions(-) delete mode 100644 .config/subversion/README.txt delete mode 100644 .config/subversion/config delete mode 100644 .config/subversion/servers diff --git a/.config/subversion/README.txt b/.config/subversion/README.txt deleted file mode 100644 index 7b78e5e..0000000 --- a/.config/subversion/README.txt +++ /dev/null @@ -1,124 +0,0 @@ -This directory holds run-time configuration information for Subversion -clients. The configuration files all share the same syntax, but you -should examine a particular file to learn what configuration -directives are valid for that file. - -The syntax is standard INI format: - - - Empty lines, and lines starting with '#', are ignored. - The first significant line in a file must be a section header. - - - A section starts with a section header, which must start in - the first column: - - [section-name] - - - An option, which must always appear within a section, is a pair - (name, value). There are two valid forms for defining an - option, both of which must start in the first column: - - name: value - name = value - - Whitespace around the separator (:, =) is optional. - - - Section and option names are case-insensitive, but case is - preserved. - - - An option's value may be broken into several lines. The value - continuation lines must start with at least one whitespace. - Trailing whitespace in the previous line, the newline character - and the leading whitespace in the continuation line is compressed - into a single space character. - - - All leading and trailing whitespace around a value is trimmed, - but the whitespace within a value is preserved, with the - exception of whitespace around line continuations, as - described above. - - - When a value is a boolean, any of the following strings are - recognised as truth values (case does not matter): - - true false - yes no - on off - 1 0 - - - When a value is a list, it is comma-separated. Again, the - whitespace around each element of the list is trimmed. - - - Option values may be expanded within a value by enclosing the - option name in parentheses, preceded by a percent sign and - followed by an 's': - - %(name)s - - The expansion is performed recursively and on demand, during - svn_option_get. The name is first searched for in the same - section, then in the special [DEFAULT] section. If the name - is not found, the whole '%(name)s' placeholder is left - unchanged. - - Any modifications to the configuration data invalidate all - previously expanded values, so that the next svn_option_get - will take the modifications into account. - -The syntax of the configuration files is a subset of the one used by -Python's ConfigParser module; see - - http://www.python.org/doc/current/lib/module-ConfigParser.html - -Configuration data in the Windows registry -========================================== - -On Windows, configuration data may also be stored in the registry. The -functions svn_config_read and svn_config_merge will read from the -registry when passed file names of the form: - - REGISTRY:/path/to/config-key - -The REGISTRY: prefix must be in upper case. The part must be -one of: - - HKLM for HKEY_LOCAL_MACHINE - HKCU for HKEY_CURRENT_USER - -The values in config-key represent the options in the [DEFAULT] section. -The keys below config-key represent other sections, and their values -represent the options. Only values of type REG_SZ whose name doesn't -start with a '#' will be used; other values, as well as the keys' -default values, will be ignored. - - -File locations -============== - -Typically, Subversion uses two config directories, one for site-wide -configuration, - - Unix: - /etc/subversion/servers - /etc/subversion/config - /etc/subversion/hairstyles - Windows: - %ALLUSERSPROFILE%\Application Data\Subversion\servers - %ALLUSERSPROFILE%\Application Data\Subversion\config - %ALLUSERSPROFILE%\Application Data\Subversion\hairstyles - REGISTRY:HKLM\Software\Tigris.org\Subversion\Servers - REGISTRY:HKLM\Software\Tigris.org\Subversion\Config - REGISTRY:HKLM\Software\Tigris.org\Subversion\Hairstyles - -and one for per-user configuration: - - Unix: - ~/.subversion/servers - ~/.subversion/config - ~/.subversion/hairstyles - Windows: - %APPDATA%\Subversion\servers - %APPDATA%\Subversion\config - %APPDATA%\Subversion\hairstyles - REGISTRY:HKCU\Software\Tigris.org\Subversion\Servers - REGISTRY:HKCU\Software\Tigris.org\Subversion\Config - REGISTRY:HKCU\Software\Tigris.org\Subversion\Hairstyles - diff --git a/.config/subversion/config b/.config/subversion/config deleted file mode 100644 index c35bbf1..0000000 --- a/.config/subversion/config +++ /dev/null @@ -1,123 +0,0 @@ -### This file configures various client-side behaviors. -### -### The commented-out examples below are intended to demonstrate -### how to use this file. - -### Section for authentication and authorization customizations. -[auth] -### Set store-passwords to 'no' to avoid storing passwords in the -### auth/ area of your config directory. It defaults to 'yes'. -### Note that this option only prevents saving of *new* passwords; -### it doesn't invalidate existing passwords. (To do that, remove -### the cache files by hand as described in the Subversion book.) -# store-passwords = no -### Set store-auth-creds to 'no' to avoid storing any subversion -### credentials in the auth/ area of your config directory. -### It defaults to 'yes'. Note that this option only prevents -### saving of *new* credentials; it doesn't invalidate existing -### caches. (To do that, remove the cache files by hand.) -# store-auth-creds = no - -### Section for configuring external helper applications. -[helpers] -### Set editor to the command used to invoke your text editor. -### This will override the environment variables that Subversion -### examines by default to find this information ($EDITOR, -### et al). -# editor-cmd = editor (vi, emacs, notepad, etc.) -### Set diff-cmd to the absolute path of your 'diff' program. -### This will override the compile-time default, which is to use -### Subversion's internal diff implementation. -# diff-cmd = diff_program (diff, gdiff, etc.) -### Set diff3-cmd to the absolute path of your 'diff3' program. -### This will override the compile-time default, which is to use -### Subversion's internal diff3 implementation. -# diff3-cmd = diff3_program (diff3, gdiff3, etc.) -### Set diff3-has-program-arg to 'true' or 'yes' if your 'diff3' -### program accepts the '--diff-program' option. -# diff3-has-program-arg = [true | false] -### Set merge-tool-cmd to the command used to invoke your external -### merging tool of choice. Subversion will pass 4 arguments to -### the specified command: base theirs mine merged -# merge-tool-cmd = merge_command - -### Section for configuring tunnel agents. -[tunnels] -### Configure svn protocol tunnel schemes here. By default, only -### the 'ssh' scheme is defined. You can define other schemes to -### be used with 'svn+scheme://hostname/path' URLs. A scheme -### definition is simply a command, optionally prefixed by an -### environment variable name which can override the command if it -### is defined. The command (or environment variable) may contain -### arguments, using standard shell quoting for arguments with -### spaces. The command will be invoked as: -### svnserve -t -### (If the URL includes a username, then the hostname will be -### passed to the tunnel agent as @.) Here we -### redefine the built-in 'ssh' scheme to avoid an unfortunate -### interaction with the "ControlMaster auto" feature (for -### details, see Debian Bug #413102): -ssh = $SVN_SSH ssh -o ControlMaster=no -### If you wanted to define a new 'rsh' scheme, to be used with -### 'svn+rsh:' URLs, you could do so as follows: -# rsh = rsh -### Or, if you wanted to specify a full path and arguments: -# rsh = /path/to/rsh -l myusername -### On Windows, if you are specifying a full path to a command, -### use a forward slash (/) or a paired backslash (\\) as the -### path separator. A single backslash will be treated as an -### escape for the following character. - -### Section for configuring miscelleneous Subversion options. -[miscellany] -### Set global-ignores to a set of whitespace-delimited globs -### which Subversion will ignore in its 'status' output, and -### while importing or adding files and directories. -### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'. -# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo -# *.rej *~ #*# .#* .*.swp .DS_Store -### Set log-encoding to the default encoding for log messages -# log-encoding = latin1 -### Set use-commit-times to make checkout/update/switch/revert -### put last-committed timestamps on every file touched. -# use-commit-times = yes -### Set no-unlock to prevent 'svn commit' from automatically -### releasing locks on files. -# no-unlock = yes -### Set mime-types-file to a MIME type registry file, used to -### provide hints to Subversion's MIME type auto-detection -### algorithm. -# mime-types-file = /path/to/mime.types -### Set preserved-conflict-file-exts to a whitespace-delimited -### list of patterns matching file extensions which should be -### preserved in generated conflict file names. By default, -### conflict files use custom extensions. -# preserved-conflict-file-exts = doc ppt xls od? -### Set enable-auto-props to 'yes' to enable automatic properties -### for 'svn add' and 'svn import', it defaults to 'no'. -### Automatic properties are defined in the section 'auto-props'. -# enable-auto-props = yes -### Set interactive-conflicts to 'no' to disable interactive -### conflict resolution prompting. It defaults to 'yes'. -# interactive-conflicts = no - -### Section for configuring automatic properties. -[auto-props] -### The format of the entries is: -### file-name-pattern = propname[=value][;propname[=value]...] -### The file-name-pattern can contain wildcards (such as '*' and -### '?'). All entries which match (case-insensitively) will be -### applied to the file. Note that auto-props functionality -### must be enabled, which is typically done by setting the -### 'enable-auto-props' option. -# *.c = svn:eol-style=native -# *.cpp = svn:eol-style=native -# *.h = svn:eol-style=native -# *.dsp = svn:eol-style=CRLF -# *.dsw = svn:eol-style=CRLF -# *.sh = svn:eol-style=native;svn:executable -# *.txt = svn:eol-style=native -# *.png = svn:mime-type=image/png -# *.jpg = svn:mime-type=image/jpeg -# Makefile = svn:eol-style=native - diff --git a/.config/subversion/servers b/.config/subversion/servers deleted file mode 100644 index 28e2d6f..0000000 --- a/.config/subversion/servers +++ /dev/null @@ -1,81 +0,0 @@ -### This file specifies server-specific protocol parameters, -### including HTTP proxy information, and HTTP timeout settings. -### -### The currently defined server options are: -### http-proxy-host Proxy host for HTTP connection -### http-proxy-port Port number of proxy host service -### http-proxy-username Username for auth to proxy service -### http-proxy-password Password for auth to proxy service -### http-proxy-exceptions List of sites that do not use proxy -### http-timeout Timeout for HTTP requests in seconds -### http-compression Whether to compress HTTP requests -### neon-debug-mask Debug mask for Neon HTTP library -### http-auth-types Auth types to use for HTTP library -### ssl-authority-files List of files, each of a trusted CAs -### ssl-trust-default-ca Trust the system 'default' CAs -### ssl-client-cert-file PKCS#12 format client certificate file -### ssl-client-cert-password Client Key password, if needed. -### ssl-pkcs11-provider Name of PKCS#11 provider to use. -### http-library Which library to use for http/https -### connections (neon or serf) -### -### HTTP timeouts, if given, are specified in seconds. A timeout -### of 0, i.e. zero, causes a builtin default to be used. -### -### The commented-out examples below are intended only to -### demonstrate how to use this file; any resemblance to actual -### servers, living or dead, is entirely coincidental. - -### In this section, the URL of the repository you're trying to -### access is matched against the patterns on the right. If a -### match is found, the server info is from the section with the -### corresponding name. - -[groups] -# group1 = *.collab.net -# othergroup = repository.blarggitywhoomph.com -# thirdgroup = *.example.com - -### Information for the first group: -# [group1] -# http-proxy-host = proxy1.some-domain-name.com -# http-proxy-port = 80 -# http-proxy-username = blah -# http-proxy-password = doubleblah -# http-timeout = 60 -# http-auth-types = basic;digest;negotiate -# neon-debug-mask = 130 - -### Information for the second group: -# [othergroup] -# http-proxy-host = proxy2.some-domain-name.com -# http-proxy-port = 9000 -# No username and password, so use the defaults below. - -### You can set default parameters in the 'global' section. -### These parameters apply if no corresponding parameter is set in -### a specifically matched group as shown above. Thus, if you go -### through the same proxy server to reach every site on the -### Internet, you probably just want to put that server's -### information in the 'global' section and not bother with -### 'groups' or any other sections. -### -### If you go through a proxy for all but a few sites, you can -### list those exceptions under 'http-proxy-exceptions'. This only -### overrides defaults, not explicitly matched server names. -### -### 'ssl-authority-files' is a semicolon-delimited list of files, -### each pointing to a PEM-encoded Certificate Authority (CA) -### SSL certificate. See details above for overriding security -### due to SSL. -[global] -# http-proxy-exceptions = *.exception.com, www.internal-site.org -# http-proxy-host = defaultproxy.whatever.com -# http-proxy-port = 7000 -# http-proxy-username = defaultusername -# http-proxy-password = defaultpassword -# http-compression = no -# http-auth-types = basic;digest;negotiate -# No http-timeout, so just use the builtin default. -# No neon-debug-mask, so neon debugging is disabled. -# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem -- cgit v1.1-4-g5e80 From 0c48704753e2ce6d127a151c0d53f017fa6c1f5d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 19:25:20 -0400 Subject: fix a few remaining merge conflicts --- .config/wmii-hg/autostart | 16 ++++++++-------- .config/wmii/autostart | 11 ----------- .crontab.local | 0 3 files changed, 8 insertions(+), 19 deletions(-) delete mode 100755 .config/wmii/autostart delete mode 100644 .crontab.local diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index 9c47a9d..db097e1 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -1,12 +1,12 @@ #!/bin/bash . include.sh -daemon xcompmgr &> /dev/null -daemon lxpanel &> /dev/null -daemon nm-applet &> /dev/null -daemon dunst &> /dev/null +daemon xcompmgr &> /dev/null +daemon lxpanel &> /dev/null +#daemon nm-applet &> /dev/null +daemon dunst &> /dev/null +daemon blueman-applet &> /dev/null +#daemon linphone --iconified &> /dev/null -#Action rbar_cpu 01 & -#Action rbar_wifi 97 & -#Action rbar_battery 98 & -Action rbar_clock 99 & +Action rbar_cpu 01 & +Action rbar_clock 99 & diff --git a/.config/wmii/autostart b/.config/wmii/autostart deleted file mode 100755 index 1370689..0000000 --- a/.config/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 -daemon blueman-applet &> /dev/null -#daemon linphone --iconified &> /dev/null - -Action rbar_cpu 01 & -Action rbar_clock 99 & diff --git a/.crontab.local b/.crontab.local deleted file mode 100644 index e69de29..0000000 -- cgit v1.1-4-g5e80 From d15b026b03f2b3c5a5890f44d34df8337b8d0bb3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 19:25:29 -0400 Subject: fix a typo in xdg.sh --- .local/lib/xdg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/lib/xdg.sh b/.local/lib/xdg.sh index 28c7e64..2241d2e 100644 --- a/.local/lib/xdg.sh +++ b/.local/lib/xdg.sh @@ -1,4 +1,4 @@ --nw#!/bin/bash +#!/bin/bash # This should be readable by /bin/sh, but I'm going to assume bash. # Sets up XDG environmental variables, so programs using them don't have to -- cgit v1.1-4-g5e80 From ed8ce482c8c0527261b045a57e9bbaaea6414ad9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 19:26:57 -0400 Subject: add a cron job for offlineimap --- .config/cron/offlineimap | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .config/cron/offlineimap diff --git a/.config/cron/offlineimap b/.config/cron/offlineimap new file mode 100644 index 0000000..9de9de1 --- /dev/null +++ b/.config/cron/offlineimap @@ -0,0 +1,2 @@ +# m h dom mon dow command +*/5 * * * * offlineimap-runner 2 -u quiet -- cgit v1.1-4-g5e80 From bc41ed4179df255f8976d527c0d4faee2ab8083f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 3 Mar 2014 12:58:41 -0500 Subject: add right lxpanel --- .config/lxpanel/default/panels/right | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .config/lxpanel/default/panels/right diff --git a/.config/lxpanel/default/panels/right b/.config/lxpanel/default/panels/right new file mode 100644 index 0000000..62c26b0 --- /dev/null +++ b/.config/lxpanel/default/panels/right @@ -0,0 +1,47 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=right + allign=center + margin=0 + widthtype=request + width=652 + height=128 + transparent=1 + tintcolor=#002b36 + alpha=255 + autohide=1 + heightwhenhidden=2 + setdocktype=1 + setpartialstrut=1 + usefontcolor=0 + fontsize=10 + fontcolor=#000000 + usefontsize=0 + background=0 + iconsize=128 + loglevel=2 +} + +Plugin { + type = launchbar + Config { + Button { + id=/home/luke/Desktop/iceweasel.desktop + } + Button { + id=/home/luke/Desktop/netflix-desktop.desktop + } + Button { + id=/home/luke/Desktop/vlc.desktop + } + Button { + id=/home/luke/Desktop/vlc-dvd.desktop + } + Button { + id=/home/luke/Desktop/vlc-cdda.desktop + } + } +} + -- cgit v1.1-4-g5e80 From 81bdd77380a77945931687b334d47c95b7492a8d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 3 Mar 2014 12:58:55 -0500 Subject: delete right lxpanel --- .config/lxpanel/default/panels/right | 47 ------------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 .config/lxpanel/default/panels/right diff --git a/.config/lxpanel/default/panels/right b/.config/lxpanel/default/panels/right deleted file mode 100644 index 62c26b0..0000000 --- a/.config/lxpanel/default/panels/right +++ /dev/null @@ -1,47 +0,0 @@ -# lxpanel config file. Manually editing is not recommended. -# Use preference dialog in lxpanel to adjust config when you can. - -Global { - edge=right - allign=center - margin=0 - widthtype=request - width=652 - height=128 - transparent=1 - tintcolor=#002b36 - alpha=255 - autohide=1 - heightwhenhidden=2 - setdocktype=1 - setpartialstrut=1 - usefontcolor=0 - fontsize=10 - fontcolor=#000000 - usefontsize=0 - background=0 - iconsize=128 - loglevel=2 -} - -Plugin { - type = launchbar - Config { - Button { - id=/home/luke/Desktop/iceweasel.desktop - } - Button { - id=/home/luke/Desktop/netflix-desktop.desktop - } - Button { - id=/home/luke/Desktop/vlc.desktop - } - Button { - id=/home/luke/Desktop/vlc-dvd.desktop - } - Button { - id=/home/luke/Desktop/vlc-cdda.desktop - } - } -} - -- cgit v1.1-4-g5e80 From e93048c125c728d61613d76eab938da9bf7f41c4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 26 Apr 2014 13:55:03 -0400 Subject: start clipit for X11 --- .config/wmii-hg/autostart | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index db097e1..ed37f33 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -7,6 +7,7 @@ daemon lxpanel &> /dev/null daemon dunst &> /dev/null daemon blueman-applet &> /dev/null #daemon linphone --iconified &> /dev/null +dameon clipit -dn &> /dev/null Action rbar_cpu 01 & Action rbar_clock 99 & -- cgit v1.1-4-g5e80 From 79603171010f907ef037213b7ec6cbf5f33258c1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 10 Jul 2014 18:05:37 -0400 Subject: stuff --- .config/Makefile | 4 +- .config/bash/aliases.sh | 3 ++ .config/cron/make-config | 2 +- .config/emacs/custom.el | 2 + .config/emacs/init.el | 6 +-- .config/emacs/wl.el | 12 ++--- .config/git/config | 2 +- .config/irbrc | 2 + .config/login.sh | 1 + .config/maildirproc/att.rc | 117 ++++++++++++++++++++++++++------------------- .config/offlineimaprc | 12 ++--- .config/selected_editor | 3 ++ .config/ssh/config | 22 +++++++-- .config/wmii-hg/autostart | 6 ++- .config/wmii-hg/wmiirc | 3 ++ .local/bin/x-pdf | 2 +- 16 files changed, 119 insertions(+), 80 deletions(-) diff --git a/.config/Makefile b/.config/Makefile index 829b820..dd4c37f 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -14,8 +14,8 @@ all: $(targets) clean: rm -f $(targets) -${HOME}/.folders: ${HOME}/Maildir - ( echo '..'; find $< -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@' +${HOME}/.folders: ${HOME}/Maildir $(MAKEFILE_LIST) + find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf '.%s\n' >'$@' ${GITDIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index c9a1987..f59eef9 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -56,3 +56,6 @@ unset redshift alias lock="clear; away -C 'This terminal is locked'" alias plock="term-title Terminal Locked;lock" mvln() { mv $1 $2; ln -s $2 $1; } +jarls() { jar tf "$1" | sed -n 's/\.class$//p' | LC_ALL=C sort | xargs -r -d $'\n' javap -classpath "$1"; } +tarls() { local file; for file in "$@"; do bsdtar tf "$file" | sed "s|^|$file:|"; done; } +jarmain() { jarls "$1" 2>/dev/null | grep -E '(^[a-z]|public static void main\(java\.lang\.String\[\]\))' | grep -B1 '^ '; } diff --git a/.config/cron/make-config b/.config/cron/make-config index 6e0fca9..9ac5ac2 100644 --- a/.config/cron/make-config +++ b/.config/cron/make-config @@ -1,2 +1,2 @@ -# m h dom mon dow command +#m h dom mon dow command */5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME' diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 47bf654..e801e02 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -5,6 +5,7 @@ ;; If there is more than one, they won't work right. '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]) '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451")) + '(asm-comment-char 35) '(custom-enabled-themes (quote (tango-dark))) '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") @@ -25,6 +26,7 @@ '(sh-indent-comment t) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) + '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) '(vc-annotate-background "#2b2b2b") '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) '(vc-annotate-very-old-color "#dc8cc3") diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 2a7645f..11765b0 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -17,7 +17,7 @@ (eval-region (point) (point-max)) (kill-buffer (current-buffer))))) - ;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (unless (require 'package nil t) (eval-url "http://tromey.com/elpa/package-install.el")) @@ -59,6 +59,7 @@ ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'go-mode-load) +(require 'uniquify) (require 'mailcrypt) (mc-setversion "gpg") @@ -127,8 +128,7 @@ inhibit-startup-screen t line-number-mode t server-use-tcp t - server-mode t - show-paren-mode t) + server-mode t) (setq browse-url-generic-program (executable-find "v-www-browser") browse-url-browser-function 'browse-url-generic) diff --git a/.config/emacs/wl.el b/.config/emacs/wl.el index a169249..815c97c 100644 --- a/.config/emacs/wl.el +++ b/.config/emacs/wl.el @@ -27,12 +27,12 @@ ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path ;; the '.'-prefix is for marking them as maildirs - wl-fcc "..Sent" ;; sent msgs go to the "sent"-folder - wl-default-folder "..Ham" ;; my main inbox - wl-draft-folder "..Draft" ;; store drafts in 'postponed' - wl-trash-folder "..Trash" ;; put trash in 'trash' - wl-spam-folder "..Bulk Mail" ;; put spam in 'Bulk Mail' - wl-queue-folder "..queue" ;; we don't use this + wl-fcc ".Sent" ;; sent msgs go to the "sent"-folder + wl-default-folder ".FOLDERS.Ham" ;; my main inbox + wl-draft-folder ".Draft" ;; store drafts in 'postponed' + wl-trash-folder ".Trash" ;; put trash in 'trash' + wl-spam-folder ".FOLDERS.Spam.training" ;; put spam in 'Bulk Mail' + wl-queue-folder ".FOLDERS.queue" ;; we don't use this ;; check this folder periodically, and update modeline ;wl-biff-check-folder-list '(".todo") ;; check every 180 seconds diff --git a/.config/git/config b/.config/git/config index 218b006..71c68f6 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,6 +1,6 @@ [user] name = Luke Shumaker - email = LukeShu@sbcglobal.net + email = lukeshu@sbcglobal.net [color] ui = auto [sendemail] diff --git a/.config/irbrc b/.config/irbrc index cda5ada..15d362a 100644 --- a/.config/irbrc +++ b/.config/irbrc @@ -1,5 +1,7 @@ # -*- mode: Ruby -*- require 'rubygems' unless defined? Gem # only needed in 1.8 require 'irb/ext/save-history' +require 'fileutils' IRB.conf[:SAVE_HISTORY] = 5000 IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history" +FileUtils.mkdir_p(File.dirname(IRB.conf[:HISTORY_FILE])) diff --git a/.config/login.sh b/.config/login.sh index e1650b2..392dc88 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -11,6 +11,7 @@ # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. umask 022 +ulimit -c unlimited # save core dumps ## Paths ############################################################# diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 381ce8f..0252c74 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -46,7 +46,7 @@ def bogofilter_spam(mail): def handle_incoming_spam_training(mail): bogofilter_spam(mail) - mail.move(".Bulk Mail") + mail.move("FOLDERS.Spam") def handle_incoming_ham_training(mail): bogofilter_ham(mail) @@ -55,10 +55,26 @@ def handle_incoming_ham_training(mail): def handle_incoming_ham(mail): my_filters(mail) def handle_incoming_spam(mail): - mail.move(".Bulk Mail") + mail.move("FOLDERS.Spam") def handle_incoming_unknown(mail): # Filter spam + + if ( + False + or mail["Subject"].contains("[systemd-devel]") + or mail["Subject"].contains("[PATCH") + or mail["Subject"].contains("[Dev]") + or mail["Subject"].contains("[Maintenance]") + or is_to_or_from(mail, "gnu.org") + or is_to_or_from(mail, "fsf.org") + or mail["From"].contains("@parabola.nu") + or mail["From"].contains("parabolagnulinux.org") + or mail["From"].contains("@facebookmail.com>") + or mail["List-Id"].matches(".*\.(gnu|archlinux|parabolagnulinuxlibre)\.org") + ): + handle_incoming_ham_training(mail) + return spam = bogofilter_auto(mail) if spam == 0: @@ -68,10 +84,10 @@ def handle_incoming_unknown(mail): handle_incoming_ham(mail) return elif spam == 2: - # maybe spam + mail.move("Inbox") return else: - mail.move(".Error") + mail.move("FOLDERS.Error") return def my_filters(mail): @@ -82,7 +98,7 @@ def my_filters(mail): or mail["List-Id"].matches(list+"\.gnu\.org") or mail["Subject"].contains('['+list+']') ): - mail.move(".software."+list) + mail.move("FOLDERS.software."+list) return # Sort mail from other software mailing lists @@ -91,36 +107,36 @@ def my_filters(mail): or mail["List-Id"].matches("social-discuss\.gnu\.org") or mail["Subject"].contains("social-discuss") ): - mail.move(".software.social") + mail.move("FOLDERS.software.social") return if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move(".software.networkmanager") + mail.move("FOLDERS.software.networkmanager") return if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): if mail["From"].contains("monit@"): if mail["Message-Id"].contains("@repo.parabolagnulinux.org"): if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"): - mail.move(".software.parabola-maintenance.monit-repo.sshd") + mail.move("FOLDERS.software.parabola-maintenance.monit-repo.sshd") return - mail.move(".software.parabola-maintenance.monit-repo") + mail.move("FOLDERS.software.parabola-maintenance.monit-repo") return if mail["Message-Id"].contains("@rshg054.dnsready.net"): - mail.move(".software.parabola-maintenance.monit-rshg054") + mail.move("FOLDERS.software.parabola-maintenance.monit-rshg054") return if mail["Subject"].matches("Cron <.*@repo>"): - mail.move(".software.parabola-maintenance.cron-repo") + mail.move("FOLDERS.software.parabola-maintenance.cron-repo") return if mail["Subject"].matches("Cron <.*@rshg054>"): - mail.move(".software.parabola-maintenance.cron-rshg054") + mail.move("FOLDERS.software.parabola-maintenance.cron-rshg054") return - mail.move(".software.parabola-maintenance") + mail.move("FOLDERS.software.parabola-maintenance") return - if is_to_or_from(mail, "parabola.nu"): - mail.move(".software.parabola-labs") - return + #if is_to_or_from(mail, "parabola.nu"): + # mail.move("FOLDERS.software.parabola-labs") + # return if ( False @@ -129,29 +145,29 @@ def my_filters(mail): or is_to_or_from(mail, "kiwwwi.com.ar") ): if mail["Subject"].contains("[Django]"): - mail.move(".software.parabola-maintenance.django") + mail.move("FOLDERS.software.parabola-maintenance.django") return - mail.move(".software.parabola-dev") + mail.move("FOLDERS.software.parabola-dev") return if (mail["List-Id"].matches("pacman-dev.archlinux.org")): - mail.move(".software.pacman-dev") + mail.move("FOLDERS.software.pacman-dev") return - if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")): - mail.move(".software.systemd-devel") + if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org") or is_to_or_from(mail, "systemd-devel@lists.freedesktop.org")): + mail.move("FOLDERS.software.systemd-devel") return for subject_re in [ "\[Stow-[^\]]*\].*", ]: if mail["Subject"].matches(subject_re): - mail.move(".software") + mail.move("FOLDERS.software") return # Sort mail from some social websites if mail["From"].matches("facebook(|mail)\.com"): - mail.move(".Social.Facebook") + mail.move("FOLDERS.Social.Facebook") return if ( @@ -159,15 +175,15 @@ def my_filters(mail): or mail["From"].matches("identi\.ca") or mail["From"].matches("statusnet") ): - mail.move(".Social.Identica") + mail.move("FOLDERS.Social.Identica") return if mail["From"].matches("twitter\.com"): - mail.move(".Social.Twitter") + mail.move("FOLDERS.Social.Twitter") return if mail["From"].matches("@xkcd\.com"): - mail.move(".Social.xkcd") + mail.move("FOLDERS.Social.xkcd") return # Sort mail related to Troop 276 @@ -191,12 +207,12 @@ def my_filters(mail): or is_to_or_from(mail,"mytroop.us") or is_to_or_from(mail,"crossroadsbsa.org") ): - mail.move(".Troop276") + mail.move("FOLDERS.BoyScouts") return # Sort mail from misc people if mail["From"].matches("margieshu@sbcglobal\.net"): - mail.move(".misc.Mom") + mail.move("FOLDERS.misc.Mom") return for address in [ @@ -206,7 +222,7 @@ def my_filters(mail): "jadparso@umail.iu.edu", ]: if is_to_or_from(mail,address): - mail.move(".misc.Jade") + mail.move("FOLDERS.misc.Jade") return for address in [ @@ -214,7 +230,7 @@ def my_filters(mail): "nintendo-news.com", ]: if mail["From"].contains(address): - mail.move(".misc.Nintendo") + mail.move("FOLDERS.misc.Nintendo") return for address in [ @@ -223,7 +239,7 @@ def my_filters(mail): "CompTIA", ]: if mail["From"].contains(address): - mail.move(".misc.CompTIA") + mail.move("FOLDERS.misc.CompTIA") return # Sort mail from FRC people @@ -248,7 +264,7 @@ def my_filters(mail): "william.walk@gmail.com", ]: if is_to_or_from(mail,address): - mail.move(".School.Robotics") + mail.move("FOLDERS.School.Robotics") return for subject_re in [ "robotics", @@ -256,7 +272,7 @@ def my_filters(mail): "kil-?a-?bytes", ]: if mail["Subject"].matches(subject_re): - mail.move(".School.Robotics") + mail.move("FOLDERS.School.Robotics") return # Sort mail from software people @@ -278,7 +294,7 @@ def my_filters(mail): "trustees@core3.amsl.com", ]: if is_to_or_from(mail,address): - mail.move(".software") + mail.move("FOLDERS.software") return @@ -288,16 +304,16 @@ def my_filters(mail): or is_to_or_from(mail, "@lnnorthstar.org") or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") ): - mail.move(".School.Newspaper") + mail.move("FOLDERS.School.Newspaper") return # Sort mail from various employers/people who pay me if is_to_or_from(mail, "@precisepath.com"): - mail.move(".Work.PrecisePath") + mail.move("FOLDERS.Work.PrecisePath") return if is_to_or_from(mail,"susyphil@aol.com"): - mail.move(".Work.PMCH") + mail.move("FOLDERS.Work.PMCH") for address in [ "d.farrar@comcast.net", @@ -305,7 +321,7 @@ def my_filters(mail): "@vmware.com", ]: if is_to_or_from(mail,address): - mail.move(".Work.FAST") + mail.move("FOLDERS.Work.FAST") return # Sort misc newsletters @@ -319,12 +335,13 @@ def my_filters(mail): or mail["From"].contains("info@demandprogress.org") or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): - mail.move(".misc.Newsletters") + mail.move("FOLDERS.misc.Newsletters") return if ( False or mail["From"].contains("@msdlt.k12.in.us") + or mail["From"].contains("ltschoolfoundation@gmail.com") or mail["From"].contains("naviance.com") or is_to_or_from(mail,"ibwhite@comcast.net") or mail["Subject"].contains("IOA") @@ -334,7 +351,7 @@ def my_filters(mail): or mail["Subject"].contains("NHS") or mail["Subject"].contains("National Honor Society") ): - mail.move(".School") + mail.move("FOLDERS.School") return # from college stuff @@ -343,7 +360,7 @@ def my_filters(mail): or mail["Subject"].contains("NYLF") # National Youth Leadership Conference or mail["Subject"].contains("NSHSS") ): - mail.move(".College.Societies") + mail.move("FOLDERS.College.Societies") return if ( False @@ -356,11 +373,11 @@ def my_filters(mail): or mail["From"].contains("@dreamitdoitindiana.com") or mail["From"].contains("@indianatechinfo.org") ): - mail.move(".College") + mail.move("FOLDERS.College") return if mail["From"].contains("@projectwonderful.com"): - mail.move(".ProjectWonderful") + mail.move("FOLDERS.misc.ProjectWonderful") return if ( @@ -370,23 +387,23 @@ def my_filters(mail): or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") or mail["To"].matches("luke@") ): - mail.move(".LocalSystems") + mail.move("FOLDERS.LocalSystems") return if ( False or mail["Subject"].contains("password") or mail["Subject"].contains("account") ): - mail.move(".misc.accounts") + mail.move("FOLDERS.misc.accounts") return - mail.move(".Ham") + mail.move("FOLDERS.Ham") handle_mapping = { - ".": handle_incoming_unknown, - ".spam-training": handle_incoming_spam_training, - ".ham-training": handle_incoming_ham_training, - #".Ham": handle_incoming_ham, + "Inbox": handle_incoming_unknown, + "Bulk Mail": handle_incoming_unknown, + "FOLDERS.Spam.training": handle_incoming_spam_training, + "FOLDERS.Ham.training": handle_incoming_ham_training, } processor.maildirs = handle_mapping.keys() for mail in processor: diff --git a/.config/offlineimaprc b/.config/offlineimaprc index d027001..bdc2c66 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -12,21 +12,15 @@ remoterepository = Remote-SBCGlobal 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)) +folderfilter = lambda folder: folder in [ 'Inbox' ] [Repository Remote-SBCGlobal] type = IMAP ssl = yes -cert_fingerprint = a6ee8d759eb76dafacffffc47c4507d51f444984 +cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8 remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net -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) +folderfilter = lambda folder: folder in [ 'Inbox' ] ## Purdue ############################################################ diff --git a/.config/selected_editor b/.config/selected_editor index 7631487..eca2482 100644 --- a/.config/selected_editor +++ b/.config/selected_editor @@ -1,4 +1,7 @@ # Generated by /usr/bin/select-editor SELECTED_EDITOR="emacsclient -a '' -c" +if [[ -n $SSH_CONNECTION ]]; then + SELECTED_EDITOR+=' -nw' +fi ALTERNATE_EDITOR='nano' VISUAL="$SELECTED_EDITOR" diff --git a/.config/ssh/config b/.config/ssh/config index 9b366ed..2a5b79a 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -4,21 +4,33 @@ Host * ControlPath ~/.runtime/ssh-%r@%h:%p Compression yes +# Purdue ################################################### + Host lore HostName lore.cs.purdue.edu - User shumakl - Host data HostName data.cs.purdue.edu +Host *.cs.purdue.edu User shumakl +# Parabola ################################################# + +# short names Host repo - Port 1863 HostName repo.parabolagnulinux.org +Host wiki + HostName wiki.parabolagnulinux.org +Host projects + HostName projects.parabolagnulinux.org +Host parabola + HostName parabolagnulinux.org -Host rshg054 +Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu Port 1863 - HostName parabolagnulinux.org + User lukeshu + +# Personal ################################################# Host lukeshu.com Port 1863 + User lukeshu diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index f5e5419..cee702a 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -1,12 +1,14 @@ #!/bin/bash . include.sh +xrandr --output VGA-1 --off + daemon xcompmgr &> /dev/null daemon lxpanel &> /dev/null #daemon nm-applet &> /dev/null daemon dunst &> /dev/null daemon blueman-applet &> /dev/null -dameon clipit -dn &> /dev/null +daemon clipit -dn &> /dev/null -Action rbar_cpu 01 & +#Action rbar_cpu 01 & Action rbar_clock 99 & diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a6bc4b4..a7dd80c 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -1,4 +1,7 @@ #!/bin/bash +unset WMII_NAMESPACE +unset WMII_DIR + export _PATH="$PATH" export PATH="$WMII_CONFPATH:$PATH" diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index 1b23a3d..3610fde 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,4 +1,4 @@ #!/bin/sh -`pick evince okular xpdf` "$@" +`pick zathura mupdf okular evince xpdf` "$@" exit $? -- cgit v1.1-4-g5e80 From b2a41f953efda8e90dcf5fc0da1910b9df5cdb9e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 30 Jul 2014 22:59:53 -0400 Subject: clean up emacs config --- .config/bash/rc.d/emacs.sh | 6 +- .config/emacs/custom.el | 13 +- .config/emacs/init.el | 303 +++++++++++++++++++++------------------------ .config/emacs/wl.el | 4 +- 4 files changed, 144 insertions(+), 182 deletions(-) diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 165d71e..12fa9ad 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -10,7 +10,7 @@ if [[ $TERM == eterm* ]]; then # _emacs_run LISP _emacs_run() { - emacsclient -e "$*" 2>/dev/null + emacsclient -a false -e "$*" 2>/dev/null } # _emacs_quote UNQUOTED_STRING _emacs_quote() { @@ -94,5 +94,7 @@ if [[ $TERM == eterm* ]]; then _emacs_set_remote_dir _emacs_set_shell_DISPLAY } - PROMPT_COMMAND=_emacs_PROMPT_COMMAND + if _emacs_run '()' >/dev/null; then + PROMPT_COMMAND=_emacs_PROMPT_COMMAND + fi fi diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index e801e02..ef9048d 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -10,28 +10,17 @@ '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") - '(fci-rule-color "#00346e") - '(global-whitespace-mode nil) - '(inhibit-startup-screen t) - '(maildir-mail-dir "~/Maildir") - '(mdmua-maildir "~/Maildir") - '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt))) '(page-break-lines-char 45) '(ruby-deep-arglist nil) '(ruby-deep-indent-paren nil) - '(safe-local-variable-values (quote ((Nginx-indent-tabs-mode) (Nginx-indent-level . 4) (Nginx-indent-level . 8)))) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) - '(sh-basic-offset 8) - '(sh-indent-comment t) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) '(vc-annotate-background "#2b2b2b") '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) - '(vc-annotate-very-old-color "#dc8cc3") - '(wl-init-file "~/.emacs.d/wl.el") - '(wl-score-files-directory "~/.emacs.d/elmo")) + '(vc-annotate-very-old-color "#dc8cc3")) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 11765b0..5647398 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,12 +1,48 @@ +; Use XDG-ish locations +(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) +(setq + package-user-dir (concat xdg-cache-home "emacs/elpa") + ido-save-directory-list-file (concat xdg-cache-home "emacs/ido.last.el") + el-get-dir (concat xdg-cache-home "emacs/el-get/") + eshell-directory-name (concat xdg-cache-home "emacs/eshell/") + wl-score-files-directory (concat xdg-cache-home "emacs/wl-score-files/") + elmo-msgdb-directory (concat xdg-cache-home "emacs/elmo-msgdb/") + elmo-cache-directory (concat xdg-cache-home "emacs/elmo-cache/") + auto-save-list-file-prefix (concat xdg-cache-home "emacs/auto-save-list/saves-") + tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") + custom-file (concat user-emacs-directory "custom.el") + wl-init-file (concat user-emacs-directory "wl.el") + ) + +;; The basics I can't live without ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(show-paren-mode 1) +(column-number-mode 1) +(line-number-mode 1) +(ido-mode 1) +(unless (daemonp) (server-mode 1)) +(when (require 'whitespace nil t) + (setq whitespace-style '( + tab-mark + space-mark + newline-mark + empty + )) + (global-set-key "\C-cw" 'global-whitespace-mode)) +(setq minibuffer-prompt-properties '( + read-only t + point-entered minibuffer-avoid-prompt + face minibuffer-prompt + )) + ;; 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") +(add-to-list 'load-path user-emacs-directory) +(load custom-file 'noerror) -; derived from ELPA installation +;; Bootstrap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; Derived from ELPA installation ; http://tromey.com/elpa/install.html (defun eval-url (url) (let ((buffer (url-retrieve-synchronously url))) @@ -17,123 +53,115 @@ (eval-region (point) (point-max)) (kill-buffer (current-buffer))))) -;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(unless (require 'package nil t) - (eval-url "http://tromey.com/elpa/package-install.el")) - -(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") - ("marmalade" . "http://marmalade-repo.org/packages/") - ("gnu" . "http://elpa.gnu.org/packages/"))) - -;; el-get stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(setq el-get-install-branch "master") ;; live life on the edge +(add-to-list 'load-path (concat el-get-dir "el-get")) (unless (require 'el-get nil t) - (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el")) + (let ((el-get-install-branch "master")) ;; live life on the edge + (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) -(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 - )) +;; Install plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Now load all of that ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) +(setq package-enable-at-startup nil) -;; ELPA -(package-initialize) -;; el-get -(when (require 'el-get nil t) (el-get 'sync my-el-get-packages)) -;; custom -(load custom-file 'noerror) +(setq el-get-sources '( + (:name dtrt-indent :type elpa + :after (dtrt-indent-mode 1)) + (:name coffee-mode :type elpa + :after (add-hook 'coffee-mode-hook + '(lambda () + (set (make-local-variable 'tab-width) 2) + (set (make-local-variable 'indent-tabs-mode) nil) + ))) + (:name smart-tabs-mode :type elpa + :after (progn + (smart-tabs-mode-enable) + (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + (:name graphviz-dot-mode :type elpa) + (:name markdown-mode :type elpa + :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) + (:name nginx-mode :type elpa + :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) + (:name scss-mode :type elpa) + )) +(el-get 'sync '(el-get + apel flim semi wanderlust + dtrt-indent + smart-tabs-mode + nginx-mode + markdown-mode + ;nxhtml + )) ;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(require 'go-mode-load) -(require 'uniquify) +(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(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) +(defadvice align-regexp (around align-with-spaces) + (let ((indent-tabs-mode nil)) ad-do-it)) -(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") +(require 'go-mode-load nil t) +(require 'uniquify) (load "emacsutils") -(set-default 'truncate-lines t) -(tool-bar-mode -1) -(ido-mode t) -(show-paren-mode 1) -(setq org-log-done 'time) -(setq gamegrid-user-score-file-directory "/var/games/emacs/") -;(xclip-mode 1) - -(load "whitespace") -(setq whitespace-style '( - tab-mark - space-mark - newline-mark - empty -)) - - -;; These are my preferred settings; we let dtrt-indent detect when we play with other's files -(setq-default tab-width 8) -(setq-default c-basic-offset 8) -(setq-default indent-tabs-mode t) - - +(when (require 'mailcrypt nil t) + (mc-setversion "gpg") + (add-hook 'wl-summary-mode-hook 'mc-install-read-mode) + (add-hook 'wl-mail-setup-hook 'mc-install-write-mode) + (defun mc-wl-verify-signature () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (mc-verify))) + (defun mc-wl-decrypt-message () + (interactive) + (save-window-excursion + (wl-summary-jump-to-current-message) + (let ((inhibit-read-only t)) + (mc-decrypt)))) + (eval-after-load "mailcrypt" + '(setq mc-modes-alist + (append + (quote + ((wl-draft-mode (encrypt . mc-encrypt-message) + (sign . mc-sign-message)) + (wl-summary-mode (decrypt . mc-wl-decrypt-message) + (verify . mc-wl-verify-signature)))) + mc-modes-alist))) + ) + +(setq-default truncate-lines t) +(setq + inhibit-startup-screen t + org-log-done 'time + gamegrid-user-score-file-directory "/var/games/emacs/" + ) + +;; Indent settings +(setq-default + indent-tabs-mode t + tab-width 8 + c-basic-offset 8 + sh-basic-offset 8 + sh-indent-comment t + ) + +;; Backup settings (setq backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.emacs.d/saves")) ;; don't litter my fs tree + backup-directory-alist '(("." . "~/.cache/emacs/emacs/saves")) ;; don't litter my fs tree delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t ;; use versioned backups -) - -(setq column-number-mode t - inhibit-startup-screen t - line-number-mode t - server-use-tcp t - server-mode t) - -(setq browse-url-generic-program (executable-find "v-www-browser") - browse-url-browser-function 'browse-url-generic) + ) +;; Web browser settings +(setq + browse-url-generic-program (executable-find "v-www-browser") + browse-url-browser-function 'browse-url-generic + ) +;; Make work like in every other program (defun toggle-fullscreen (&optional f) (interactive) (let ((current-value (frame-parameter nil 'fullscreen))) @@ -142,25 +170,11 @@ (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) @@ -171,21 +185,14 @@ (set (make-local-variable 'indent-tabs-mode) nil) )) -(add-hook 'coffee-mode-hook - '(lambda () - (set (make-local-variable 'tab-width) 2) - )) - (add-hook 'term-mode-hook '(lambda () - (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *") - (make-local-variable 'mouse-yank-at-point) - ;(make-local-variable 'transient-mark-mode) - (setq mouse-yank-at-point t) - ;(setq transient-mark-mode nil) (auto-fill-mode -1) + (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *") + (set (make-local-variable 'mouse-yank-at-point) t) (setq tab-width 8 ) - (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term + (setq truncate-lines nil) + (set (make-local-variable 'autopair-dont-activate) t) ;; Don't let autopair break ansi-term )) (add-hook 'ruby-mode-hook @@ -195,46 +202,12 @@ (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)) -(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) -(add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode)) - -;(require 'flymake) -;(add-hook 'php-mode-hook (lambda() (flymake-mode 1))) -;(define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error) -;(define-key php-mode-map '[M-S-down] 'flymake-goto-next-error) - -;(setq tramp-debug-buffer t) -;(setq tramp-verbose 10) - -;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") -;; (require 'mu4e) -;; (require 'mu4e-speedbar) - -;; (setq -;; mu4e-maildir "~/Maildir" ;; top-level Maildir -;; mu4e-sent-folder "/.Sent" ;; folder for sent messages -;; mu4e-drafts-folder "/.Draft" ;; unfinished messages -;; mu4e-trash-folder "/.Trash" ;; trashed messages -;; mu4e-refile-folder "/archive") ;; saved messages -;; (setq mu4e-get-mail-command "offlineimap") -;; (setq mu4e-use-fancy-chars "t") -;; ;; enable inline images -;; (setq mu4e-view-show-images t) -;; ;; use imagemagick, if available -;; (when (fboundp 'imagemagick-register-types) -;; (imagemagick-register-types)) - - -(defun sm-try-smerge () + +(defun try-smerge-mode () (save-excursion (goto-char (point-min)) (when (re-search-forward "^<<<<<<< " nil t) (smerge-mode 1)))) -(add-hook 'find-file-hook 'sm-try-smerge t) +(add-hook 'find-file-hook 'try-smerge-mode t) diff --git a/.config/emacs/wl.el b/.config/emacs/wl.el index 815c97c..e9e61bd 100644 --- a/.config/emacs/wl.el +++ b/.config/emacs/wl.el @@ -21,8 +21,6 @@ wl-message-id-domain user-mail-address ;; Folders/File system ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - elmo-msgdb-directory "~/.emacs.d/elmo" ;; where elmo keeps all its stuff - elmo-cache-directory "~/.emacs.d/elmo-cache" ;; where elmo keeps all its stuff elmo-maildir-folder-path "~/Maildir" ;; where I store my mail ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path @@ -32,7 +30,7 @@ wl-draft-folder ".Draft" ;; store drafts in 'postponed' wl-trash-folder ".Trash" ;; put trash in 'trash' wl-spam-folder ".FOLDERS.Spam.training" ;; put spam in 'Bulk Mail' - wl-queue-folder ".FOLDERS.queue" ;; we don't use this + wl-queue-folder ".FOLDERS.Queue" ;; we don't use this ;; check this folder periodically, and update modeline ;wl-biff-check-folder-list '(".todo") ;; check every 180 seconds -- cgit v1.1-4-g5e80 From f88159c624564d5fe9945820b89b21ef5685fc23 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 31 Jul 2014 00:57:28 -0400 Subject: terminals: Make blue readable on the tango background --- .config/X11/defaults | 12 +++++++----- .config/emacs/custom.el | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.config/X11/defaults b/.config/X11/defaults index 252170c..fca1914 100644 --- a/.config/X11/defaults +++ b/.config/X11/defaults @@ -1,11 +1,13 @@ -# -*- Mode: Conf-xdefaults -*- +! -*- Mode: Conf-xdefaults -*- -# "native" colors -#URxvt.background: #000000 -#URxvt.foreground: #CCCCCC -# Tango-dark +! "native" colors +!URxvt.background: #000000 +!URxvt.foreground: #CCCCCC +! Tango-dark URxvt.background: #2E3436 URxvt.foreground: #EEEEEC +URxvt.color4: #729FCF +URxvt.color12: #729FCF URxvt.scrollstyle: plain URxvt.scrollBar_floating: true diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index ef9048d..0eb22a6 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -26,4 +26,4 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(term-color-blue ((t (:background "#729fcf" :foreground "#729fcf"))))) -- cgit v1.1-4-g5e80 From 0e67aadb031f8b16e50e97b60fef56060185e789 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:09:23 -0400 Subject: Update emacs config --- .config/emacs/custom.el | 11 +- .config/emacs/init.el | 114 +++++++++++++++------ .config/selected_editor | 2 +- .../user/default.target.wants/emacs-daemon.service | 1 + 4 files changed, 84 insertions(+), 44 deletions(-) diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 0eb22a6..af2aef8 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -3,24 +3,15 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold]) - '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451")) - '(asm-comment-char 35) '(custom-enabled-themes (quote (tango-dark))) '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") - '(page-break-lines-char 45) - '(ruby-deep-arglist nil) - '(ruby-deep-indent-paren nil) '(scroll-bar-mode nil) '(send-mail-function (quote smtpmail-send-it)) '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) - '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) - '(vc-annotate-background "#2b2b2b") - '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3")))) - '(vc-annotate-very-old-color "#dc8cc3")) + '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 5647398..a36cf37 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,4 +1,5 @@ -; Use XDG-ish locations +; This config requires Emacs 24(+?) +;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) (setq package-user-dir (concat xdg-cache-home "emacs/elpa") @@ -14,7 +15,7 @@ wl-init-file (concat user-emacs-directory "wl.el") ) -;; The basics I can't live without ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;;;; (show-paren-mode 1) (column-number-mode 1) (line-number-mode 1) @@ -33,14 +34,19 @@ point-entered minibuffer-avoid-prompt face minibuffer-prompt )) - -;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(set-face-attribute 'default nil :height 80) (add-to-list 'load-path user-emacs-directory) (load custom-file 'noerror) -;; Bootstrap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This isn't particularly important, but set it before doing a whole +; lot (loading packages), so there isn't a weird change in text size. +(set-face-attribute 'default nil :height 80) + + +;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This downloads and installs el-get (package management) if isn't +; installed. ; Derived from ELPA installation ; http://tromey.com/elpa/install.html @@ -58,24 +64,40 @@ (let ((el-get-install-branch "master")) ;; live life on the edge (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) -;; Install plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This is kinda funny how it works. +; +; package.el/ELPA (The standard package manager in Emacs 24) has +; terrible programatic management. It's great at installing packages, +; but only interactively. So, I +; 1) Disable package.el from getting loading all downloaded packages +; 2) Use el-get to load a specified list of packages from elpa. +; +; This is also nice because I can do event-base programming for what +; to do once a package is loaded, using :after. (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (setq package-enable-at-startup nil) +; What packages el-get should get from ELPA (if it gets them at all) (setq el-get-sources '( - (:name dtrt-indent :type elpa + ; Minor modes + (:name dtrt-indent :type elpa ; Detect indent style for existing files :after (dtrt-indent-mode 1)) + (:name page-break-lines :type elpa ; Display form-feeds pretty + :after (global-page-break-lines-mode 1)) + (:name smart-tabs-mode :type elpa ; Indent with tabs, align with spaces + :after (progn + (smart-tabs-mode 1) + (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + ; Major modes (:name coffee-mode :type elpa :after (add-hook 'coffee-mode-hook '(lambda () (set (make-local-variable 'tab-width) 2) (set (make-local-variable 'indent-tabs-mode) nil) ))) - (:name smart-tabs-mode :type elpa - :after (progn - (smart-tabs-mode-enable) - (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) (:name graphviz-dot-mode :type elpa) (:name markdown-mode :type elpa :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) @@ -83,18 +105,25 @@ :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) (:name scss-mode :type elpa) )) +; What packages el-get should install, both from above, and it's +; internal list of sources. (el-get 'sync '(el-get - apel flim semi wanderlust + ; Minor modes dtrt-indent smart-tabs-mode - nginx-mode + page-break-lines + ; Major modes + apel flim semi wanderlust markdown-mode - ;nxhtml + nginx-mode + ;nxhtml ; nxhtml is invasive, only enable if actively using + php-mode-improved )) -;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Misc. crap -(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) +(when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (defadvice align-regexp (around align-with-spaces) (let ((indent-tabs-mode nil)) ad-do-it)) @@ -103,6 +132,24 @@ (require 'uniquify) (load "emacsutils") +(setq-default truncate-lines t) +(setq + inhibit-startup-screen t + org-log-done 'time + gamegrid-user-score-file-directory "/var/games/emacs/" + ) + + + +;; Make the mouse work in an xterm +(when (fboundp 'xterm-mouse-mode) + (xterm-mouse-mode 1) + (add-hook 'after-make-frame-functions + '(lambda (frame) + (if xterm-mouse-mode (xterm-mouse-mode 1)) + ))) + +;; Use mailcrypt to encrypt/decrypt email (when (require 'mailcrypt nil t) (mc-setversion "gpg") (add-hook 'wl-summary-mode-hook 'mc-install-read-mode) @@ -129,13 +176,6 @@ mc-modes-alist))) ) -(setq-default truncate-lines t) -(setq - inhibit-startup-screen t - org-log-done 'time - gamegrid-user-score-file-directory "/var/games/emacs/" - ) - ;; Indent settings (setq-default indent-tabs-mode t @@ -148,7 +188,7 @@ ;; Backup settings (setq backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . "~/.cache/emacs/emacs/saves")) ;; don't litter my fs tree + backup-directory-alist '(("." . (concat xdg-cache-home "emacs/saves"))) ;; don't litter my fs tree delete-old-versions t kept-new-versions 6 kept-old-versions 2 @@ -172,6 +212,16 @@ 'fullboth))))) (global-set-key [f11] 'toggle-fullscreen) +;; Automatically load smerge mode for merge files +(defun try-smerge-mode () + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^<<<<<<< " nil t) + (smerge-mode 1)))) +(add-hook 'find-file-hook 'try-smerge-mode t) + + +;; All my weird mode-specific settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-hook 'text-mode-hook 'turn-on-auto-fill) @@ -202,12 +252,10 @@ (set (make-local-variable 'tab-width) 4) )) +(add-hook 'php-mode-hook + '(lambda() + (c-set-offset 'cpp-macro 0) + )) + (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) - -(defun try-smerge-mode () - (save-excursion - (goto-char (point-min)) - (when (re-search-forward "^<<<<<<< " nil t) - (smerge-mode 1)))) -(add-hook 'find-file-hook 'try-smerge-mode t) diff --git a/.config/selected_editor b/.config/selected_editor index eca2482..1cc76a7 100644 --- a/.config/selected_editor +++ b/.config/selected_editor @@ -1,5 +1,5 @@ # Generated by /usr/bin/select-editor -SELECTED_EDITOR="emacsclient -a '' -c" +SELECTED_EDITOR="emacsclient -c" if [[ -n $SSH_CONNECTION ]]; then SELECTED_EDITOR+=' -nw' fi diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service index ef8f65f..279d83a 100644 --- a/.config/systemd/user/default.target.wants/emacs-daemon.service +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -4,6 +4,7 @@ Description=Emacs deamon [Service] Type=forking ExecStart=/bin/bash -l -c 'emacs --daemon' +ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' [Install] WantedBy=default.target -- cgit v1.1-4-g5e80 From f93b92a36a16090b70696ae39251e32259f8e93f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:10:09 -0400 Subject: huh, I don't know how that got mangled (.config/icons/...) --- .config/icons/default/index.theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/icons/default/index.theme b/.config/icons/default/index.theme index dd26337..6652f01 100644 --- a/.config/icons/default/index.theme +++ b/.config/icons/default/index.theme @@ -1,4 +1,5 @@ -# This file is written by LXAppearance. Do not edit.[Icon Theme] +# This file is written by LXAppearance. Do not edit. +[Icon Theme] Name=Default Comment=Default Cursor Theme Inherits=Vanilla-DMZ -- cgit v1.1-4-g5e80 From 5984f9884153b4f035bf3be3cd69ef2970244209 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:11:18 -0400 Subject: update mail filters --- .config/maildirproc/att.rc | 102 +++++++++++++++++++----------------------- .config/maildirproc/purdue.rc | 36 ++++++++++++++- .config/offlineimaprc | 4 +- 3 files changed, 82 insertions(+), 60 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 0252c74..e7f581b 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -37,20 +37,17 @@ def bogofilter_auto(mail): "Error running bogofilter: Return code = {0!r}".format( p.returncode)) return p.returncode - def bogofilter_ham(mail): subprocess.call(["bogofilter", "-S", "-n", "-I", mail.path]) - def bogofilter_spam(mail): subprocess.call(["bogofilter", "-N", "-s", "-I", mail.path]) -def handle_incoming_spam_training(mail): - bogofilter_spam(mail) - mail.move("FOLDERS.Spam") - def handle_incoming_ham_training(mail): bogofilter_ham(mail) handle_incoming_ham(mail) +def handle_incoming_spam_training(mail): + bogofilter_spam(mail) + mail.move("FOLDERS.Spam") def handle_incoming_ham(mail): my_filters(mail) @@ -71,7 +68,7 @@ def handle_incoming_unknown(mail): or mail["From"].contains("@parabola.nu") or mail["From"].contains("parabolagnulinux.org") or mail["From"].contains("@facebookmail.com>") - or mail["List-Id"].matches(".*\.(gnu|archlinux|parabolagnulinuxlibre)\.org") + or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre)\.org") ): handle_incoming_ham_training(mail) return @@ -84,10 +81,10 @@ def handle_incoming_unknown(mail): handle_incoming_ham(mail) return elif spam == 2: - mail.move("Inbox") + mail.move("FOLDERS.MysteryMeat") return else: - mail.move("FOLDERS.Error") + mail.move("FOLDERS.BogoFail") return def my_filters(mail): @@ -98,7 +95,7 @@ def my_filters(mail): or mail["List-Id"].matches(list+"\.gnu\.org") or mail["Subject"].contains('['+list+']') ): - mail.move("FOLDERS.software."+list) + mail.move("FOLDERS.Ham.software."+list) return # Sort mail from other software mailing lists @@ -107,67 +104,58 @@ def my_filters(mail): or mail["List-Id"].matches("social-discuss\.gnu\.org") or mail["Subject"].contains("social-discuss") ): - mail.move("FOLDERS.software.social") + mail.move("FOLDERS.Ham.software.social") return if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move("FOLDERS.software.networkmanager") + mail.move("FOLDERS.Ham.software.networkmanager") return if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): - if mail["From"].contains("monit@"): - if mail["Message-Id"].contains("@repo.parabolagnulinux.org"): - if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"): - mail.move("FOLDERS.software.parabola-maintenance.monit-repo.sshd") - return - mail.move("FOLDERS.software.parabola-maintenance.monit-repo") - return - if mail["Message-Id"].contains("@rshg054.dnsready.net"): - mail.move("FOLDERS.software.parabola-maintenance.monit-rshg054") - return if mail["Subject"].matches("Cron <.*@repo>"): - mail.move("FOLDERS.software.parabola-maintenance.cron-repo") + mail.move("FOLDERS.Ham.software.parabola-maintenance.cron-repo") return - if mail["Subject"].matches("Cron <.*@rshg054>"): - mail.move("FOLDERS.software.parabola-maintenance.cron-rshg054") + if mail["Subject"].matches("Cron <.*@parabolagnulinux>"): + mail.move("FOLDERS.Ham.software.parabola-maintenance.cron-web") return - mail.move("FOLDERS.software.parabola-maintenance") + mail.move("FOLDERS.Ham.software.parabola-maintenance") return - #if is_to_or_from(mail, "parabola.nu"): - # mail.move("FOLDERS.software.parabola-labs") - # return + if is_to_or_from(mail, "labs@parabola.nu"): + mail.move("FOLDERS.Ham.software.parabola-labs") + return if ( False or mail["List-Id"].matches("parabolagnulinux.org") or is_to_or_from(mail, "parabolagnulinux.org") or is_to_or_from(mail, "kiwwwi.com.ar") + or is_to_or_from(mail, "parabola.nu") ): if mail["Subject"].contains("[Django]"): - mail.move("FOLDERS.software.parabola-maintenance.django") + mail.move("FOLDERS.Ham.software.parabola-maintenance.django") return - mail.move("FOLDERS.software.parabola-dev") + mail.move("FOLDERS.Ham.software.parabola-dev") return if (mail["List-Id"].matches("pacman-dev.archlinux.org")): - mail.move("FOLDERS.software.pacman-dev") + mail.move("FOLDERS.Ham.software.pacman-dev") return if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org") or is_to_or_from(mail, "systemd-devel@lists.freedesktop.org")): - mail.move("FOLDERS.software.systemd-devel") + mail.move("FOLDERS.Ham.software.systemd-devel") return for subject_re in [ "\[Stow-[^\]]*\].*", ]: if mail["Subject"].matches(subject_re): - mail.move("FOLDERS.software") + mail.move("FOLDERS.Ham.software") return # Sort mail from some social websites if mail["From"].matches("facebook(|mail)\.com"): - mail.move("FOLDERS.Social.Facebook") + mail.move("FOLDERS.Ham.Social.Facebook") return if ( @@ -175,15 +163,15 @@ def my_filters(mail): or mail["From"].matches("identi\.ca") or mail["From"].matches("statusnet") ): - mail.move("FOLDERS.Social.Identica") + mail.move("FOLDERS.Ham.Social.Identica") return if mail["From"].matches("twitter\.com"): - mail.move("FOLDERS.Social.Twitter") + mail.move("FOLDERS.Ham.Social.Twitter") return if mail["From"].matches("@xkcd\.com"): - mail.move("FOLDERS.Social.xkcd") + mail.move("FOLDERS.Ham.Social.xkcd") return # Sort mail related to Troop 276 @@ -207,12 +195,12 @@ def my_filters(mail): or is_to_or_from(mail,"mytroop.us") or is_to_or_from(mail,"crossroadsbsa.org") ): - mail.move("FOLDERS.BoyScouts") + mail.move("FOLDERS.Ham.BoyScouts") return # Sort mail from misc people if mail["From"].matches("margieshu@sbcglobal\.net"): - mail.move("FOLDERS.misc.Mom") + mail.move("FOLDERS.Ham.misc.Mom") return for address in [ @@ -222,7 +210,7 @@ def my_filters(mail): "jadparso@umail.iu.edu", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.misc.Jade") + mail.move("FOLDERS.Ham.misc.Jade") return for address in [ @@ -230,7 +218,7 @@ def my_filters(mail): "nintendo-news.com", ]: if mail["From"].contains(address): - mail.move("FOLDERS.misc.Nintendo") + mail.move("FOLDERS.Ham.misc.Nintendo") return for address in [ @@ -239,7 +227,7 @@ def my_filters(mail): "CompTIA", ]: if mail["From"].contains(address): - mail.move("FOLDERS.misc.CompTIA") + mail.move("FOLDERS.Ham.misc.CompTIA") return # Sort mail from FRC people @@ -264,7 +252,7 @@ def my_filters(mail): "william.walk@gmail.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.School.Robotics") + mail.move("FOLDERS.Ham.School.Robotics") return for subject_re in [ "robotics", @@ -272,7 +260,7 @@ def my_filters(mail): "kil-?a-?bytes", ]: if mail["Subject"].matches(subject_re): - mail.move("FOLDERS.School.Robotics") + mail.move("FOLDERS.Ham.School.Robotics") return # Sort mail from software people @@ -294,7 +282,7 @@ def my_filters(mail): "trustees@core3.amsl.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.software") + mail.move("FOLDERS.Ham.software") return @@ -304,16 +292,16 @@ def my_filters(mail): or is_to_or_from(mail, "@lnnorthstar.org") or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") ): - mail.move("FOLDERS.School.Newspaper") + mail.move("FOLDERS.Ham.School.Newspaper") return # Sort mail from various employers/people who pay me if is_to_or_from(mail, "@precisepath.com"): - mail.move("FOLDERS.Work.PrecisePath") + mail.move("FOLDERS.Ham.Work.PrecisePath") return if is_to_or_from(mail,"susyphil@aol.com"): - mail.move("FOLDERS.Work.PMCH") + mail.move("FOLDERS.Ham.Work.PMCH") for address in [ "d.farrar@comcast.net", @@ -321,7 +309,7 @@ def my_filters(mail): "@vmware.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.Work.FAST") + mail.move("FOLDERS.Ham.Work.FAST") return # Sort misc newsletters @@ -335,7 +323,7 @@ def my_filters(mail): or mail["From"].contains("info@demandprogress.org") or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): - mail.move("FOLDERS.misc.Newsletters") + mail.move("FOLDERS.Ham.misc.Newsletters") return if ( @@ -351,7 +339,7 @@ def my_filters(mail): or mail["Subject"].contains("NHS") or mail["Subject"].contains("National Honor Society") ): - mail.move("FOLDERS.School") + mail.move("FOLDERS.Ham.School") return # from college stuff @@ -360,7 +348,7 @@ def my_filters(mail): or mail["Subject"].contains("NYLF") # National Youth Leadership Conference or mail["Subject"].contains("NSHSS") ): - mail.move("FOLDERS.College.Societies") + mail.move("FOLDERS.Ham.College.Societies") return if ( False @@ -373,11 +361,11 @@ def my_filters(mail): or mail["From"].contains("@dreamitdoitindiana.com") or mail["From"].contains("@indianatechinfo.org") ): - mail.move("FOLDERS.College") + mail.move("FOLDERS.Ham.College") return if mail["From"].contains("@projectwonderful.com"): - mail.move("FOLDERS.misc.ProjectWonderful") + mail.move("FOLDERS.Ham.misc.ProjectWonderful") return if ( @@ -387,14 +375,14 @@ def my_filters(mail): or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") or mail["To"].matches("luke@") ): - mail.move("FOLDERS.LocalSystems") + mail.move("FOLDERS.Ham.LocalSystems") return if ( False or mail["Subject"].contains("password") or mail["Subject"].contains("account") ): - mail.move("FOLDERS.misc.accounts") + mail.move("FOLDERS.Ham.misc.accounts") return mail.move("FOLDERS.Ham") diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index 6d4b913..7b75d7c 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -70,10 +70,18 @@ def my_filters(mail): or is_to_or_from(mail,"@propertysolutions.com") or is_to_or_from(mail,"collegestationapartments@gmail.com") or is_to_or_from_re(mail,"collegestationca\..*@gmail.com") - or is_to_or_from(mail, "@duke-energy.com") ): mail.move("INBOX.housing.CollegeStation") return + if ( + False + or is_to_or_from(mail,"@hunterlp.com") + or is_to_or_from(mail, "@duke-energy.com") + or is_to_or_from(mail, "@alerts.comcast.net") + or is_to_or_from(mail, "rentpayment.com") + ): + mail.move("INBOX.housing.BeauJardin") + return if mail["From"].matches("facebook(|mail)\.com"): mail.move("INBOX.crap.Facebook") @@ -183,6 +191,32 @@ def my_filters(mail): mail.move("INBOX.classes.2014-1.STAT350.Piazza") return + # Fall 2014 ############################################################ + + # CS334 (Graphics) + if (is_to_or_from(mail, "lin553@purdue.edu") or mail["Subject"].contains("Fall-2014-CS-33400")): + mail.move("INBOX.classes.2014-2.CS334") + return + # CS354 (OS) + # CS381 (Algo) + if piazza_topic(mail, "CS 354"): + mail.move("INBOX.classes.2014-2.CS354.Piazza") + return + if piazza_topic(mail, "CS 381"): + mail.move("INBOX.classes.2014-2.CS381.Piazza") + return + # CS456 (Programming languages) + if piazza_topic(mail, "CS 456"): + mail.move("INBOX.classes.2014-2.CS456.Piazza") + return + # MA416 + if mail["Subject"].contains("Fall-2014-MA-41600"): + mail.move("INBOX.classes.2014-2.MA416") + return + # PHYS221 + if (is_to_or_from(mail, "cui@purdue.edu") or is_to_or_from(mail, "china@purdue.edu")): + mail.move("INBOX.classes.2014-2.PHYS221") + return handle_mapping = { "INBOX": my_filters, } diff --git a/.config/offlineimaprc b/.config/offlineimaprc index bdc2c66..36b382c 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -12,7 +12,7 @@ remoterepository = Remote-SBCGlobal type = Maildir localfolders = ~/Maildir sep = . -folderfilter = lambda folder: folder in [ 'Inbox' ] +folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] [Repository Remote-SBCGlobal] type = IMAP @@ -20,7 +20,7 @@ ssl = yes cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8 remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net -folderfilter = lambda folder: folder in [ 'Inbox' ] +folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] ## Purdue ############################################################ -- cgit v1.1-4-g5e80 From e72554e8e5bf453109b31d0797323fd7085b169c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:13:06 -0400 Subject: clean up wmii config --- .config/wmii-hg/config.sh | 12 +++++------- .config/wmii-hg/util.sh | 31 +++++++++++-------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 3ddc8d5..3b1b20f 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -163,9 +163,8 @@ Event() { RightMouseDND) ## $1=button $2=bar_item Event RightBarClick "$@";; esac -} ## End Event +} -# Key Bindings Key() { key=$1 case "$key" in @@ -237,14 +236,13 @@ Key() { echo "$tag" >> $WMII_DIR/client/$sel/tags }& ;; esac -} ## End Key +} Action() { - prog=`path_which "$WMII_CONFPATH" $1`; shift + prog=$(path_which "$WMII_CONFPATH" "$1"); shift if [ -n "$prog" ]; then "$prog" "$@" - return $? else - return 1 + false fi -} ## End Action +} diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index 71dbc41..f15031e 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -35,7 +35,6 @@ is_mounted() { local dir="$(readlink -m $1)" local mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -Fx -- "$dir")" [[ $dir = "$mntpnt" ]] - return $? } ################################################################################ @@ -85,7 +84,6 @@ lstags() { ## connected_to_x_server() { xdpyinfo &>/dev/null - return $? } ################################################################################ @@ -93,32 +91,25 @@ connected_to_x_server() { ################################################################################ ## -# Usage: scansection [SECTION] +# Usage: scansection SECTION # Reads the doc comments from a section of wmiirc. -# If SECTION is not given, it reads all doc comments. ## scansection() { - local file=$(conffile config.sh) local sec=$1 - local tmp=$(mktemp --tmpdir wmii-scansecion.XXXXXXXXXX) - # Isolate the sections we want. - if [ -n "$sec" ]; then - # Find the section - < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> "$tmp" - else - # Remove extra lines that mark the end of a section - < "$file" sed "/\s*}\s*##\s*End\s/d" > "$tmp" - fi - < "$tmp" sed -n '/##/p' | while read; do - var="$(echo "$REPLY" | sed -nr 's/^\s*(.*)\)\s*##.*/\1/p')" - comment="$(echo "$REPLY" | sed -r 's/.*## ?//')" - if [ -z "$var" ]; then + + local file=$(conffile config.sh) + # Isolate the section we want. + < "$file" sed -n "/^\s*$sec\s*()/,/^}/{ /##/p }" | + # Parse each line. + while read -r line; do + symbol="$(sed -nr 's/^\s*(.*)\)\s*##.*/\1/p' <<<"$line")" + comment="$(sed -r 's/.*## ?//' <<<"$line")" + if [ -z "$symbol" ]; then printf '%s\n' "$comment" else - printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment" + printf '\t%s\t%s\n' "$(expand_variables <<<"$symbol")" "$comment" fi done - rm -- "$tmp" } ## -- cgit v1.1-4-g5e80 From 3f726c475192da8167b18baaa5d1ba0402ebcd0f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:13:44 -0400 Subject: rewrite bin/config-path --- .local/bin/config-path | 67 +++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/.local/bin/config-path b/.local/bin/config-path index 6b9019c..f4c2342 100755 --- a/.local/bin/config-path +++ b/.local/bin/config-path @@ -1,16 +1,22 @@ #!/bin/bash -# All the prefixes to consider -prefixes=( - "$HOME" - "$HOME/.local.`uname -m`" - "$HOME/.local" - "$HOME/.prefix.`uname -m`" - "$HOME/.prefix" - "$HOME"/.gem/ruby/* -) - -###################################################################### +the_guts() { + # Add generic prefixes + add_prefix "$HOME" + add_prefix "$HOME/.local.$(uname -m)" + add_prefix "$HOME/.local" + add_prefix "$HOME/.prefix.$(uname -m)" + add_prefix "$HOME/.prefix" + + # Add rubygem prefixes + local dir + for dir in "$HOME"/.gem/*; do + # Only add it if we have that type of ruby + if type "${dir##*/}" &>/dev/null; then + add_prefix "$dir"/* + fi + done +} in_array() { local needle=$1; shift @@ -22,30 +28,41 @@ in_array() { return 1 } -# Import existing values -IFS=: paths=($PATH) -IFS=: rubylibs=($RUBYLIB) +add_prefix() { + local prefix=$1 + local dir -# Scan through prefixes -for prefix in "${prefixes[@]}"; do # PATH dir="$prefix/bin" if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then paths=("$dir" "${paths[@]}") fi + # RUBYLIB dir="$prefix/lib" if [[ -d "$dir" ]] && ! in_array "$dir" "${rubylibs[@]}"; then rubylibs=("$dir" "${rubylibs[@]}") fi -done +} -# Finally, print our values -IFS=: PATH="${paths[*]}" -IFS=: RUBYLIB="${rubylibs[*]}" +main() { + # Import existing values + declare -ga paths rubylibs + IFS=: paths=($PATH) + IFS=: rubylibs=($RUBYLIB) + + the_guts + + # Put our values into the env variables + IFS=: PATH="${paths[*]}" + IFS=: RUBYLIB="${rubylibs[*]}" + + # Finally, print the values + # The sed bit here is the only time we call an external program + { + declare -p PATH + declare -p RUBYLIB + } | sed 's/^declare \(-\S* \)*//' +} -# The sed bit here is the only time we call an external program -{ - declare -p PATH - declare -p RUBYLIB -} | sed 's/^declare \(-\S* \)*//' +main -- cgit v1.1-4-g5e80 From 480d42ba2f7339a1c992e035f0ad90fcac416346 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:13:58 -0400 Subject: wmii: make fltk windows be floating --- .config/wmii-hg/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/wmii-hg/rules b/.config/wmii-hg/rules index cf735c9..3576983 100644 --- a/.config/wmii-hg/rules +++ b/.config/wmii-hg/rules @@ -4,5 +4,7 @@ /nm-applet/ floating=off +/^FLTK:FLTK:/ floating=always + /Emacs|Navigator/ force-tags=+sel floating=never /.*/ floating=off -- cgit v1.1-4-g5e80 From c17c631a9f835eca8dd09a5aaf6039a3cfd9354b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:14:36 -0400 Subject: systemd --- .config/systemd/user/default.target.wants/batterymon.service | 9 --------- .../systemd/user/default.target.wants/maildirproc@att.service | 1 + .../user/default.target.wants/maildirproc@purdue.service | 1 + .config/systemd/user/default.target.wants/vncserver@1.service | 1 + .config/systemd/user/maildirproc@.service | 10 ++++++++++ .config/systemd/user/vncserver@.service | 11 +++++++++++ 6 files changed, 24 insertions(+), 9 deletions(-) delete mode 100644 .config/systemd/user/default.target.wants/batterymon.service create mode 120000 .config/systemd/user/default.target.wants/maildirproc@att.service create mode 120000 .config/systemd/user/default.target.wants/maildirproc@purdue.service create mode 120000 .config/systemd/user/default.target.wants/vncserver@1.service create mode 100644 .config/systemd/user/maildirproc@.service create mode 100644 .config/systemd/user/vncserver@.service diff --git a/.config/systemd/user/default.target.wants/batterymon.service b/.config/systemd/user/default.target.wants/batterymon.service deleted file mode 100644 index c8abc0d..0000000 --- a/.config/systemd/user/default.target.wants/batterymon.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Battery monitor - -[Service] -Type=simple -ExecStart=/usr/bin/batterymon 20 "amixer sset Master unmute 100%; espeak 'PLUG ME IN'; sleep 7;" - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/maildirproc@att.service b/.config/systemd/user/default.target.wants/maildirproc@att.service new file mode 120000 index 0000000..1079515 --- /dev/null +++ b/.config/systemd/user/default.target.wants/maildirproc@att.service @@ -0,0 +1 @@ +/home/luke/.config/systemd/user/maildirproc@.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/maildirproc@purdue.service b/.config/systemd/user/default.target.wants/maildirproc@purdue.service new file mode 120000 index 0000000..1079515 --- /dev/null +++ b/.config/systemd/user/default.target.wants/maildirproc@purdue.service @@ -0,0 +1 @@ +/home/luke/.config/systemd/user/maildirproc@.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/vncserver@1.service b/.config/systemd/user/default.target.wants/vncserver@1.service new file mode 120000 index 0000000..2dcf488 --- /dev/null +++ b/.config/systemd/user/default.target.wants/vncserver@1.service @@ -0,0 +1 @@ +/home/luke/.config/systemd/user/vncserver@.service \ No newline at end of file diff --git a/.config/systemd/user/maildirproc@.service b/.config/systemd/user/maildirproc@.service new file mode 100644 index 0000000..bdca746 --- /dev/null +++ b/.config/systemd/user/maildirproc@.service @@ -0,0 +1,10 @@ +[Unit] +Description=maildirproc mail filter + +[Service] +Type=simple +ExecStart=/usr/bin/maildirproc -r ${HOME}/.config/maildirproc/%I.rc +Restart=on-failure + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service new file mode 100644 index 0000000..fa616d6 --- /dev/null +++ b/.config/systemd/user/vncserver@.service @@ -0,0 +1,11 @@ +[Unit] +Description=VNC desktop + +[Service] +Type=simple +ExecStart=/bin/bash -l -c 'vncserver -fg :%I' +Restart=always +ExecStopPost=/bin/rm /tmp/.X%I-lock /tmp/.X11-unix/X%I + +[Install] +WantedBy=default.target -- cgit v1.1-4-g5e80 From 405c78d52cf188e65914cbe6a76780b20e40ca70 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 10 Oct 2014 17:31:59 -0400 Subject: .gitignore --- .config/.gitignore | 20 +++++++++++--------- .local/.gitignore | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .local/.gitignore diff --git a/.config/.gitignore b/.config/.gitignore index b5b3b3c..829cfee 100644 --- a/.config/.gitignore +++ b/.config/.gitignore @@ -2,18 +2,20 @@ # Ignore things I don't care enough about to track /Trolltech.conf -/vlc -/purple +/ImageMagick/ +/menus/ +/purple/ +/vlc/ -# some 3d graphics toolkit -/Kitware # KDE color picker -/colors +/colors/ # binary, not helpful to track /dconf/user +/icedtea-web/security/*certs # Ignore these files that if I tracked them, would be a separate repo -/libreoffice -/transmission -/gimp-* -/netbeans +/deluge/ +/gimp-*/ +/libreoffice/ +/netbeans/ +/transmission/ diff --git a/.local/.gitignore b/.local/.gitignore new file mode 100644 index 0000000..8d0c87d --- /dev/null +++ b/.local/.gitignore @@ -0,0 +1 @@ +/share/ -- cgit v1.1-4-g5e80 From 349db231a8a0d6d2e54c71c32e2868d118f02b9e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 22:15:01 -0500 Subject: update the cron offlineimap to the new thingutils --- .config/cron/offlineimap | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/cron/offlineimap b/.config/cron/offlineimap index 9de9de1..fe0bfd4 100644 --- a/.config/cron/offlineimap +++ b/.config/cron/offlineimap @@ -1,2 +1,3 @@ -# m h dom mon dow command -*/5 * * * * offlineimap-runner 2 -u quiet +#m h dom mon dow command +*/5 * * * * offlineimap-runner -u quiet +*/5 * * * * offlineimap-killer $((60*30)) -- cgit v1.1-4-g5e80 From 8d5402c81566b7dbef4839a78b5cb2623b9857a0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 22:21:43 -0500 Subject: upgrade emacs --- .config/emacs/custom.el | 4 +++- .config/emacs/emacsutils.el | 13 ------------- .config/emacs/init.el | 20 -------------------- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 .config/emacs/emacsutils.el diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index af2aef8..26eb2ae 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -4,7 +4,9 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-enabled-themes (quote (tango-dark))) - '(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) + '(custom-safe-themes + (quote + ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default))) '(erc-nick "lukeshu") '(explicit-shell-file-name "/bin/bash") '(scroll-bar-mode nil) diff --git a/.config/emacs/emacsutils.el b/.config/emacs/emacsutils.el deleted file mode 100644 index 966d16e..0000000 --- a/.config/emacs/emacsutils.el +++ /dev/null @@ -1,13 +0,0 @@ -(defun mailto-compose-mail (mailto-url) - (if (and (stringp mailto-url) - (string-match "\\`mailto:" mailto-url)) - (progn - (require 'rfc2368) - (let* ((headers (mapcar (lambda (h) (cons (intern (car h)) (cdr h))) - (rfc2368-parse-mailto-url mailto-url))) - (good-headers (remove-if (lambda (h) (member (car h) '(Body))) headers)) - (body (cdr (assoc 'Body headers)))) - (wl-draft good-headers nil nil body))))) - -(defun emacs-terminal-emulator (program) - (ansi-term program)) \ No newline at end of file diff --git a/.config/emacs/init.el b/.config/emacs/init.el index a36cf37..f766ac5 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -34,7 +34,6 @@ point-entered minibuffer-avoid-prompt face minibuffer-prompt )) -(add-to-list 'load-path user-emacs-directory) (load custom-file 'noerror) @@ -129,15 +128,6 @@ (let ((indent-tabs-mode nil)) ad-do-it)) (require 'go-mode-load nil t) -(require 'uniquify) -(load "emacsutils") - -(setq-default truncate-lines t) -(setq - inhibit-startup-screen t - org-log-done 'time - gamegrid-user-score-file-directory "/var/games/emacs/" - ) @@ -201,16 +191,6 @@ browse-url-browser-function 'browse-url-generic ) -;; Make work like in every other program -(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))))) -(global-set-key [f11] 'toggle-fullscreen) ;; Automatically load smerge mode for merge files (defun try-smerge-mode () -- cgit v1.1-4-g5e80 From a12f3189bcf6d2cf277acfa7824961b158bd57e6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 22:38:56 -0500 Subject: stuff --- .config/emacs/init.el | 28 +++++++-- .config/gtk-3.0/settings.ini | 4 +- .config/maildirproc/att.rc | 136 ++++++++++++++++++++++------------------- .config/maildirproc/purdue.rc | 7 ++- .config/wmii-hg/config.sh | 20 +++--- .config/wmii-hg/util.sh | 2 +- .config/wmii-hg/wmiirc | 4 +- .gtkrc-2.0 | 2 +- .gtkrc-2.0.mine | 2 +- .local/bin/pick | 4 +- .local/bin/x-pdf | 3 +- .local/bin/x-terminal-emulator | 3 +- .local/bin/x-www-browser | 3 +- 13 files changed, 126 insertions(+), 92 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index f766ac5..4bce12a 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -85,7 +85,11 @@ (:name dtrt-indent :type elpa ; Detect indent style for existing files :after (dtrt-indent-mode 1)) (:name page-break-lines :type elpa ; Display form-feeds pretty - :after (global-page-break-lines-mode 1)) + :after '(lambda () + (define-global-minor-mode global-page-break-lines-mode + page-break-lines-mode page-break-lines-mode + :group 'page-break-lines) + (global-page-break-lines-mode 1))) (:name smart-tabs-mode :type elpa ; Indent with tabs, align with spaces :after (progn (smart-tabs-mode 1) @@ -124,7 +128,7 @@ (when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(defadvice align-regexp (around align-with-spaces) +(defadvice align-regexp (around lukeshu-align-with-spaces) (let ((indent-tabs-mode nil)) ad-do-it)) (require 'go-mode-load nil t) @@ -178,7 +182,7 @@ ;; Backup settings (setq backup-by-copying t ;; don't clobber symlinks - backup-directory-alist '(("." . (concat xdg-cache-home "emacs/saves"))) ;; don't litter my fs tree + backup-directory-alist '(("." . "~/.cache/emacs/saves")) ;; don't litter my fs tree delete-old-versions t kept-new-versions 6 kept-old-versions 2 @@ -191,6 +195,11 @@ browse-url-browser-function 'browse-url-generic ) +;; Ediff settings +(setq + ediff-window-setup-function 'ediff-setup-windows-plain + ediff-split-window-function 'split-window-horizontally + ) ;; Automatically load smerge mode for merge files (defun try-smerge-mode () @@ -233,9 +242,20 @@ )) (add-hook 'php-mode-hook - '(lambda() + '(lambda () (c-set-offset 'cpp-macro 0) )) +(add-hook 'tex-mode-hook + '(lambda () + (set (make-local-variable 'tab-always-indent) nil) + (set (make-local-variable 'indent-tabs-mode) t) + )) + +(add-hook 'sh-mode-hook + '(lambda () + (sh-electric-here-document-mode 0) + )) + (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index 9801ab0..78116f3 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -1,7 +1,7 @@ -[Settings] +[Settings] gtk-theme-name=oxygen-gtk gtk-icon-theme-name=oxygen -gtk-fallback-icon-theme=gnome +gtk-fallback-icon-theme=mate gtk-font-name=Sans 10 gtk-cursor-theme-name=Vanilla-DMZ gtk-cursor-theme-size=0 diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index e7f581b..b8ff8f1 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -2,6 +2,7 @@ import os import subprocess +import datetime processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True @@ -24,6 +25,9 @@ def is_to_or_from_re(mail,address): return ( mail["From"].matches(address) or mail.target.matches(address)) +def move_ham(mail,folder): + y = datetime.datetime.now().year + mail.move("FOLDERS.Ham."+str(y)+folder) def bogofilter_auto(mail): p = subprocess.Popen( @@ -57,18 +61,30 @@ def handle_incoming_spam(mail): def handle_incoming_unknown(mail): # Filter spam + # Whitelist if ( False - or mail["Subject"].contains("[systemd-devel]") - or mail["Subject"].contains("[PATCH") - or mail["Subject"].contains("[Dev]") - or mail["Subject"].contains("[Maintenance]") - or is_to_or_from(mail, "gnu.org") or is_to_or_from(mail, "fsf.org") + or is_to_or_from(mail, "gnu.org") + or is_to_or_from(mail, "parabola.nu") + or is_to_or_from(mail, "parabolagnulinux.org") + or mail["From"] == "MAILER-DAEMON@yahoo.com" + or mail["From"].contains("@facebookmail.com>") + or mail["From"].contains("@gandi.net") + or mail["From"].contains("@goodwillindy.org>") + or mail["From"].contains("@lpi.org>") + or mail["From"].contains("@msdlt.k12.in.us>") or mail["From"].contains("@parabola.nu") + or mail["From"].contains("@post.oreilly.com>") + or mail["From"].contains("@scouting.org>") + or mail["From"].contains("@wolframalpha.com>") or mail["From"].contains("parabolagnulinux.org") - or mail["From"].contains("@facebookmail.com>") or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre)\.org") + or mail["List-Id"].matches(".*\.parabola\.nu") + or mail["Subject"].contains("[Dev]") + or mail["Subject"].contains("[Maintenance]") + or mail["Subject"].contains("[PATCH") + or mail["Subject"].contains("[systemd-devel]") ): handle_incoming_ham_training(mail) return @@ -95,7 +111,7 @@ def my_filters(mail): or mail["List-Id"].matches(list+"\.gnu\.org") or mail["Subject"].contains('['+list+']') ): - mail.move("FOLDERS.Ham.software."+list) + move_ham(mail,".software."+list) return # Sort mail from other software mailing lists @@ -104,25 +120,19 @@ def my_filters(mail): or mail["List-Id"].matches("social-discuss\.gnu\.org") or mail["Subject"].contains("social-discuss") ): - mail.move("FOLDERS.Ham.software.social") + move_ham(mail,".software.social") return if mail["List-Id"].matches("networkmanager-list\.gnome\.org"): - mail.move("FOLDERS.Ham.software.networkmanager") + move_ham(mail,".software.networkmanager") return if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): - if mail["Subject"].matches("Cron <.*@repo>"): - mail.move("FOLDERS.Ham.software.parabola-maintenance.cron-repo") - return - if mail["Subject"].matches("Cron <.*@parabolagnulinux>"): - mail.move("FOLDERS.Ham.software.parabola-maintenance.cron-web") - return - mail.move("FOLDERS.Ham.software.parabola-maintenance") + move_ham(mail,".software.parabola.maintenance") return if is_to_or_from(mail, "labs@parabola.nu"): - mail.move("FOLDERS.Ham.software.parabola-labs") + move_ham(mail,".software.parabola.labs") return if ( @@ -133,29 +143,30 @@ def my_filters(mail): or is_to_or_from(mail, "parabola.nu") ): if mail["Subject"].contains("[Django]"): - mail.move("FOLDERS.Ham.software.parabola-maintenance.django") + move_ham(mail,".software.parabola.maintenance.django") + return + else: + move_ham(mail,".software.parabola.dev") return - mail.move("FOLDERS.Ham.software.parabola-dev") - return if (mail["List-Id"].matches("pacman-dev.archlinux.org")): - mail.move("FOLDERS.Ham.software.pacman-dev") + move_ham(mail,".software.pacman-dev") return if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org") or is_to_or_from(mail, "systemd-devel@lists.freedesktop.org")): - mail.move("FOLDERS.Ham.software.systemd-devel") + move_ham(mail,".software.systemd-devel") return for subject_re in [ "\[Stow-[^\]]*\].*", ]: if mail["Subject"].matches(subject_re): - mail.move("FOLDERS.Ham.software") + move_ham(mail,".software") return # Sort mail from some social websites if mail["From"].matches("facebook(|mail)\.com"): - mail.move("FOLDERS.Ham.Social.Facebook") + move_ham(mail,".Social.Facebook") return if ( @@ -163,15 +174,24 @@ def my_filters(mail): or mail["From"].matches("identi\.ca") or mail["From"].matches("statusnet") ): - mail.move("FOLDERS.Ham.Social.Identica") + move_ham(mail,".Social.Identica") return + if ( + False + or mail["From"].contains("@gandi.net") + or mail["From"].contains("@ramhost.us") + or mail["From"].contains("@startcom.org") + ): + move_ham(mail,".lukeshu-com") + return + if mail["From"].matches("twitter\.com"): - mail.move("FOLDERS.Ham.Social.Twitter") + move_ham(mail,".Social.Twitter") return if mail["From"].matches("@xkcd\.com"): - mail.move("FOLDERS.Ham.Social.xkcd") + move_ham(mail,".Social.xkcd") return # Sort mail related to Troop 276 @@ -195,30 +215,24 @@ def my_filters(mail): or is_to_or_from(mail,"mytroop.us") or is_to_or_from(mail,"crossroadsbsa.org") ): - mail.move("FOLDERS.Ham.BoyScouts") + move_ham(mail,".BoyScouts") return # Sort mail from misc people - if mail["From"].matches("margieshu@sbcglobal\.net"): - mail.move("FOLDERS.Ham.misc.Mom") + if ( + False + or is_to_or_from(mail,"margieshu@sbcglobal.net") + or is_to_or_from(mail,"3174451635@mms.att.net") + ): + move_ham(mail,".misc.Mom") return for address in [ - "justicejade10@aol.com", - "parsonsjade@aol.com", - "parsonstjade@gmail.com", - "jadparso@umail.iu.edu", - ]: - if is_to_or_from(mail,address): - mail.move("FOLDERS.Ham.misc.Jade") - return - - for address in [ "nintendo.com", "nintendo-news.com", ]: if mail["From"].contains(address): - mail.move("FOLDERS.Ham.misc.Nintendo") + move_ham(mail,".misc.Nintendo") return for address in [ @@ -227,7 +241,7 @@ def my_filters(mail): "CompTIA", ]: if mail["From"].contains(address): - mail.move("FOLDERS.Ham.misc.CompTIA") + move_ham(mail,".misc.CompTIA") return # Sort mail from FRC people @@ -252,15 +266,16 @@ def my_filters(mail): "william.walk@gmail.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.Ham.School.Robotics") + move_ham(mail,".School.Robotics") return for subject_re in [ "robotics", - "1024", + "\b1024\b", + "\b4272\b", "kil-?a-?bytes", ]: if mail["Subject"].matches(subject_re): - mail.move("FOLDERS.Ham.School.Robotics") + move_ham(mail,".School.Robotics") return # Sort mail from software people @@ -282,7 +297,7 @@ def my_filters(mail): "trustees@core3.amsl.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.Ham.software") + move_ham(mail,".software") return @@ -292,16 +307,16 @@ def my_filters(mail): or is_to_or_from(mail, "@lnnorthstar.org") or is_to_or_from(mail, "lnnorthstar.org@tigertech.net") ): - mail.move("FOLDERS.Ham.School.Newspaper") + move_ham(mail,".School.Newspaper") return # Sort mail from various employers/people who pay me if is_to_or_from(mail, "@precisepath.com"): - mail.move("FOLDERS.Ham.Work.PrecisePath") + move_ham(mail,".Work.PrecisePath") return if is_to_or_from(mail,"susyphil@aol.com"): - mail.move("FOLDERS.Ham.Work.PMCH") + move_ham(mail,".Work.PMCH") for address in [ "d.farrar@comcast.net", @@ -309,7 +324,7 @@ def my_filters(mail): "@vmware.com", ]: if is_to_or_from(mail,address): - mail.move("FOLDERS.Ham.Work.FAST") + move_ham(mail,".Work.FAST") return # Sort misc newsletters @@ -323,7 +338,7 @@ def my_filters(mail): or mail["From"].contains("info@demandprogress.org") or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): - mail.move("FOLDERS.Ham.misc.Newsletters") + move_ham(mail,".misc.Newsletters") return if ( @@ -339,7 +354,7 @@ def my_filters(mail): or mail["Subject"].contains("NHS") or mail["Subject"].contains("National Honor Society") ): - mail.move("FOLDERS.Ham.School") + move_ham(mail,".School") return # from college stuff @@ -348,44 +363,41 @@ def my_filters(mail): or mail["Subject"].contains("NYLF") # National Youth Leadership Conference or mail["Subject"].contains("NSHSS") ): - mail.move("FOLDERS.Ham.College.Societies") + move_ham(mail,".College.Societies") return if ( False - #or mail["From"].contains(".edu") or mail["From"].contains("admissions@") - #or mail["From"].contains("college") - #or mail["From"].contains("university") or mail["Subject"].contains("college") # now we get to the BS or mail["From"].contains("@dreamitdoitindiana.com") or mail["From"].contains("@indianatechinfo.org") ): - mail.move("FOLDERS.Ham.College") + move_ham(mail,".College") return if mail["From"].contains("@projectwonderful.com"): - mail.move("FOLDERS.Ham.misc.ProjectWonderful") + move_ham(mail,".misc.ProjectWonderful") return if ( False or mail["From"].matches("@localhost") or mail["From"].matches("@[^,>]*\.local") - or mail["From"].matches("@[^,>]*\.lukeshu\.ath\.cx") + or mail["From"].matches("@[^,>]*\.lan") or mail["To"].matches("luke@") ): - mail.move("FOLDERS.Ham.LocalSystems") + move_ham(mail,".LocalSystems") return if ( False or mail["Subject"].contains("password") or mail["Subject"].contains("account") ): - mail.move("FOLDERS.Ham.misc.accounts") + move_ham(mail,".misc.accounts") return - mail.move("FOLDERS.Ham") + move_ham(mail,"") handle_mapping = { "Inbox": handle_incoming_unknown, diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index 7b75d7c..61c264c 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -79,6 +79,7 @@ def my_filters(mail): or is_to_or_from(mail, "@duke-energy.com") or is_to_or_from(mail, "@alerts.comcast.net") or is_to_or_from(mail, "rentpayment.com") + or is_to_or_from(mail, "@vectren.com") ): mail.move("INBOX.housing.BeauJardin") return @@ -214,7 +215,11 @@ def my_filters(mail): mail.move("INBOX.classes.2014-2.MA416") return # PHYS221 - if (is_to_or_from(mail, "cui@purdue.edu") or is_to_or_from(mail, "china@purdue.edu")): + if (False + or is_to_or_from(mail, "cui@purdue.edu") + or is_to_or_from(mail, "shina@purdue.edu") + or is_to_or_from(mail, "ajith@purdue.edu") + ): mail.move("INBOX.classes.2014-2.PHYS221") return handle_mapping = { diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 3b1b20f..c560f3f 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -7,7 +7,7 @@ LEFT=b RIGHT=f HIST="$XDG_CACHE_HOME/wmii/history" -mkdir -p "${HIST%/*}" +mkdir -p -- "${HIST%/*}" # Colors tuples: " " . theme-tango-dark @@ -43,12 +43,12 @@ Event() { 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 + while read -r tag; do Event CreateTag "$tag" if [ "$tag" = "$seltag" ]; then Event FocusTag "$tag" fi - done + done < <(lstags) # Run the autostart action Action autostart 2>/dev/null & @@ -138,13 +138,13 @@ Event() { DestroyTag) ## $1=tag rm $WMII_DIR/lbar/$1;; FocusTag) ## $1=tag - echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; + echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; UnfocusTag) ## $1=tag - echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; + echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; UrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;; + echo colors "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;; NotUrgentTag) ## $1=tag $2=[Manager|Client] - echo "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; + echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; ## LeftBar events (usually tag buttons) LeftBarMouseDown) ## $1=button $2=bar_item @@ -219,15 +219,15 @@ Key() { $MODKEY-a) ## Open wmii actions menu Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;; $MODKEY-x) ## Open program menu - PATH=$_PATH setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000) & ;; + (PATH=$_PATH exec setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000)) & ;; $MODKEY-Return) ## Launch a terminal - PATH=$_PATH setsid x-terminal-emulator & ;; + (PATH=$_PATH exec 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 + echo view $tag >> $WMII_DIR/ctl }& ;; $MODKEY-Shift-t) ## Retag the selected client sel=$(sed 1q $WMII_DIR/client/sel/ctl) diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index f15031e..2211d28 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -71,7 +71,7 @@ path_which() { # Lists wmii tags ## lstags() { - ls "$WMII_DIR/tag" | sed -e 's@/$@@' -e '/^sel$/d' + ls "$WMII_DIR/tag" | sed -e 's,/$,,' -e '/^sel$/d' } ################################################################################ diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a7dd80c..a6585de 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -13,6 +13,6 @@ Event WmiircStart trap "Event Quit" EXIT -wmiir read /event 2>/dev/null | while read event; do +while read -r event; do Event $event -done +done < <(wmiir read /event 2>/dev/null) diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 index 06fa847..0701992 100644 --- a/.gtkrc-2.0 +++ b/.gtkrc-2.0 @@ -1,6 +1,7 @@ # DO NOT EDIT! This file will be overwritten by LXAppearance. # Any customization should be done in ~/.gtkrc-2.0.mine instead. +include "/home/luke/.gtkrc-2.0.mine" gtk-theme-name="oxygen-gtk" gtk-icon-theme-name="oxygen" gtk-font-name="Sans 10" @@ -16,4 +17,3 @@ gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle="hintfull" gtk-xft-rgba="rgb" -include "/home/luke/.gtkrc-2.0.mine" diff --git a/.gtkrc-2.0.mine b/.gtkrc-2.0.mine index 4e2ef9a..3cb099a 100644 --- a/.gtkrc-2.0.mine +++ b/.gtkrc-2.0.mine @@ -1 +1 @@ -gtk-fallback-icon-theme="gnome" +gtk-fallback-icon-theme="mate" diff --git a/.local/bin/pick b/.local/bin/pick index ed2d44d..6dc905f 100755 --- a/.local/bin/pick +++ b/.local/bin/pick @@ -19,7 +19,7 @@ if [[ $1 = -s ]]; then shift # Scan to find a running instance for prog in "$@"; do - if [[ -n "`pgrep $prog`" ]]; then + if [[ -n "$(pgrep "${prog%% *}")" ]]; then printf '%s\n' "$prog" exit 0 fi @@ -28,7 +28,7 @@ fi # Scan to find one that is installed for prog in "$@"; do - if [[ -x "`which $prog 2>/dev/null`" ]]; then + if [[ -x "$(which "${prog%% *}" 2>/dev/null)" ]]; then printf '%s\n' "$prog" exit 0 fi diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index 3610fde..cfaa258 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,4 +1,3 @@ #!/bin/sh -`pick zathura mupdf okular evince xpdf` "$@" -exit $? +eval $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@" diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator index 049b081..075dda5 100755 --- a/.local/bin/x-terminal-emulator +++ b/.local/bin/x-terminal-emulator @@ -1,4 +1,3 @@ #!/bin/sh -`pick emacsterm urxvt gnome-terminal xterm` "$@" -exit $? +eval $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@" diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser index bbd8943..945dcfc 100755 --- a/.local/bin/x-www-browser +++ b/.local/bin/x-www-browser @@ -1,4 +1,3 @@ #!/bin/sh -`pick -s conkeror iceweasel icecat firefox` "$@" -exit $? +eval $(pick -s iceweasel icecat firefox conkeror) "$@" -- cgit v1.1-4-g5e80 From 6e8f41fe3b5902194641eee0dacd3816f0765ec8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:34:07 -0500 Subject: bash emacs integration: if DISPLAY=nil, unset it --- .config/bash/rc.d/emacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 12fa9ad..c254ec7 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -85,6 +85,7 @@ if [[ $TERM == eterm* ]]; then # Set the shell's X11 display (emacs -> shell) _emacs_set_shell_DISPLAY() { export DISPLAY=$(_emacs_unquote "$(_emacs_run "(cdr (assoc 'display (frame-parameters)))")") + [[ $DISPLAY != nil ]] || unset DISPLAY } ## Do those things ##################################################### -- cgit v1.1-4-g5e80 From 1bf3ec9c7bd181eb279aad981de2d1376c7298c9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:35:25 -0500 Subject: emacs: I like graphviz-dot-mode --- .config/emacs/init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 4bce12a..d879d5d 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -117,6 +117,7 @@ page-break-lines ; Major modes apel flim semi wanderlust + graphviz-dot-mode markdown-mode nginx-mode ;nxhtml ; nxhtml is invasive, only enable if actively using -- cgit v1.1-4-g5e80 From 1d696096996928bcc29c0c710797413c58ca5d8e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:35:55 -0500 Subject: emacs: switch to the new advice system --- .config/emacs/init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index d879d5d..e25961e 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -129,8 +129,11 @@ (when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(defadvice align-regexp (around lukeshu-align-with-spaces) - (let ((indent-tabs-mode nil)) ad-do-it)) +(defun align-regexp--use-spaces (orig-fun &rest args) + "Use spaces for alignment" + (let ((indent-tabs-mode nil)) + (apply orig-fun args))) +(advice-add 'align-regexp :around #'align-regexp--use-spaces) (require 'go-mode-load nil t) -- cgit v1.1-4-g5e80 From ffc992122569fd3202cead69f72a57e701853821 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:36:30 -0500 Subject: emacs: work around a bug in sh-mode --- .config/emacs/init.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index e25961e..4379085 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -135,6 +135,14 @@ (apply orig-fun args))) (advice-add 'align-regexp :around #'align-regexp--use-spaces) +(defun sh-smie-sh-rules--fix (args) + "Replace :after \"then\" with :after \"if\" because Emacs 24 +sh-script.el is broken." + (if (equal args (list :after "then")) + (list :after "if") + args)) +(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix) + (require 'go-mode-load nil t) -- cgit v1.1-4-g5e80 From 3fed229c02272767ad4b925afcbf73f43be0afbe Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:41:20 -0500 Subject: gpg-agent does not need to be run explictly anymore --- .config/systemd/user/default.target.wants/gpg-agent.service | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .config/systemd/user/default.target.wants/gpg-agent.service diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service deleted file mode 100644 index 93c12b0..0000000 --- a/.config/systemd/user/default.target.wants/gpg-agent.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description="GnuPG agent daemon" - -[Service] -Type=forking -ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg - -[Install] -WantedBy=default.target -- cgit v1.1-4-g5e80 From 6a5bd645c59b44ae87d09cf350b38e04fbf99d81 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:41:56 -0500 Subject: add changes in .conf/systemd --- .../systemd/user/default.target.wants/emacs-daemon.service | 11 +---------- .config/systemd/user/emacs-daemon.service | 10 ++++++++++ .config/systemd/user/x0vncserver@.service | 10 ++++++++++ 3 files changed, 21 insertions(+), 10 deletions(-) mode change 100644 => 120000 .config/systemd/user/default.target.wants/emacs-daemon.service create mode 100644 .config/systemd/user/emacs-daemon.service create mode 100644 .config/systemd/user/x0vncserver@.service diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service deleted file mode 100644 index 279d83a..0000000 --- a/.config/systemd/user/default.target.wants/emacs-daemon.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Emacs deamon - -[Service] -Type=forking -ExecStart=/bin/bash -l -c 'emacs --daemon' -ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service new file mode 120000 index 0000000..5a3b3f7 --- /dev/null +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -0,0 +1 @@ +/home/luke/.config/systemd/user/emacs-daemon.service \ No newline at end of file diff --git a/.config/systemd/user/emacs-daemon.service b/.config/systemd/user/emacs-daemon.service new file mode 100644 index 0000000..279d83a --- /dev/null +++ b/.config/systemd/user/emacs-daemon.service @@ -0,0 +1,10 @@ +[Unit] +Description=Emacs deamon + +[Service] +Type=forking +ExecStart=/bin/bash -l -c 'emacs --daemon' +ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service new file mode 100644 index 0000000..99e897c --- /dev/null +++ b/.config/systemd/user/x0vncserver@.service @@ -0,0 +1,10 @@ +[Unit] +Description=VNC server for X displays + +[Service] +Type=simple +ExecStart=/bin/bash -l -c 'x0vncserver display=:%I PasswordFile="${HOME}/.vnc/passwd"' +Restart=always + +[Install] +WantedBy=default.target -- cgit v1.1-4-g5e80 From 39b328618bbf6e898b4fd1cf2e6207d79bc1769b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:08:37 -0500 Subject: .config/Makefile: use GIT_DIR instead of GITDIR --- .config/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/Makefile b/.config/Makefile index dd4c37f..7293c8a 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -2,10 +2,10 @@ SHELL = /bin/bash -GITDIR = ${HOME}/.git +GIT_DIR = ${HOME}/.git targets = \ - ${GITDIR}/info/exclude \ + ${GIT_DIR}/info/exclude \ ${HOME}/.folders \ ${XDG_CACHE_HOME}/config-symlinks/cookie \ ${XDG_CACHE_HOME}/cron/cookie @@ -15,8 +15,8 @@ clean: rm -f $(targets) ${HOME}/.folders: ${HOME}/Maildir $(MAKEFILE_LIST) - find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf '.%s\n' >'$@' -${GITDIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) + find $< -mindepth 2 -maxdepth 2 \( -type f -name "maildirfolder" -o -type d -name new -o -type d -name tmp -o -type d -name cur \) -printf '%P\0' | xargs -0 dirname -z -- | sort -zu | xargs -0 printf -- '.%s\n' >'$@' +${GIT_DIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ ${XDG_CACHE_HOME}/cron/cookie: ${XDG_CONFIG_HOME}/cron -- cgit v1.1-4-g5e80 From 2c59bc096e4a0ea16d78d4b726a6dfe6c6a60b81 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:09:16 -0500 Subject: .config/Makefile: use .DELETE_ON_ERROR: --- .config/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/Makefile b/.config/Makefile index 7293c8a..909486d 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -35,6 +35,7 @@ ${HOME}/Maildir/%: | ${HOME}/Maildir mkdir -p '$@'/{cur,new,tmp} touch '$@'/maildirfolder +.DELETE_ON_ERROR: .PHONY: FORCE PHONY FORCE: ; PHONY: ; -- cgit v1.1-4-g5e80 From ec527987b4389e3139567d04d66d97db843e46ef Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:10:22 -0500 Subject: Add redshift.conf --- .config/bash/aliases.sh | 8 -------- .config/redshift.conf | 13 +++++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .config/redshift.conf diff --git a/.config/bash/aliases.sh b/.config/bash/aliases.sh index f59eef9..fe4f2c6 100644 --- a/.config/bash/aliases.sh +++ b/.config/bash/aliases.sh @@ -43,14 +43,6 @@ alias gitk='gitk --all --date-order' alias userctl='systemctl --user' ###################################################################### -# Remember lat/long for redshift # -###################################################################### -redshift='redshift -l39.9030:85.9979' -alias gtk-redshift="gtk-$redshift" -alias redshift="$redshift" -unset redshift - -###################################################################### # Some almost-function aliases # ###################################################################### alias lock="clear; away -C 'This terminal is locked'" diff --git a/.config/redshift.conf b/.config/redshift.conf new file mode 100644 index 0000000..25e731a --- /dev/null +++ b/.config/redshift.conf @@ -0,0 +1,13 @@ +[redshift] +; Don't mess with the color, just brightness +temp-day=6500K +temp-night=6500K +brightness-day=1.0 +brightness-night=0.45 + +location-provider=manual +transition=0 + +[manual] +lat=39.9030 +lon=-85.9979 -- cgit v1.1-4-g5e80 From bbf4a28f2a7640ec06d997f9d24c94c5d425dd1b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:12:36 -0500 Subject: emacs/init.el: Use ;; for comment instead of ; --- .config/emacs/init.el | 64 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 4bce12a..479db10 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,5 +1,5 @@ -; This config requires Emacs 24(+?) -;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This config requires Emacs 24(+?) +;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) (setq package-user-dir (concat xdg-cache-home "emacs/elpa") @@ -15,7 +15,7 @@ wl-init-file (concat user-emacs-directory "wl.el") ) -;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;; (show-paren-mode 1) (column-number-mode 1) (line-number-mode 1) @@ -37,18 +37,18 @@ (load custom-file 'noerror) -;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; This isn't particularly important, but set it before doing a whole -; lot (loading packages), so there isn't a weird change in text size. +;;;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This isn't particularly important, but set it before doing a whole +;; lot (loading packages), so there isn't a weird change in text size. (set-face-attribute 'default nil :height 80) -;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; This downloads and installs el-get (package management) if isn't -; installed. +;;;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This downloads and installs el-get (package management) if isn't +;; installed. -; Derived from ELPA installation -; http://tromey.com/elpa/install.html +;; Derived from ELPA installation +;; http://tromey.com/elpa/install.html (defun eval-url (url) (let ((buffer (url-retrieve-synchronously url))) (save-excursion @@ -64,25 +64,25 @@ (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) -;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; This is kinda funny how it works. -; -; package.el/ELPA (The standard package manager in Emacs 24) has -; terrible programatic management. It's great at installing packages, -; but only interactively. So, I -; 1) Disable package.el from getting loading all downloaded packages -; 2) Use el-get to load a specified list of packages from elpa. -; -; This is also nice because I can do event-base programming for what -; to do once a package is loaded, using :after. +;;;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This is kinda funny how it works. +;; +;; package.el/ELPA (The standard package manager in Emacs 24) has +;; terrible programatic management. It's great at installing packages, +;; but only interactively. So, I +;; 1) Disable package.el from getting loading all downloaded packages +;; 2) Use el-get to load a specified list of packages from elpa. +;; +;; This is also nice because I can do event-base programming for what +;; to do once a package is loaded, using :after. (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (setq package-enable-at-startup nil) -; What packages el-get should get from ELPA (if it gets them at all) +;; What packages el-get should get from ELPA (if it gets them at all) (setq el-get-sources '( - ; Minor modes - (:name dtrt-indent :type elpa ; Detect indent style for existing files + ;; Minor modes + (:name dtrt-indent :type elpa ;; Detect indent style for existing files :after (dtrt-indent-mode 1)) (:name page-break-lines :type elpa ; Display form-feeds pretty :after '(lambda () @@ -90,11 +90,11 @@ page-break-lines-mode page-break-lines-mode :group 'page-break-lines) (global-page-break-lines-mode 1))) - (:name smart-tabs-mode :type elpa ; Indent with tabs, align with spaces + (:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces :after (progn (smart-tabs-mode 1) (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) - ; Major modes + ;; Major modes (:name coffee-mode :type elpa :after (add-hook 'coffee-mode-hook '(lambda () @@ -108,18 +108,18 @@ :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) (:name scss-mode :type elpa) )) -; What packages el-get should install, both from above, and it's -; internal list of sources. +;; What packages el-get should install, both from above, and it's +;; internal list of sources. (el-get 'sync '(el-get - ; Minor modes + ;; Minor modes dtrt-indent smart-tabs-mode page-break-lines - ; Major modes + ;; Major modes apel flim semi wanderlust markdown-mode nginx-mode - ;nxhtml ; nxhtml is invasive, only enable if actively using + ;;nxhtml ; nxhtml is invasive, only enable if actively using php-mode-improved )) -- cgit v1.1-4-g5e80 From 10fe774027ba3b5230809a142a499802f977360b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:17:14 -0500 Subject: wmii: mark local variables as local --- .config/wmii-hg/config.sh | 19 ++++++++++--------- .config/wmii-hg/util.sh | 9 +++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index c560f3f..437c585 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -13,7 +13,7 @@ mkdir -p -- "${HIST%/*}" . theme-tango-dark Event() { - event=$1; shift; + local event=$1; shift; case "$event" in ## Mouse event meanings: ## MouseDown = mouse down @@ -42,7 +42,7 @@ Event() { # 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` + local tag seltag="$(sed 1q $WMII_DIR/tag/sel/ctl)" while read -r tag; do Event CreateTag "$tag" if [ "$tag" = "$seltag" ]; then @@ -99,14 +99,14 @@ Event() { NotUrgent) ## $1=client $2=[Manager|Client] ;; ClientMouseDown) ## $1=client $2=button - client=$1 - button=$2 + local client=$1 + local button=$2 case $button in 1) ;; 2) ;; 3) { - case `wmii9menu Delete Fullscreen` in + case $(wmii9menu Delete Fullscreen) in Delete) echo kill >> $WMII_DIR/client/$client/ctl;; Fullscreen) @@ -117,8 +117,9 @@ Event() { ClientClick) ## $1=client $2=button ;; Unresponsive) ## $1=client - client=$1 - client_name=`cat $WMII_DIR/client/$client/label` + local client=$1 + local client_name=$(< $WMII_DIR/client/$client/label) + local msg resp msg="The client \`${client_name}' is not responding." msg+=" What would you like to do?" { @@ -166,7 +167,7 @@ Event() { } Key() { - key=$1 + local key=$1 case "$key" in ## Moving around @@ -239,7 +240,7 @@ Key() { } Action() { - prog=$(path_which "$WMII_CONFPATH" "$1"); shift + local prog=$(path_which "$WMII_CONFPATH" "$1"); shift if [ -n "$prog" ]; then "$prog" "$@" else diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index 2211d28..323d8a6 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -25,11 +25,12 @@ dquote() { # Usage: expand_variables # Expands variables read from /dev/stdin ## -expand_variables() { - while read; do - eval printf "'%s\n'" "$(dquote "$REPLY")" +expand_variables() ( + IFS='' + while read -r line; do + eval printf "'%s\n'" "$(dquote "$line")" done -} +) is_mounted() { local dir="$(readlink -m $1)" -- cgit v1.1-4-g5e80 From d7128cd444fce3129a78e08fe643978fb25c3846 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:17:44 -0500 Subject: wmii: think harder about when to fork --- .config/wmii-hg/config.sh | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 437c585..f7ea3f7 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -51,7 +51,7 @@ Event() { done < <(lstags) # Run the autostart action - Action autostart 2>/dev/null & + Action autostart ;; WmiircQuit) ## No args echo ' ==> Stopping wmiirc' @@ -218,24 +218,22 @@ Key() { ## Running programs $MODKEY-a) ## Open wmii actions menu - Action $(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000) & ;; + local action="$(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000)" + Action "$action" & ;; $MODKEY-x) ## Open program menu - (PATH=$_PATH exec setsid $(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000)) & ;; + local command="$(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000)" || return + ( PATH=$_PATH exec setsid $command ) & ;; $MODKEY-Return) ## Launch a terminal - (PATH=$_PATH exec setsid x-terminal-emulator) & ;; + ( PATH=$_PATH exec 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 - }& ;; + local 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 - }& ;; + local sel=$(sed 1q $WMII_DIR/client/sel/ctl) + local tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return + echo "$tag" >> $WMII_DIR/client/$sel/tags;; esac } -- cgit v1.1-4-g5e80 From 87428a01acb77a94d35c03264d376a2ee3853664 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:18:31 -0500 Subject: wmii: re-jigger the rbar --- .config/wmii-hg/autostart | 6 ++++-- .config/wmii-hg/rbar_acpi | 15 +++++++++++++++ .config/wmii-hg/rbar_battery | 9 --------- .config/wmii-hg/rbar_clock | 8 ++++++-- .config/wmii-hg/rbar_cpu | 12 ------------ .config/wmii-hg/rbar_wifi | 17 +++++++++++++++-- 6 files changed, 40 insertions(+), 27 deletions(-) create mode 100755 .config/wmii-hg/rbar_acpi delete mode 100755 .config/wmii-hg/rbar_battery delete mode 100755 .config/wmii-hg/rbar_cpu diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index cee702a..156fe7d 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -10,5 +10,7 @@ daemon dunst &> /dev/null daemon blueman-applet &> /dev/null daemon clipit -dn &> /dev/null -#Action rbar_cpu 01 & -Action rbar_clock 99 & +PATH="$WMII_CONFPATH:$PATH" +daemon rbar_acpi 97_acpi &> /dev/null +daemon rbar_wifi 98_wifi &> /dev/null +daemon rbar_clock 99_clock &> /dev/null diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi new file mode 100755 index 0000000..1771875 --- /dev/null +++ b/.config/wmii-hg/rbar_acpi @@ -0,0 +1,15 @@ +#!/bin/bash +. include.sh + +id=$1 +trap "rm -f ${WMII_DIR}/rbar/${id}.*" EXIT + +while connected_to_x_server; do + acpi -bt | sed -r \ + -e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \ + -e 's/\s*degrees\s*/°/g' | + cat -n | while read -r n line; do + printf "label %s\n" "$line" >> "${WMII_DIR}/rbar/${id}.${n}" + done + sleep 1 +done diff --git a/.config/wmii-hg/rbar_battery b/.config/wmii-hg/rbar_battery deleted file mode 100755 index f632f7e..0000000 --- a/.config/wmii-hg/rbar_battery +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -. include.sh - -priority=$1 - -while connected_to_x_server; do - printf 'label %s\n' "$(acpi -b)" >> "$WMII_DIR/rbar/${priority}_battery" - sleep 1 -done diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock index 6aecb92..c1692da 100755 --- a/.config/wmii-hg/rbar_clock +++ b/.config/wmii-hg/rbar_clock @@ -1,9 +1,13 @@ #!/bin/bash . include.sh -priority=$1 +id=$1 +trap "rm -f ${WMII_DIR}/rbar/${id}" EXIT while connected_to_x_server; do - printf 'label %s\n' "$(date)" >> "$WMII_DIR/rbar/${priority}_clock" + { + printf 'label ' + date +'%a, %F %T %Z(%:::z)' + } |sponge >> "${WMII_DIR}/rbar/${id}" sleep .5 done diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu deleted file mode 100755 index 5531e60..0000000 --- a/.config/wmii-hg/rbar_cpu +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -. include.sh - -priority=$1 - -while connected_to_x_server; do - # This doesn't work for me, it shows capacity - #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') >> "$WMII_DIR/rbar/${priority}_cpu" - # This actually displays %idle - echo 'label CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' >> "$WMII_DIR/rbar/${priority}_cpu" - sleep 1 -done diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index 18395a3..53464dc 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -1,9 +1,22 @@ #!/bin/bash . include.sh -priority=$1 +id=$1 +trap "rm -f ${WMII_DIR}/rbar/${id}" EXIT + +iwinfo() { + interface=$1 + iwconfig "$interface" | + sed -r 's/ {2,}/\n/g' | + sed -e '/^\s*$/d' -e 's/:\s*/=/' \ + -e '1s/^/Interface=/' \ + -e '2s/^/MAC Protocol=/' +} while connected_to_x_server; do - echo 'label Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi" + { + printf 'label ' + iwinfo wlp2s0|grep -E '^(ESSID|Link Quality)='|sed 'N;s/\n/ | /' + } | sponge >> "${WMII_DIR}/rbar/${id}" sleep 1 done -- cgit v1.1-4-g5e80 From 9316d6ee300ef980a38b7a3ba1da689065414795 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:20:36 -0500 Subject: wmii: {Not,}UrgentTag's arguments are actually flipped from the man page. --- .config/wmii-hg/config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index f7ea3f7..888c3ae 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -142,10 +142,10 @@ Event() { echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; UnfocusTag) ## $1=tag echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; - UrgentTag) ## $1=tag $2=[Manager|Client] - echo colors "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;; - NotUrgentTag) ## $1=tag $2=[Manager|Client] - echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; + UrgentTag) ## $1=[Manager|Client] $2=tag + echo colors "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$2;; + NotUrgentTag) ## $1=[Manager|Client] $2=tag + echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$2;; ## LeftBar events (usually tag buttons) LeftBarMouseDown) ## $1=button $2=bar_item -- cgit v1.1-4-g5e80 From 9472425275b9cfbaa99301621c338faa5e0a61f6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:21:03 -0500 Subject: ssh: clean up old hosts, add new hosts --- .config/ssh/config | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.config/ssh/config b/.config/ssh/config index 2a5b79a..7d7704e 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -15,17 +15,7 @@ Host *.cs.purdue.edu # Parabola ################################################# -# short names -Host repo - HostName repo.parabolagnulinux.org -Host wiki - HostName wiki.parabolagnulinux.org -Host projects - HostName projects.parabolagnulinux.org -Host parabola - HostName parabolagnulinux.org - -Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu +Host parabola.nu Port 1863 User lukeshu @@ -34,3 +24,12 @@ Host *.parabolagnulinux.org parabolagnulinux.org *.parabola.nu parabola.nu Host lukeshu.com Port 1863 User lukeshu + +Host build64-par + Port 22 + User luke + +Host build64-par-far + Port 1864 + HostName lukeshu.com + User luke -- cgit v1.1-4-g5e80 From 952768c46ae11e0bb1cb01f527153f6cd2d9ba62 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:22:47 -0500 Subject: clean up systemd configuration --- .../systemd/user/default.target.wants/emacs-daemon.service | 11 +---------- .config/systemd/user/default.target.wants/gpg-agent.service | 10 +--------- .../systemd/user/default.target.wants/maildirproc@att.service | 1 - .../user/default.target.wants/maildirproc@purdue.service | 1 - .config/systemd/user/default.target.wants/vncserver@1.service | 1 - .config/systemd/user/emacs-daemon.service | 10 ++++++++++ .config/systemd/user/gpg-agent.service | 9 +++++++++ .config/systemd/user/redshift@.service | 11 +++++++++++ .config/systemd/user/vncserver@.service | 2 +- 9 files changed, 33 insertions(+), 23 deletions(-) mode change 100644 => 120000 .config/systemd/user/default.target.wants/emacs-daemon.service mode change 100644 => 120000 .config/systemd/user/default.target.wants/gpg-agent.service delete mode 120000 .config/systemd/user/default.target.wants/maildirproc@att.service delete mode 120000 .config/systemd/user/default.target.wants/maildirproc@purdue.service delete mode 120000 .config/systemd/user/default.target.wants/vncserver@1.service create mode 100644 .config/systemd/user/emacs-daemon.service create mode 100644 .config/systemd/user/gpg-agent.service create mode 100644 .config/systemd/user/redshift@.service diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service deleted file mode 100644 index 279d83a..0000000 --- a/.config/systemd/user/default.target.wants/emacs-daemon.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Emacs deamon - -[Service] -Type=forking -ExecStart=/bin/bash -l -c 'emacs --daemon' -ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service new file mode 120000 index 0000000..106cf42 --- /dev/null +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -0,0 +1 @@ +/home/lukeshu-parabola/.config/systemd/user/emacs-daemon.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service deleted file mode 100644 index 93c12b0..0000000 --- a/.config/systemd/user/default.target.wants/gpg-agent.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description="GnuPG agent daemon" - -[Service] -Type=forking -ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service new file mode 120000 index 0000000..5727454 --- /dev/null +++ b/.config/systemd/user/default.target.wants/gpg-agent.service @@ -0,0 +1 @@ +/home/lukeshu-parabola/.config/systemd/user/gpg-agent.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/maildirproc@att.service b/.config/systemd/user/default.target.wants/maildirproc@att.service deleted file mode 120000 index 1079515..0000000 --- a/.config/systemd/user/default.target.wants/maildirproc@att.service +++ /dev/null @@ -1 +0,0 @@ -/home/luke/.config/systemd/user/maildirproc@.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/maildirproc@purdue.service b/.config/systemd/user/default.target.wants/maildirproc@purdue.service deleted file mode 120000 index 1079515..0000000 --- a/.config/systemd/user/default.target.wants/maildirproc@purdue.service +++ /dev/null @@ -1 +0,0 @@ -/home/luke/.config/systemd/user/maildirproc@.service \ No newline at end of file diff --git a/.config/systemd/user/default.target.wants/vncserver@1.service b/.config/systemd/user/default.target.wants/vncserver@1.service deleted file mode 120000 index 2dcf488..0000000 --- a/.config/systemd/user/default.target.wants/vncserver@1.service +++ /dev/null @@ -1 +0,0 @@ -/home/luke/.config/systemd/user/vncserver@.service \ No newline at end of file diff --git a/.config/systemd/user/emacs-daemon.service b/.config/systemd/user/emacs-daemon.service new file mode 100644 index 0000000..279d83a --- /dev/null +++ b/.config/systemd/user/emacs-daemon.service @@ -0,0 +1,10 @@ +[Unit] +Description=Emacs deamon + +[Service] +Type=forking +ExecStart=/bin/bash -l -c 'emacs --daemon' +ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/gpg-agent.service b/.config/systemd/user/gpg-agent.service new file mode 100644 index 0000000..93c12b0 --- /dev/null +++ b/.config/systemd/user/gpg-agent.service @@ -0,0 +1,9 @@ +[Unit] +Description="GnuPG agent daemon" + +[Service] +Type=forking +ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/redshift@.service b/.config/systemd/user/redshift@.service new file mode 100644 index 0000000..41a0b7a --- /dev/null +++ b/.config/systemd/user/redshift@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Redshift display colour temperature adjustment +Documentation=http://jonls.dk/redshift/ + +[Service] +Environment=DISPLAY=%I +ExecStart=/usr/bin/redshift +Restart=always + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service index fa616d6..ef83ef2 100644 --- a/.config/systemd/user/vncserver@.service +++ b/.config/systemd/user/vncserver@.service @@ -3,7 +3,7 @@ Description=VNC desktop [Service] Type=simple -ExecStart=/bin/bash -l -c 'vncserver -fg :%I' +ExecStart=/bin/bash -l -c 'vncserver -fg %I' Restart=always ExecStopPost=/bin/rm /tmp/.X%I-lock /tmp/.X11-unix/X%I -- cgit v1.1-4-g5e80 From e9ffdb22ece018ea6216e69b9ee5ed32950f61c8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Jan 2015 13:23:30 -0500 Subject: emacs: fix warning from the page-break-lines :after hook --- .config/emacs/init.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 479db10..246ea6a 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -84,12 +84,12 @@ ;; Minor modes (:name dtrt-indent :type elpa ;; Detect indent style for existing files :after (dtrt-indent-mode 1)) - (:name page-break-lines :type elpa ; Display form-feeds pretty - :after '(lambda () - (define-global-minor-mode global-page-break-lines-mode - page-break-lines-mode page-break-lines-mode - :group 'page-break-lines) - (global-page-break-lines-mode 1))) + (:name page-break-lines :type elpa ;; Display form-feeds pretty + :after (progn + (define-global-minor-mode global-page-break-lines-mode + page-break-lines-mode page-break-lines-mode + :group 'page-break-lines) + (global-page-break-lines-mode 1))) (:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces :after (progn (smart-tabs-mode 1) -- cgit v1.1-4-g5e80 From 11e461d0fea5aaf33a31ebb88a17135b46c9483d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:32:22 -0500 Subject: .local/lib/xdg.sh: handle setting XDG_RUNTIME_DIR better This is based off of the TMPDIR hack I use on the Purdue CS boxes. --- .local/lib/xdg.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.local/lib/xdg.sh b/.local/lib/xdg.sh index 2241d2e..20fab4b 100644 --- a/.local/lib/xdg.sh +++ b/.local/lib/xdg.sh @@ -17,7 +17,28 @@ if [[ -n $XDG_RUNTIME_DIR ]] && [[ ! -d $XDG_RUNTIME_DIR ]]; then fi # Set XDG_RUNTIME_DIR if we can -if [[ -z $XDG_RUNTIME_DIR ]] && [[ -n $TMPDIR ]]; then - export XDG_RUNTIME_DIR="$TMPDIR/xdg-runtime" - install -dm0700 "$XDG_RUNTIME_DIR" +if [[ -z $XDG_RUNTIME_DIR ]] && type flock &>/dev/null; then + _diy_xdg_runtime_login() { + export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" + readonly XDG_RUNTIME_DIR + # There's a race condition here, between the `ln -s` and `flock`. + # But it's not like I'll be hammering a box with logins. + if [[ ! -d "$XDG_CACHE_HOME" ]]; then + local tmp="$(mktemp --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" + ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" + fi + if ! [[ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]]; then + exec 7 >"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" + fi + if flock -sn 7; then + trap _diy_xdg_runtime_logout EXIT + fi + } + _diy_xdg_runtime_logout() { + if flock -xn 7; then + rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" + fi + } + _diy_xdg_runtime_login fi -- cgit v1.1-4-g5e80 From 7147501a1a7a60344c4a0b856abea25c5a382428 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:34:11 -0500 Subject: .local/bin/x-*: exec not eval; I'm smert. --- .local/bin/x-pdf | 2 +- .local/bin/x-terminal-emulator | 2 +- .local/bin/x-www-browser | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index cfaa258..8f9ef60 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@" +exec $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@" diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator index 075dda5..2e158cf 100755 --- a/.local/bin/x-terminal-emulator +++ b/.local/bin/x-terminal-emulator @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@" +exec $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@" diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser index 945dcfc..b0b05e0 100755 --- a/.local/bin/x-www-browser +++ b/.local/bin/x-www-browser @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick -s iceweasel icecat firefox conkeror) "$@" +exec $(pick -s iceweasel icecat firefox conkeror) "$@" -- cgit v1.1-4-g5e80 From 435a7b5e8e590240340232cc1832ead32b87adc6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:34:26 -0500 Subject: .local/bin/xmessage: get in on the exec party --- .local/bin/xmessage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/xmessage b/.local/bin/xmessage index bd30b5e..08fd95e 100755 --- a/.local/bin/xmessage +++ b/.local/bin/xmessage @@ -1,2 +1,2 @@ #!/bin/sh -gxmessage $@ -fn 'Monospace' +exec gxmessage $@ -fn 'Monospace' -- cgit v1.1-4-g5e80 From a9935b7a12a522937d91cb44a0e138132b555e16 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:48:11 -0500 Subject: Re-jigger to use systemd for the process monitor for the window manager --- .config/X11/clientrc | 17 ++++++++--------- .config/systemd/user/dunst@.service | 10 ++++++++++ .config/systemd/user/lxpanel@.service | 10 ++++++++++ .config/systemd/user/rbar@.service | 7 +++++++ .config/systemd/user/redshift@.service | 6 +++--- .config/systemd/user/wmii@.service | 12 ++++++++++++ .../systemd/user/wmii@.service.wants/lxpanel@.service | 1 + .../user/wmii@.service.wants/rbar@97_acpi.service | 1 + .../user/wmii@.service.wants/rbar@98_wifi.service | 1 + .../user/wmii@.service.wants/rbar@99_clock.service | 1 + .../systemd/user/wmii@.service.wants/redshift@.service | 1 + .../systemd/user/wmii@.service.wants/xcompmgr@.service | 1 + .config/systemd/user/xcompmgr@.service | 10 ++++++++++ .config/wmii-hg/autostart | 16 ---------------- .config/wmii-hg/config.sh | 3 --- .config/wmii-hg/rbar | 9 +++++++++ 16 files changed, 75 insertions(+), 31 deletions(-) create mode 100644 .config/systemd/user/dunst@.service create mode 100644 .config/systemd/user/lxpanel@.service create mode 100644 .config/systemd/user/rbar@.service create mode 100644 .config/systemd/user/wmii@.service create mode 120000 .config/systemd/user/wmii@.service.wants/lxpanel@.service create mode 120000 .config/systemd/user/wmii@.service.wants/rbar@97_acpi.service create mode 120000 .config/systemd/user/wmii@.service.wants/rbar@98_wifi.service create mode 120000 .config/systemd/user/wmii@.service.wants/rbar@99_clock.service create mode 120000 .config/systemd/user/wmii@.service.wants/redshift@.service create mode 120000 .config/systemd/user/wmii@.service.wants/xcompmgr@.service create mode 100644 .config/systemd/user/xcompmgr@.service delete mode 100755 .config/wmii-hg/autostart create mode 100755 .config/wmii-hg/rbar diff --git a/.config/X11/clientrc b/.config/X11/clientrc index 26455d3..d18d714 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -1,9 +1,7 @@ #!/bin/sh -# -# ~/.xinitrc -# -# Executed by startx (run your window manager from here) +# Load system xinit modules (disabled) +# Remove "false &&" to enable if false && [ -d /etc/X11/xinit/xinitrc.d ]; then echo ' ==> Running scripts in Entering xinitrc.d/*' for f in /etc/X11/xinit/xinitrc.d/*; do @@ -19,8 +17,9 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -# exec gnome-session -# exec startkde -# exec startxfce4 -# ...or the Window Manager of your choice -exec wmii +#exec wmii +wm=wmii +systemctl --user start "${wm}@${DISPLAY}.service" +mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" +cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" >/dev/null +rm "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" diff --git a/.config/systemd/user/dunst@.service b/.config/systemd/user/dunst@.service new file mode 100644 index 0000000..2aff6be --- /dev/null +++ b/.config/systemd/user/dunst@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Dunst notification-daemon +Documentation=man:dunst(1) +StopWhenUnneeded=true + +[Service] +Type=simple +Environment=DISPLAY=%I +ExecStart=/usr/bin/dunst +Restart=always diff --git a/.config/systemd/user/lxpanel@.service b/.config/systemd/user/lxpanel@.service new file mode 100644 index 0000000..3327ab4 --- /dev/null +++ b/.config/systemd/user/lxpanel@.service @@ -0,0 +1,10 @@ +[Unit] +Description=LXDE Desktop Panel +Documentation=man:lxpanel(1) +StopWhenUnneeded=true + +[Service] +Type=simple +Environment=DISPLAY=%I +ExecStart=/usr/bin/lxpanel +Restart=always diff --git a/.config/systemd/user/rbar@.service b/.config/systemd/user/rbar@.service new file mode 100644 index 0000000..18d6201 --- /dev/null +++ b/.config/systemd/user/rbar@.service @@ -0,0 +1,7 @@ +[Unit] +Description=WMII rbar %I +StopWhenUnneeded=true + +[Service] +Type=simple +ExecStart=/usr/bin/bash -c '%h/.wmii-hg/rbar %I' diff --git a/.config/systemd/user/redshift@.service b/.config/systemd/user/redshift@.service index 41a0b7a..149bb74 100644 --- a/.config/systemd/user/redshift@.service +++ b/.config/systemd/user/redshift@.service @@ -1,11 +1,11 @@ [Unit] Description=Redshift display colour temperature adjustment Documentation=http://jonls.dk/redshift/ +StopWhenUnneeded=true [Service] +Type=simple Environment=DISPLAY=%I ExecStart=/usr/bin/redshift +ExecStopPost=/usr/bin/redshift -x Restart=always - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service new file mode 100644 index 0000000..10fc4e9 --- /dev/null +++ b/.config/systemd/user/wmii@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Window Manager Improved Improved +Documentation=file:/usr/share/doc/wmii/wmii.pdf + +[Service] +Type=simple +Restart=no + +Environment=DISPLAY=%I +ExecStart=/usr/bin/bash -l -c /usr/bin/wmii +ExecStop=/usr/bin/wmiir xwrite /ctl Quit +ExecStopPost=/usr/bin/bash -c ": > ${XDG_RUNTIME_DIR}/x11-wm@%I" diff --git a/.config/systemd/user/wmii@.service.wants/lxpanel@.service b/.config/systemd/user/wmii@.service.wants/lxpanel@.service new file mode 120000 index 0000000..06ed03f --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/lxpanel@.service @@ -0,0 +1 @@ +../lxpanel@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service b/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service new file mode 120000 index 0000000..286989e --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/rbar@97_acpi.service @@ -0,0 +1 @@ +../rbar@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service b/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service new file mode 120000 index 0000000..286989e --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service @@ -0,0 +1 @@ +../rbar@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service b/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service new file mode 120000 index 0000000..286989e --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/rbar@99_clock.service @@ -0,0 +1 @@ +../rbar@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/redshift@.service b/.config/systemd/user/wmii@.service.wants/redshift@.service new file mode 120000 index 0000000..59234a7 --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/redshift@.service @@ -0,0 +1 @@ +../redshift@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/xcompmgr@.service b/.config/systemd/user/wmii@.service.wants/xcompmgr@.service new file mode 120000 index 0000000..be8518c --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/xcompmgr@.service @@ -0,0 +1 @@ +../xcompmgr@.service \ No newline at end of file diff --git a/.config/systemd/user/xcompmgr@.service b/.config/systemd/user/xcompmgr@.service new file mode 100644 index 0000000..c7844d2 --- /dev/null +++ b/.config/systemd/user/xcompmgr@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Composite Window-Effects Manger +Documentation=man:xcompmgr(1) +StopWhenUnneeded=true + +[Service] +Type=simple +Environment=DISPLAY=%I +ExecStart=/usr/bin/xcompmgr +Restart=always diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart deleted file mode 100755 index 156fe7d..0000000 --- a/.config/wmii-hg/autostart +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -. include.sh - -xrandr --output VGA-1 --off - -daemon xcompmgr &> /dev/null -daemon lxpanel &> /dev/null -#daemon nm-applet &> /dev/null -daemon dunst &> /dev/null -daemon blueman-applet &> /dev/null -daemon clipit -dn &> /dev/null - -PATH="$WMII_CONFPATH:$PATH" -daemon rbar_acpi 97_acpi &> /dev/null -daemon rbar_wifi 98_wifi &> /dev/null -daemon rbar_clock 99_clock &> /dev/null diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 888c3ae..98c41a6 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -49,9 +49,6 @@ Event() { Event FocusTag "$tag" fi done < <(lstags) - - # Run the autostart action - Action autostart ;; WmiircQuit) ## No args echo ' ==> Stopping wmiirc' diff --git a/.config/wmii-hg/rbar b/.config/wmii-hg/rbar new file mode 100755 index 0000000..9aaa485 --- /dev/null +++ b/.config/wmii-hg/rbar @@ -0,0 +1,9 @@ +#!/bin/bash +IFS=: +read -r name prefix DISPLAY <<<"$1" +export DISPLAY + +id=$1 +name=${id#[0-9][0-9]_} + +exec "$0"_"$name" "${id}" -- cgit v1.1-4-g5e80 From dd8c27a1c6562aeb8487b94f985d89408f5a3902 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:48:29 -0500 Subject: Bash: disable the pager when running in emacs --- .config/bash/rc.d/emacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 12fa9ad..4a7b9b8 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -5,6 +5,7 @@ if [[ $TERM == eterm* ]]; then EDITOR=$SELECTED_EDITOR VISUAL=$SELECTED_EDITOR export SELECTED_EDITOR EDITOR VISUAL + export PAGER=cat ## Primatives for interacting with Emacs ############################### -- cgit v1.1-4-g5e80 From 42abf85db87f1ec4755a180da46d4149654f699f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:49:29 -0500 Subject: lxpanel: remove unused config lines --- .config/lxpanel/default/config | 3 --- 1 file changed, 3 deletions(-) diff --git a/.config/lxpanel/default/config b/.config/lxpanel/default/config index e19a7d1..e0d2b50 100644 --- a/.config/lxpanel/default/config +++ b/.config/lxpanel/default/config @@ -1,4 +1 @@ [Command] -FileManager=v-editor %s -Terminal=urxvt -c %s -Logout=bash -c 'echo quit >> $WMII_DIR/ctl' -- cgit v1.1-4-g5e80 From f207384c99764edbac8f66ca82c717d99becb03e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:49:47 -0500 Subject: configure makepkg here instead of in /etc --- .config/pacman/makepkg.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .config/pacman/makepkg.conf diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf new file mode 100644 index 0000000..8dc4536 --- /dev/null +++ b/.config/pacman/makepkg.conf @@ -0,0 +1,8 @@ +PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest" +SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest" +SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest" +LOGDEST="${LIBREHOME:-$HOME}/packages/logdest" + +PACKAGER="Luke Shumaker " + +MAKEFLAGS="-j3" -- cgit v1.1-4-g5e80 From 8396ed0fba3dc50d7f802dd1c6db282eb6fc73fa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:51:20 -0500 Subject: wmii: 2 fixes - unset _PATH in child processes - local=$(FAILURE) succeeds; delcare local on a separate line. --- .config/wmii-hg/config.sh | 18 +++++++++++------- .config/wmii-hg/wmiirc | 6 ++++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 98c41a6..6f63f75 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -215,21 +215,25 @@ Key() { ## Running programs $MODKEY-a) ## Open wmii actions menu - local action="$(path_ls $WMII_CONFPATH | wimenu -h "${HIST}.actions" -n 5000)" + local action + action="$(path_ls "$WMII_CONFPATH" | wimenu -h "${HIST}.actions" -n 5000)" || return Action "$action" & ;; $MODKEY-x) ## Open program menu - local command="$(path_ls $PATH | wimenu -h "${HIST}.progs" -n 5000)" || return - ( PATH=$_PATH exec setsid $command ) & ;; + local command + command="$(path_ls "$_PATH" | wimenu -h "${HIST}.progs" -n 5000)" || return + ( PATH=$_PATH; unset _PATH; exec $command ) & ;; $MODKEY-Return) ## Launch a terminal - ( PATH=$_PATH exec setsid x-terminal-emulator ) & ;; + ( PATH=$_PATH; unset _PATH; exec x-terminal-emulator ) & ;; ## Tag actions $MODKEY-t) ## Change to another tag - local tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return + local tag + tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return echo view "$tag" >> $WMII_DIR/ctl;; $MODKEY-Shift-t) ## Retag the selected client - local sel=$(sed 1q $WMII_DIR/client/sel/ctl) - local tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return + local sel tag + sel=$(sed 1q $WMII_DIR/client/sel/ctl) + tag=$(lstags | wimenu -h "${HIST}.tags" -n 50) || return echo "$tag" >> $WMII_DIR/client/$sel/tags;; esac } diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a6585de..396bed2 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -2,8 +2,10 @@ unset WMII_NAMESPACE unset WMII_DIR -export _PATH="$PATH" -export PATH="$WMII_CONFPATH:$PATH" +if [[ -z $_PATH ]]; then + export _PATH="$PATH" + export PATH="$WMII_CONFPATH:$PATH" +fi . include.sh -- cgit v1.1-4-g5e80 From dd4773d812f379a3b562e1f873418edc2036d98c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:51:50 -0500 Subject: wmii: remove fixes.sh --- .config/wmii-hg/fixes.sh | 24 ------------------------ .config/wmii-hg/util.sh | 3 --- 2 files changed, 27 deletions(-) delete mode 100644 .config/wmii-hg/fixes.sh diff --git a/.config/wmii-hg/fixes.sh b/.config/wmii-hg/fixes.sh deleted file mode 100644 index 5858859..0000000 --- a/.config/wmii-hg/fixes.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Fix various deficiencies in either the shell or the filesystem - -## -# Usage: ls DIRECTORY -# Linux's 9p kernel module sometimes omits entries in directory listings -## -unalias ls &>/dev/null -ls() { - local real_ls=("$(which ls)" -1F) - [ $# = 0 ] && set -- "$PWD" - f="${1/#${WMII_DIR}/}" - if [ "$f" = "$1" ]; then - "${real_ls[@]}" "$f" - else - wmiir ls "$f" - fi -} - -## -# Usage: setsid cmd [arguments...] -# I like wmiir's setsid better than linux-utils' -## -setsid() { wmiir setsid "$@"; } diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index 323d8a6..b28a3b6 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -1,8 +1,5 @@ #!/bin/bash -# I moved "fixes" into a separate file because it isn't so much configuration... -. fixes.sh - ################################################################################ # Added shell features # ################################################################################ -- cgit v1.1-4-g5e80 From 8761e30b770ae0995dac884a04f2ac3818bcfc26 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:52:30 -0500 Subject: wmii: tidy up --- .config/wmii-hg/config.sh | 9 ++++----- .config/wmii-hg/theme-tango | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 6f63f75..d1da234 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -36,8 +36,7 @@ Event() { < "`conffile rules`" expand_variables >> $WMII_DIR/rules < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl scansection Key | cut -sf2 >> $WMII_DIR/keys - # Configure X11 - hsetroot -solid "$WMII_BACKGROUND" + #hsetroot -solid "$WMII_BACKGROUND" # Clear the LBar and RBar find $WMII_DIR/{l,r}bar -type f -delete @@ -62,7 +61,7 @@ Event() { echo " -> Unmounting WMII_DIR=$WMII_DIR..." 9umount "$WMII_DIR" echo " -> Removing mountpoint WMII_DIR=$WMII_DIR..." - rmdir "$WMII_DIR";; + rmdir -p "$WMII_DIR" 2>/dev/null;; ## WMII-meta events Quit) ## No args echo ' ==> wmii quit: unmounting' @@ -241,8 +240,8 @@ Key() { Action() { local prog=$(path_which "$WMII_CONFPATH" "$1"); shift if [ -n "$prog" ]; then - "$prog" "$@" + exec "$prog" "$@" else - false + exec false fi } diff --git a/.config/wmii-hg/theme-tango b/.config/wmii-hg/theme-tango index e0e35d4..f4c20a2 100644 --- a/.config/wmii-hg/theme-tango +++ b/.config/wmii-hg/theme-tango @@ -7,4 +7,3 @@ TANGO_plum=( "#ad7fa8" "#75507b" "#5c3566") TANGO_red=( "#ef2929" "#cc0000" "#a40000") TANGO_alum=( "#eeeeec" "#d3d7cf" "#babdb6" "#888a85" "#555753" "#2e3436") - -- cgit v1.1-4-g5e80 From fd40e4ddaefc70acb2cedcbe69bce49077a62376 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:53:11 -0500 Subject: wmii: Make rbar way cooler --- .config/wmii-hg/config.sh | 6 +++++- .config/wmii-hg/rbar.sh | 18 +++++++++++++++++ .config/wmii-hg/rbar_acpi | 27 +++++++++++++------------ .config/wmii-hg/rbar_clock | 23 ++++++++++++---------- .config/wmii-hg/rbar_wifi | 49 ++++++++++++++++++++++++++++++++++------------ 5 files changed, 88 insertions(+), 35 deletions(-) create mode 100644 .config/wmii-hg/rbar.sh diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index d1da234..be75d65 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -154,7 +154,11 @@ Event() { ## RightBar events RightBarMouseDown) ## $1=button $2=bar_item - ;; + local button=$1 + local item=$2 + local name=${item#[0-9][0-9]_} + name=${name%.*} + Action "rbar_$name" "$button" & ;; RightBarClick) ## $1=button $2=bar_item ;; RightMouseDND) ## $1=button $2=bar_item diff --git a/.config/wmii-hg/rbar.sh b/.config/wmii-hg/rbar.sh new file mode 100644 index 0000000..8297b71 --- /dev/null +++ b/.config/wmii-hg/rbar.sh @@ -0,0 +1,18 @@ +#!/bin/bash +setup_trap() { + trap "rm -f -- ${HOME}/n/wmii*/rbar/${1}" EXIT +} + +write() { + dirs=("${HOME}"/n/wmii*/rbar/) + sponge|tee -a "${dirs[@]/%/${1}}" > /dev/null +} + +set -eE +shopt -s nullglob +case "$1" in + 1) left-click;; + 2) middle-click;; + 3) right-click;; + *) update "$1";; +esac diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi index 1771875..bdcdf0f 100755 --- a/.config/wmii-hg/rbar_acpi +++ b/.config/wmii-hg/rbar_acpi @@ -1,15 +1,18 @@ #!/bin/bash -. include.sh -id=$1 -trap "rm -f ${WMII_DIR}/rbar/${id}.*" EXIT +update() { + id=$1 + setup_trap "${id}.*" -while connected_to_x_server; do - acpi -bt | sed -r \ - -e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \ - -e 's/\s*degrees\s*/°/g' | - cat -n | while read -r n line; do - printf "label %s\n" "$line" >> "${WMII_DIR}/rbar/${id}.${n}" - done - sleep 1 -done + while true; do + acpi -bt | sed -r \ + -e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \ + -e 's/\s*degrees\s*/°/g' | + cat -n | while read -r n line; do + printf "label %s\n" "$line" | write "${id}.${n}" + done + sleep 1 + done +} + +. "$(dirname "$0")/rbar.sh" diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock index c1692da..a09f016 100755 --- a/.config/wmii-hg/rbar_clock +++ b/.config/wmii-hg/rbar_clock @@ -1,13 +1,16 @@ #!/bin/bash -. include.sh -id=$1 -trap "rm -f ${WMII_DIR}/rbar/${id}" EXIT +update() { + id=$1 + setup_trap "$id" -while connected_to_x_server; do - { - printf 'label ' - date +'%a, %F %T %Z(%:::z)' - } |sponge >> "${WMII_DIR}/rbar/${id}" - sleep .5 -done + while true; do + { + printf 'label ' + date +'%a, %F %T %Z(%:::z)' + } | write "$id" + sleep .5 + done +} + +. "$(dirname "$0")/rbar.sh" diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi index 53464dc..63dc653 100755 --- a/.config/wmii-hg/rbar_wifi +++ b/.config/wmii-hg/rbar_wifi @@ -1,11 +1,7 @@ #!/bin/bash -. include.sh - -id=$1 -trap "rm -f ${WMII_DIR}/rbar/${id}" EXIT iwinfo() { - interface=$1 + local interface=$1 iwconfig "$interface" | sed -r 's/ {2,}/\n/g' | sed -e '/^\s*$/d' -e 's/:\s*/=/' \ @@ -13,10 +9,39 @@ iwinfo() { -e '2s/^/MAC Protocol=/' } -while connected_to_x_server; do - { - printf 'label ' - iwinfo wlp2s0|grep -E '^(ESSID|Link Quality)='|sed 'N;s/\n/ | /' - } | sponge >> "${WMII_DIR}/rbar/${id}" - sleep 1 -done +update() { + local id + id=$1 + setup_trap "$id" + while true; do + { + printf 'label ' + iwinfo wlp2s0|grep -E '^(ESSID|Link Quality)='|sed 'N;s/\n/ | /' + } | write "$id" + sleep 1 + done +} + +right-click() { + local list cur item + + list=() + IFS='' + while read -r line; do + list+=("$line") + done < <(netctl-auto list | sed 's,$,$,' | column -s '$' -t) + + cur='' + for item in "${list[@]}"; do + if [[ "$item" = '* '* ]]; then + cur="$item" + fi + done + + item=$(wmii9menu -i "$cur" "${list[@]}") + if [[ -n $item ]] && [[ "$item" != '* '* ]]; then + netctl-auto switch-to "$item" + fi +} + +. "$(dirname "$0")/rbar.sh" -- cgit v1.1-4-g5e80 From 5bba26995f6431f00f17a7a0eef8940b94ddbfd8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:53:48 -0500 Subject: ssh: X11 forward to build64-par when near by default --- .config/ssh/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/ssh/config b/.config/ssh/config index 7d7704e..7bab06d 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -28,6 +28,8 @@ Host lukeshu.com Host build64-par Port 22 User luke + ForwardX11 yes + ForwardX11Trusted yes Host build64-par-far Port 1864 -- cgit v1.1-4-g5e80 From f565769cdc68b24343ce2d3dbf4e322fad3a6c20 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 00:54:28 -0500 Subject: gpg-agent stuff is no longer nescessary --- .config/systemd/user/default.target.wants/gpg-agent.service | 1 - .config/systemd/user/gpg-agent.service | 9 --------- 2 files changed, 10 deletions(-) delete mode 120000 .config/systemd/user/default.target.wants/gpg-agent.service delete mode 100644 .config/systemd/user/gpg-agent.service diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service deleted file mode 120000 index 5727454..0000000 --- a/.config/systemd/user/default.target.wants/gpg-agent.service +++ /dev/null @@ -1 +0,0 @@ -/home/lukeshu-parabola/.config/systemd/user/gpg-agent.service \ No newline at end of file diff --git a/.config/systemd/user/gpg-agent.service b/.config/systemd/user/gpg-agent.service deleted file mode 100644 index 93c12b0..0000000 --- a/.config/systemd/user/gpg-agent.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description="GnuPG agent daemon" - -[Service] -Type=forking -ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg - -[Install] -WantedBy=default.target -- cgit v1.1-4-g5e80 From 2a6dc16a75f4d7beed631d97a99b6a1fc82c4e79 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:19:57 -0500 Subject: split login.sh into login.d --- .config/cron/make-config | 2 +- .config/login.d/00_coredumps.sh | 1 + .config/login.d/00_path.sh | 9 ++++ .config/login.d/00_umask.sh | 1 + .config/login.d/01_xdg.sh | 44 ++++++++++++++++++ .config/login.d/02_tmpdir.sh | 3 ++ .config/login.d/10_gpg.sh | 3 ++ .config/login.d/10_java.sh | 6 +++ .config/login.d/10_selected-editor.sh | 7 +++ .config/login.d/10_spell-check.sh | 3 ++ .config/login.d/10_xauthority.sh | 4 ++ .config/login.d/90_dot-runtime.sh | 1 + .config/login.sh | 84 ++--------------------------------- .local/lib/path.sh | 9 ---- .local/lib/xdg.sh | 44 ------------------ 15 files changed, 87 insertions(+), 134 deletions(-) create mode 100644 .config/login.d/00_coredumps.sh create mode 100644 .config/login.d/00_path.sh create mode 100644 .config/login.d/00_umask.sh create mode 100644 .config/login.d/01_xdg.sh create mode 100644 .config/login.d/02_tmpdir.sh create mode 100644 .config/login.d/10_gpg.sh create mode 100644 .config/login.d/10_java.sh create mode 100644 .config/login.d/10_selected-editor.sh create mode 100644 .config/login.d/10_spell-check.sh create mode 100644 .config/login.d/10_xauthority.sh create mode 100644 .config/login.d/90_dot-runtime.sh delete mode 100644 .local/lib/path.sh delete mode 100644 .local/lib/xdg.sh diff --git a/.config/cron/make-config b/.config/cron/make-config index 9ac5ac2..d079c92 100644 --- a/.config/cron/make-config +++ b/.config/cron/make-config @@ -1,2 +1,2 @@ #m h dom mon dow command -*/5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME' +*/5 * * * * cronic bash -l -c 'make -C "$XDG_CONFIG_HOME"' diff --git a/.config/login.d/00_coredumps.sh b/.config/login.d/00_coredumps.sh new file mode 100644 index 0000000..8fcc61b --- /dev/null +++ b/.config/login.d/00_coredumps.sh @@ -0,0 +1 @@ +ulimit -c unlimited # save core dumps diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh new file mode 100644 index 0000000..a45f8fd --- /dev/null +++ b/.config/login.d/00_path.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if type config-path &>/dev/null; then + config_path=config-path +else + # Bootstrap finding config-path + config_path="$HOME/.local/bin/config-path" +fi +eval "$("$config_path" | sed 's/^/export /')" diff --git a/.config/login.d/00_umask.sh b/.config/login.d/00_umask.sh new file mode 100644 index 0000000..8e71ad5 --- /dev/null +++ b/.config/login.d/00_umask.sh @@ -0,0 +1 @@ +umask 022 diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh new file mode 100644 index 0000000..2e0b42c --- /dev/null +++ b/.config/login.d/01_xdg.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# This should be readable by /bin/sh, but I'm going to assume bash. + +# Sets up XDG environmental variables, so programs using them don't have to +# worry about checking if they are set. +# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html + +[[ -n $XDG_DATA_HOME ]] || export XDG_DATA_HOME="$HOME/.local/share" +[[ -n $XDG_CONFIG_HOME ]] || export XDG_CONFIG_HOME="$HOME/.config" +[[ -n $XDG_DATA_DIRS ]] || export XDG_DATA_DIRS="/usr/local/share/:/usr/share/" +[[ -n $XDG_CONFIG_DIRS ]] || export XDG_CONFIG_DIRS="/etc/xdg" +[[ -n $XDG_CACHE_HOME ]] || export XDG_CACHE_HOME="$HOME/.cache" + +# Check if XDG_RUNTIME_DIR is set, but has a bogus setting +if [[ -n $XDG_RUNTIME_DIR ]] && [[ ! -d $XDG_RUNTIME_DIR ]]; then + unset XDG_RUNTIME_DIR +fi + +# Set XDG_RUNTIME_DIR if we can +if [[ -z $XDG_RUNTIME_DIR ]] && type flock &>/dev/null; then + _diy_xdg_runtime_login() { + export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" + readonly XDG_RUNTIME_DIR + # There's a race condition here, between the `ln -s` and `flock`. + # But it's not like I'll be hammering a box with logins. + if [[ ! -d "$XDG_CACHE_HOME" ]]; then + local tmp="$(mktemp --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" + mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" + ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" + fi + if ! [[ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]]; then + exec 7 >"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" + fi + if flock -sn 7; then + trap _diy_xdg_runtime_logout EXIT + fi + } + _diy_xdg_runtime_logout() { + if flock -xn 7; then + rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" + fi + } + _diy_xdg_runtime_login +fi diff --git a/.config/login.d/02_tmpdir.sh b/.config/login.d/02_tmpdir.sh new file mode 100644 index 0000000..d0079aa --- /dev/null +++ b/.config/login.d/02_tmpdir.sh @@ -0,0 +1,3 @@ +mkdir -p -- "$XDG_RUNTIME_DIR/tmpdir" +export TMPDIR="$XDG_RUNTIME_DIR/tmpdir" +ln -sfT -- "$TMPDIR" "$HOME/tmp" diff --git a/.config/login.d/10_gpg.sh b/.config/login.d/10_gpg.sh new file mode 100644 index 0000000..cf3c88c --- /dev/null +++ b/.config/login.d/10_gpg.sh @@ -0,0 +1,3 @@ +if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then + export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf"` +fi diff --git a/.config/login.d/10_java.sh b/.config/login.d/10_java.sh new file mode 100644 index 0000000..3c49368 --- /dev/null +++ b/.config/login.d/10_java.sh @@ -0,0 +1,6 @@ +_JAVA_OPTIONS='' +_JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on' +_JAVA_OPTIONS+=' -Dswing.aatext=true' +_JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' +_JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR" +export _JAVA_OPTIONS diff --git a/.config/login.d/10_selected-editor.sh b/.config/login.d/10_selected-editor.sh new file mode 100644 index 0000000..f176b8a --- /dev/null +++ b/.config/login.d/10_selected-editor.sh @@ -0,0 +1,7 @@ +if [[ -f "$HOME/.selected_editor" ]]; then + . "$HOME/.selected_editor" + export SELECTED_EDITOR + export ALTERNATE_EDITOR + export EDITOR="${EDITOR:-$SELECTED_EDITOR}" + export VISUAL="${VISUAL:-$SELECTED_EDITOR}" +fi diff --git a/.config/login.d/10_spell-check.sh b/.config/login.d/10_spell-check.sh new file mode 100644 index 0000000..9a24b7e --- /dev/null +++ b/.config/login.d/10_spell-check.sh @@ -0,0 +1,3 @@ +if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then + export DICTIONARY="${LANG%%.*}" +fi diff --git a/.config/login.d/10_xauthority.sh b/.config/login.d/10_xauthority.sh new file mode 100644 index 0000000..a27202c --- /dev/null +++ b/.config/login.d/10_xauthority.sh @@ -0,0 +1,4 @@ +# This was needed once with SSH and Fedora boxes. +if [[ -z $XAUTHORITY ]]; then + export XAUTHORITY="$HOME/.Xauthority" +fi diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh new file mode 100644 index 0000000..d597cc7 --- /dev/null +++ b/.config/login.d/90_dot-runtime.sh @@ -0,0 +1 @@ +ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime diff --git a/.config/login.sh b/.config/login.sh index 392dc88..b2cc80a 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -10,84 +10,8 @@ # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. -umask 022 -ulimit -c unlimited # save core dumps -## Paths ############################################################# - -. "$HOME/.local/lib/path.sh" - -# TMPDIR ############################################################# - -if [[ ! -d "$HOME/tmp" ]]; then - tmp="$(mktemp --tmpdir -d "$USER-tmpdir.XXXXXXXXXXXXXXXXXXX")" - ln -sf "$tmp" "$HOME/tmp" - unset tmp -fi -export TMPDIR="$HOME/tmp" - -# XDG ################################################################ - -. "$HOME/.local/lib/xdg.sh" -ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime - -# Settings ########################################################### - -# Spell check -if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then - export DICTIONARY="${LANG%%.*}" -fi - -# Text editor -if [[ -f "$HOME/.selected_editor" ]]; then - . "$HOME/.selected_editor" - export SELECTED_EDITOR - export ALTERNATE_EDITOR - export EDITOR="${EDITOR:-$SELECTED_EDITOR}" - export VISUAL="${VISUAL:-$SELECTED_EDITOR}" -fi - -# GPG -if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then - echo 'login: Setting GPGKEY' - export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` -fi -if [[ -f ~/.runtime/gpg ]]; then - echo 'login: Setting gpg-agent info:' - cat ~/.runtime/gpg - . ~/.runtime/gpg - export GPG_AGENT_INFO - #export SSH_AUTH_SOCK -fi - -# Java -_JAVA_OPTIONS='' -_JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on' -_JAVA_OPTIONS+=' -Dswing.aatext=true' -_JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' -if [[ -n $TMPDIR ]]; then - _JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR" -fi -export _JAVA_OPTIONS - -# X11 -if [[ -z $XAUTHORITY ]]; then - export XAUTHORITY="$HOME/.Xauthority" - #export XAUTHORITY=$HOME/.runtime/Xauthority -fi - -# D-Bus -# if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then -# # I want a separate instance for each login -# #dbus-launch > "${HOME}/.cache/sessions/dbus" -# #. "${HOME}/.cache/sessions/dbus" -# eval `dbus-launch` - -# export DBUS_SESSION_BUS_ADDRESS -# export DBUS_SESSION_BUS_PID -# fi - -# Load any box-specific stuff -if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then - . "$XDG_CONFIG_HOME/login.local.sh" -fi +for file in "${XDG_CONFIG_HOME:-$HOME/.config}/login.d/"*.sh; do + . "$file" +done +unset file diff --git a/.local/lib/path.sh b/.local/lib/path.sh deleted file mode 100644 index a45f8fd..0000000 --- a/.local/lib/path.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if type config-path &>/dev/null; then - config_path=config-path -else - # Bootstrap finding config-path - config_path="$HOME/.local/bin/config-path" -fi -eval "$("$config_path" | sed 's/^/export /')" diff --git a/.local/lib/xdg.sh b/.local/lib/xdg.sh deleted file mode 100644 index 20fab4b..0000000 --- a/.local/lib/xdg.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# This should be readable by /bin/sh, but I'm going to assume bash. - -# Sets up XDG environmental variables, so programs using them don't have to -# worry about checking if they are set. -# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html - -[[ -n $XDG_DATA_HOME ]] || export XDG_DATA_HOME="$HOME/.local/share" -[[ -n $XDG_CONFIG_HOME ]] || export XDG_CONFIG_HOME="$HOME/.config" -[[ -n $XDG_DATA_DIRS ]] || export XDG_DATA_DIRS="/usr/local/share/:/usr/share/" -[[ -n $XDG_CONFIG_DIRS ]] || export XDG_CONFIG_DIRS="/etc/xdg" -[[ -n $XDG_CACHE_HOME ]] || export XDG_CACHE_HOME="$HOME/.cache" - -# Check if XDG_RUNTIME_DIR is set, but has a bogus setting -if [[ -n $XDG_RUNTIME_DIR ]] && [[ ! -d $XDG_RUNTIME_DIR ]]; then - unset XDG_RUNTIME_DIR -fi - -# Set XDG_RUNTIME_DIR if we can -if [[ -z $XDG_RUNTIME_DIR ]] && type flock &>/dev/null; then - _diy_xdg_runtime_login() { - export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" - readonly XDG_RUNTIME_DIR - # There's a race condition here, between the `ln -s` and `flock`. - # But it's not like I'll be hammering a box with logins. - if [[ ! -d "$XDG_CACHE_HOME" ]]; then - local tmp="$(mktemp --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" - ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" - fi - if ! [[ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]]; then - exec 7 >"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" - fi - if flock -sn 7; then - trap _diy_xdg_runtime_logout EXIT - fi - } - _diy_xdg_runtime_logout() { - if flock -xn 7; then - rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" - fi - } - _diy_xdg_runtime_login -fi -- cgit v1.1-4-g5e80 From 34bbf66a460e5c622e209211869b3a8bde8a68d5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:31:57 -0500 Subject: change the x0vncserver service unit to match the others --- .config/systemd/user/wmii@.service.wants/x0vncserver@.service | 1 + .config/systemd/user/x0vncserver@.service | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 120000 .config/systemd/user/wmii@.service.wants/x0vncserver@.service diff --git a/.config/systemd/user/wmii@.service.wants/x0vncserver@.service b/.config/systemd/user/wmii@.service.wants/x0vncserver@.service new file mode 120000 index 0000000..bc3be20 --- /dev/null +++ b/.config/systemd/user/wmii@.service.wants/x0vncserver@.service @@ -0,0 +1 @@ +../x0vncserver@.service \ No newline at end of file diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service index 99e897c..476e822 100644 --- a/.config/systemd/user/x0vncserver@.service +++ b/.config/systemd/user/x0vncserver@.service @@ -3,8 +3,5 @@ Description=VNC server for X displays [Service] Type=simple -ExecStart=/bin/bash -l -c 'x0vncserver display=:%I PasswordFile="${HOME}/.vnc/passwd"' +ExecStart=/usr/bin/x0vncserver display=%I PasswordFile=%h/.vnc/passwd Restart=always - -[Install] -WantedBy=default.target -- cgit v1.1-4-g5e80 From 3122d81e5c25a9ebe3735a7e2d9153085873f92f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:35:33 -0500 Subject: vncserver requires xinitrc to be executable --- .config/X11/clientrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .config/X11/clientrc diff --git a/.config/X11/clientrc b/.config/X11/clientrc old mode 100644 new mode 100755 -- cgit v1.1-4-g5e80 From 6b1e58597e228a886f125efa64e57c3f94bfd259 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:36:01 -0500 Subject: remove bs --- .config/login.sh | 7 ------- .config/lxpanel/default/config | 2 -- 2 files changed, 9 deletions(-) diff --git a/.config/login.sh b/.config/login.sh index 392dc88..53b5238 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -52,13 +52,6 @@ if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi -if [[ -f ~/.runtime/gpg ]]; then - echo 'login: Setting gpg-agent info:' - cat ~/.runtime/gpg - . ~/.runtime/gpg - export GPG_AGENT_INFO - #export SSH_AUTH_SOCK -fi # Java _JAVA_OPTIONS='' diff --git a/.config/lxpanel/default/config b/.config/lxpanel/default/config index e19a7d1..9466011 100644 --- a/.config/lxpanel/default/config +++ b/.config/lxpanel/default/config @@ -1,4 +1,2 @@ [Command] -FileManager=v-editor %s -Terminal=urxvt -c %s Logout=bash -c 'echo quit >> $WMII_DIR/ctl' -- cgit v1.1-4-g5e80 From e9319a2e348b33eeb0f5bfcdd26ef885590cf8cb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:36:26 -0500 Subject: update mail filters --- .config/maildirproc/att.rc | 37 +++++++++++++++++----------- .config/maildirproc/purdue.rc | 56 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 18 deletions(-) diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index b8ff8f1..6b31260 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -1,6 +1,7 @@ # -*- mode: python; indent-tabs-mode: t -*- import os +import os.path import subprocess import datetime @@ -27,7 +28,14 @@ def is_to_or_from_re(mail,address): or mail.target.matches(address)) def move_ham(mail,folder): y = datetime.datetime.now().year - mail.move("FOLDERS.Ham."+str(y)+folder) + folder = "FOLDERS.Ham."+str(y)+folder + dir = processor.maildir_base+"/"+folder + if not os.path.isfile(dir+"/maildirfolder"): + os.makedirs(dir+"/tmp", 0o777, True) + os.makedirs(dir+"/new", 0o777, True) + os.makedirs(dir+"/cur", 0o777, True) + open(dir+"/maildirfolder", 'a').close() + mail.move(folder) def bogofilter_auto(mail): p = subprocess.Popen( @@ -127,7 +135,7 @@ def my_filters(mail): move_ham(mail,".software.networkmanager") return - if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): + if mail["List-Id"].matches("maintenance\.lists\.parabola(gnulinux\.org|\.nu)"): move_ham(mail,".software.parabola.maintenance") return @@ -137,7 +145,8 @@ def my_filters(mail): if ( False - or mail["List-Id"].matches("parabolagnulinux.org") + or mail["List-Id"].matches("parabolagnulinux\.org") + or mail["List-Id"].matches("parabola\.nu") or is_to_or_from(mail, "parabolagnulinux.org") or is_to_or_from(mail, "kiwwwi.com.ar") or is_to_or_from(mail, "parabola.nu") @@ -281,19 +290,19 @@ def my_filters(mail): # Sort mail from software people for address in [ "@archlinux.org", + "@canonical.org", + "@cnuk.org", + "@eff.org", + "@foocorp.net", "@fsf.org", "@github.com", - "canonical.org", - "cnuk.org", - "eff.org", - "esr@thyrsus.com", - "foocorp.net", - "gitorious.org", - "gnome.org", - "gnu.org", - "ietf.org", - "kde.org", - "sourceforge.com", + "@gitorious.org", + "@gnome.org", + "@gnu.org", + "@ietf.org", + "@kde.org", + "@sourceforge.com", + "@thyrsus.com", "trustees@core3.amsl.com", ]: if is_to_or_from(mail,address): diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index 61c264c..9f6bf37 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -88,12 +88,20 @@ def my_filters(mail): mail.move("INBOX.crap.Facebook") return + if is_to_or_from(mail,"@cerias.purdue.edu"): + mail.move("INBOX.crap.CERIAS") + return + + if is_to_or_from(mail,"royfu@purdue.edu"): + mail.move("INBOX.crap.Hackers") + return + if ( False or is_to_or_from(mail,"@cable.comcast.com") or is_to_or_from(mail,"@apexsystemsinc.com") ): - mail.move("INBOX.work.Comcast") + mail.move("INBOX.work.2013.Comcast") return if ( @@ -109,20 +117,24 @@ def my_filters(mail): # Fall 2012 ############################################################ + # SCI210 (Teaming principles) if mail["Subject"].contains("Fall-2012-SCI-21000-001:"): mail.move("INBOX.classes.2012-2.SCI210") + # CS180 (Java) if mail["Subject"].contains("fall-2012-cs-18000"): mail.move("INBOX.classes.2012-2.CS180") return if piazza_topic(mail, "CS 18000"): mail.move("INBOX.classes.2012-2.CS180.Piazza") return + # SOC100 if mail["Subject"].contains("Fall-2012-SOC-10000"): mail.move("INBOX.classes.2012-2.SOC100") return # Spring 2013 ########################################################## + # CS240 (C) if mail["Subject"].contains("[CS240] Submission result for"): mail.move("INBOX.classes.2013-1.CS240.autograder") return @@ -132,33 +144,40 @@ def my_filters(mail): if piazza_topic(mail, "CS 240"): mail.move("INBOX.classes.2013-1.CS240.Piazza") return + # PHYS220 if mail["Subject"].matches(".*(PHYS|CHIP)\s*220.*") or is_to_or_from(mail,"srdas@purdue.edu"): mail.move("INBOX.classes.2013-1.PHYS220") return + # SOC220 (Social Problems) if mail["Subject"].contains("Spring-2013-SOC-22000"): mail.move("INBOX.classes.2013-1.SOC220") return # Fall 2013 ############################################################ + # CS250 (Computer Architecture) if mail["Subject"].contains("Fall-2013-CS-25000"): mail.move("INBOX.classes.2013-2.CS250") return if piazza_topic(mail, "CS 250") or piazza_topic(mail, "CS 250-FALL2013"): mail.move("INBOX.classes.2013-2.CS250.Piazza") return + # CS251 (Intro Algo) if mail["Subject"].contains("Fall-2013-CS-25100"): mail.move("INBOX.classes.2013-2.CS251") return if piazza_topic(mail, "CS 251"): mail.move("INBOX.classes.2013-2.CS251.Piazza") return + # SPAN101 if mail["Subject"].contains("Fall-2013-SPAN-10100"): mail.move("INBOX.classes.2013-2.SPAN101") return + # MA261 (Calc III) if mail["Subject"].contains("Fall-2013-MA-26100"): mail.move("INBOX.classes.2013-2.MA261") return + # MA265 (Linear Algebra) if mail["Subject"].contains("Fall-2013-MA-26500"): mail.move("INBOX.classes.2013-2.MA265") return @@ -172,11 +191,11 @@ def my_filters(mail): if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"): mail.move("INBOX.classes.2014-1.COM217.Mixable") return - # CS252 + # CS252 (Systems Programming) if piazza_topic(mail, "CS 25200"): mail.move("INBOX.classes.2014-1.CS252.Piazza") return - # CS307 + # CS307 (Software Engineering) if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"): mail.move("INBOX.classes.2014-1.CS307") return @@ -199,10 +218,10 @@ def my_filters(mail): mail.move("INBOX.classes.2014-2.CS334") return # CS354 (OS) - # CS381 (Algo) if piazza_topic(mail, "CS 354"): mail.move("INBOX.classes.2014-2.CS354.Piazza") return + # CS381 (Algo) if piazza_topic(mail, "CS 381"): mail.move("INBOX.classes.2014-2.CS381.Piazza") return @@ -222,6 +241,35 @@ def my_filters(mail): ): mail.move("INBOX.classes.2014-2.PHYS221") return + + # Spring 2015 ######################################################### + + # CS352 (Compilers) + if is_to_or_from(mail, "wjg@cs.purdue.edu"): + mail.move("INBOX.classes.2015-1.CS352") + return + if piazza_topic(mail, "CS 352"): + mail.move("INBOX.classes.2015-1.CS352.Piazza") + return + # CS408 (Software testing) + if (False + or mail["Subject"].contains("spring-2015-cs-40800") + or is_to_or_from(mail, "li1471@purdue.edu") + or is_to_or_from(mail, "kirby@purdue.edu") + or is_to_or_from(mail, "webb39@purdue.edu") + or is_to_or_from(mail, "Jkou@purdue.edu") + or is_to_or_from(mail, "nstodda@purdue.edu") + or is_to_or_from(mail, "aryker@purdue.edu") # TA + ): + mail.move("INBOX.classes.2015-1.CS408") + return + # CS448 (Databases) + # ME297 (FRC) + if mail["Subject"].contains("[ME297]"): + mail.move("INBOX.classes.2015-1.ME297") + return + # SOC324 (Criminology) + handle_mapping = { "INBOX": my_filters, } -- cgit v1.1-4-g5e80 From 19542b8e0d4d764a55f433e64d77fa6a58312f1f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:36:41 -0500 Subject: wmii: comment out hsetroot --- .config/wmii-hg/config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index c560f3f..f185f9f 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -37,7 +37,7 @@ Event() { < "`conffile ctl-init`" expand_variables >> $WMII_DIR/ctl scansection Key | cut -sf2 >> $WMII_DIR/keys # Configure X11 - hsetroot -solid "$WMII_BACKGROUND" + #hsetroot -solid "$WMII_BACKGROUND" # Clear the LBar and RBar find $WMII_DIR/{l,r}bar -type f -delete -- cgit v1.1-4-g5e80 From c007a61ad7e885f7f3dadd05bae555e577ce27c9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:37:13 -0500 Subject: pick: be careful with arguments being flags to 'printf', use stderr --- .local/bin/pick | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/pick b/.local/bin/pick index 6dc905f..7458041 100755 --- a/.local/bin/pick +++ b/.local/bin/pick @@ -20,7 +20,7 @@ if [[ $1 = -s ]]; then # Scan to find a running instance for prog in "$@"; do if [[ -n "$(pgrep "${prog%% *}")" ]]; then - printf '%s\n' "$prog" + printf -- '%s\n' "$prog" exit 0 fi done @@ -29,10 +29,10 @@ fi # Scan to find one that is installed for prog in "$@"; do if [[ -x "$(which "${prog%% *}" 2>/dev/null)" ]]; then - printf '%s\n' "$prog" + printf -- '%s\n' "$prog" exit 0 fi done -printf '%s\n' "$cmd: no suitable program found" +printf -- '%s\n' "$cmd: no suitable program found" >&2 exit 1 -- cgit v1.1-4-g5e80 From 1e77007556e623a63478a18790098c510b9cbbd9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:37:40 -0500 Subject: .local/bin/x-*: exec, not eval. I'm smert --- .local/bin/x-pdf | 2 +- .local/bin/x-terminal-emulator | 2 +- .local/bin/x-www-browser | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/x-pdf b/.local/bin/x-pdf index cfaa258..8f9ef60 100755 --- a/.local/bin/x-pdf +++ b/.local/bin/x-pdf @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@" +exec $(pick atril zathura mupdf okular evince xpdf 'emacsclient -c') "$@" diff --git a/.local/bin/x-terminal-emulator b/.local/bin/x-terminal-emulator index 075dda5..2e158cf 100755 --- a/.local/bin/x-terminal-emulator +++ b/.local/bin/x-terminal-emulator @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@" +exec $(pick 'emacsterm -c' 'urxvt' 'xterm' 'gnome-terminal') "$@" diff --git a/.local/bin/x-www-browser b/.local/bin/x-www-browser index 945dcfc..b0b05e0 100755 --- a/.local/bin/x-www-browser +++ b/.local/bin/x-www-browser @@ -1,3 +1,3 @@ #!/bin/sh -eval $(pick -s iceweasel icecat firefox conkeror) "$@" +exec $(pick -s iceweasel icecat firefox conkeror) "$@" -- cgit v1.1-4-g5e80 From 15820c5e8ed6f01cf4a87b85126eb7f346ebab3d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:38:21 -0500 Subject: configure makepkg here instead of in /etc --- .config/pacman/makepkg.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .config/pacman/makepkg.conf diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf new file mode 100644 index 0000000..8dc4536 --- /dev/null +++ b/.config/pacman/makepkg.conf @@ -0,0 +1,8 @@ +PKGDEST="${LIBREHOME:-$HOME}/packages/pkgdest" +SRCDEST="${LIBREHOME:-$HOME}/packages/srcdest" +SRCPKGDEST="${LIBREHOME:-$HOME}/packages/srcpkgdest" +LOGDEST="${LIBREHOME:-$HOME}/packages/logdest" + +PACKAGER="Luke Shumaker " + +MAKEFLAGS="-j3" -- cgit v1.1-4-g5e80 From c9a99ea8e015a34626a524a0e8be3c5378961894 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:48:45 -0500 Subject: systemd: {x0,}vncserver need to conflict with eachother --- .config/systemd/user/vncserver@.service | 1 + .config/systemd/user/x0vncserver@.service | 1 + 2 files changed, 2 insertions(+) diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service index ef83ef2..8c1d818 100644 --- a/.config/systemd/user/vncserver@.service +++ b/.config/systemd/user/vncserver@.service @@ -1,5 +1,6 @@ [Unit] Description=VNC desktop +Conflicts=x0vncserver@%i.service [Service] Type=simple diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service index 476e822..02165a7 100644 --- a/.config/systemd/user/x0vncserver@.service +++ b/.config/systemd/user/x0vncserver@.service @@ -1,5 +1,6 @@ [Unit] Description=VNC server for X displays +Conflicts=vncserver@%i.service [Service] Type=simple -- cgit v1.1-4-g5e80 From b844c786dbb22a45a218e183dcecd58cdbb66025 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 01:59:53 -0500 Subject: fix merge --- .config/systemd/user/wmii@.service.wants/rbar@98_wifi.service | 1 - .config/systemd/user/wmii@.service.wants/redshift@.service | 1 - .config/wmii-hg/rbar_acpi | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 120000 .config/systemd/user/wmii@.service.wants/rbar@98_wifi.service delete mode 120000 .config/systemd/user/wmii@.service.wants/redshift@.service diff --git a/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service b/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service deleted file mode 120000 index 286989e..0000000 --- a/.config/systemd/user/wmii@.service.wants/rbar@98_wifi.service +++ /dev/null @@ -1 +0,0 @@ -../rbar@.service \ No newline at end of file diff --git a/.config/systemd/user/wmii@.service.wants/redshift@.service b/.config/systemd/user/wmii@.service.wants/redshift@.service deleted file mode 120000 index 59234a7..0000000 --- a/.config/systemd/user/wmii@.service.wants/redshift@.service +++ /dev/null @@ -1 +0,0 @@ -../redshift@.service \ No newline at end of file diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi index bdcdf0f..5e77abb 100755 --- a/.config/wmii-hg/rbar_acpi +++ b/.config/wmii-hg/rbar_acpi @@ -5,7 +5,7 @@ update() { setup_trap "${id}.*" while true; do - acpi -bt | sed -r \ + acpi -t | sed -r \ -e 's/^([A-Z])[a-z]+ ([0-9]+):/\1\2:/' \ -e 's/\s*degrees\s*/°/g' | cat -n | while read -r n line; do -- cgit v1.1-4-g5e80 From 92b374462206241b6b809c3649a3d84324d43188 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 29 Jan 2015 02:03:14 -0500 Subject: cron: don't run offlineimap --- .config/cron/offlineimap | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .config/cron/offlineimap diff --git a/.config/cron/offlineimap b/.config/cron/offlineimap deleted file mode 100644 index fe0bfd4..0000000 --- a/.config/cron/offlineimap +++ /dev/null @@ -1,3 +0,0 @@ -#m h dom mon dow command -*/5 * * * * offlineimap-runner -u quiet -*/5 * * * * offlineimap-killer $((60*30)) -- cgit v1.1-4-g5e80