From 3d4a42a35204fc8860d9a2a7daf6d78149fad780 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Aug 2013 16:14:16 -0400 Subject: add .config/wmii-hg for bleeding wmii --- .config/wmii-hg/autostart | 11 ++ .config/wmii-hg/config.sh | 250 +++++++++++++++++++++++++++++++++++ .config/wmii-hg/ctl-init | 5 + .config/wmii-hg/fixes.sh | 24 ++++ .config/wmii-hg/help-events | 3 + .config/wmii-hg/help-keys | 3 + .config/wmii-hg/include.sh | 11 ++ .config/wmii-hg/quit | 3 + .config/wmii-hg/rbar_battery | 9 ++ .config/wmii-hg/rbar_clock | 9 ++ .config/wmii-hg/rbar_cpu | 12 ++ .config/wmii-hg/rbar_wifi | 9 ++ .config/wmii-hg/rules | 8 ++ .config/wmii-hg/theme-solarized | 16 +++ .config/wmii-hg/theme-solarized-dark | 12 ++ .config/wmii-hg/util.sh | 128 ++++++++++++++++++ .config/wmii-hg/wmiirc | 15 +++ 17 files changed, 528 insertions(+) create mode 100755 .config/wmii-hg/autostart create mode 100644 .config/wmii-hg/config.sh create mode 100644 .config/wmii-hg/ctl-init create mode 100644 .config/wmii-hg/fixes.sh create mode 100755 .config/wmii-hg/help-events create mode 100755 .config/wmii-hg/help-keys create mode 100644 .config/wmii-hg/include.sh create mode 100755 .config/wmii-hg/quit create mode 100755 .config/wmii-hg/rbar_battery create mode 100755 .config/wmii-hg/rbar_clock create mode 100755 .config/wmii-hg/rbar_cpu create mode 100755 .config/wmii-hg/rbar_wifi create mode 100644 .config/wmii-hg/rules create mode 100644 .config/wmii-hg/theme-solarized create mode 100644 .config/wmii-hg/theme-solarized-dark create mode 100644 .config/wmii-hg/util.sh create mode 100755 .config/wmii-hg/wmiirc (limited to '.config/wmii-hg') diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart new file mode 100755 index 0000000..dc37f40 --- /dev/null +++ b/.config/wmii-hg/autostart @@ -0,0 +1,11 @@ +#!/bin/bash +. include.sh + +daemon lxpanel &> /dev/null +daemon nm-applet &> /dev/null +daemon notifyd &> /dev/null + +#Action rbar_cpu 01 & +#Action rbar_wifi 97 & +Action rbar_battery 98 & +Action rbar_clock 99 & diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh new file mode 100644 index 0000000..8f6df2d --- /dev/null +++ b/.config/wmii-hg/config.sh @@ -0,0 +1,250 @@ +#!/bin/bash + +MODKEY=Mod4 # "super" +UP=p +DOWN=n +LEFT=b +RIGHT=f + +HIST="$XDG_CACHE_HOME/wmii/history" +mkdir -p "${HIST%/*}" + +# 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" + + # 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 label "$*" >> $WMII_DIR/lbar/$1;; + DestroyTag) ## $1=tag + rm $WMII_DIR/lbar/$1;; + FocusTag) ## $1=tag + echo colors "$WMII_FOCUSCOLORS" >> $WMII_DIR/lbar/$1;; + UnfocusTag) ## $1=tag + echo colors "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; + UrgentTag) ## $1=tag $2=[Manager|Client] + echo "$WMII_URGENTCOLORS" >> $WMII_DIR/lbar/$1;; + NotUrgentTag) ## $1=tag $2=[Manager|Client] + echo "$WMII_NORMCOLORS" >> $WMII_DIR/lbar/$1;; + + ## 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 + 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/.config/wmii-hg/ctl-init b/.config/wmii-hg/ctl-init new file mode 100644 index 0000000..026c0d5 --- /dev/null +++ b/.config/wmii-hg/ctl-init @@ -0,0 +1,5 @@ +font xft:Monospace-8 +focuscolors $WMII_FOCUSCOLORS +normcolors $WMII_NORMCOLORS +grabmod $MODKEY +border 1 diff --git a/.config/wmii-hg/fixes.sh b/.config/wmii-hg/fixes.sh new file mode 100644 index 0000000..aa09157 --- /dev/null +++ b/.config/wmii-hg/fixes.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Fix various deficiencies in either the shell or the filesystem + +## +# Usage: ls DIRECTORY +# Linux's 9p kernel module sometimes omits entries in directory listings +## +unalias ls &>/dev/null +ls() { + real_ls="`which ls` -1F" + [ $# = 0 ] && set -- "`pwd`" + f="${1/#${WMII_DIR}/}" + if [ "$f" = "$1" ]; then + $real_ls "$f" + else + wmiir ls "$f" + fi +} + +## +# Usage: setsid cmd [arguments...] +# I like wmiir's setsid better than linux-utils' +## +setsid() { wmiir setsid "$@"; } diff --git a/.config/wmii-hg/help-events b/.config/wmii-hg/help-events new file mode 100755 index 0000000..08abd18 --- /dev/null +++ b/.config/wmii-hg/help-events @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Event | xmessage -file - diff --git a/.config/wmii-hg/help-keys b/.config/wmii-hg/help-keys new file mode 100755 index 0000000..6f4bd1c --- /dev/null +++ b/.config/wmii-hg/help-keys @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +scansection Key | xmessage -file - diff --git a/.config/wmii-hg/include.sh b/.config/wmii-hg/include.sh new file mode 100644 index 0000000..38551aa --- /dev/null +++ b/.config/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/.config/wmii-hg/quit b/.config/wmii-hg/quit new file mode 100755 index 0000000..27d9052 --- /dev/null +++ b/.config/wmii-hg/quit @@ -0,0 +1,3 @@ +#!/bin/bash +. include.sh +echo quit >> $WMII_DIR/ctl diff --git a/.config/wmii-hg/rbar_battery b/.config/wmii-hg/rbar_battery new file mode 100755 index 0000000..f632f7e --- /dev/null +++ b/.config/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/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock new file mode 100755 index 0000000..6aecb92 --- /dev/null +++ b/.config/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/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu new file mode 100755 index 0000000..5531e60 --- /dev/null +++ b/.config/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/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi new file mode 100755 index 0000000..18395a3 --- /dev/null +++ b/.config/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/.config/wmii-hg/rules b/.config/wmii-hg/rules new file mode 100644 index 0000000..cf735c9 --- /dev/null +++ b/.config/wmii-hg/rules @@ -0,0 +1,8 @@ +/wimenu/ floating=always +/panel/ tags=/.*/ floating=always +/xfce4-notifyd/ tags=/.*/ floating=always + +/nm-applet/ floating=off + +/Emacs|Navigator/ force-tags=+sel floating=never +/.*/ floating=off diff --git a/.config/wmii-hg/theme-solarized b/.config/wmii-hg/theme-solarized new file mode 100644 index 0000000..5dc830d --- /dev/null +++ b/.config/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/.config/wmii-hg/theme-solarized-dark b/.config/wmii-hg/theme-solarized-dark new file mode 100644 index 0000000..fde361b --- /dev/null +++ b/.config/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/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh new file mode 100644 index 0000000..a4c4bb4 --- /dev/null +++ b/.config/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/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc new file mode 100755 index 0000000..a6bc4b4 --- /dev/null +++ b/.config/wmii-hg/wmiirc @@ -0,0 +1,15 @@ +#!/bin/bash +export _PATH="$PATH" +export PATH="$WMII_CONFPATH:$PATH" + +. include.sh + +wmiir xwrite /event WmiircQuit # close any existing wmiirc's + +Event WmiircStart + +trap "Event Quit" EXIT + +wmiir read /event 2>/dev/null | while read event; do + Event $event +done -- cgit v1.2.3-54-g00ecf From 8c59f8591a23a4a6e3965c3376dcd4d9b110ed5b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Sep 2013 13:52:24 -0400 Subject: wmii-hg/lxpanel: Use a tango-dark based color theme --- .config/lxpanel/default/panels/panel | 4 ++-- .config/wmii-hg/config.sh | 2 +- .config/wmii-hg/theme-tango | 10 ++++++++++ .config/wmii-hg/theme-tango-dark | 11 +++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .config/wmii-hg/theme-tango create mode 100644 .config/wmii-hg/theme-tango-dark (limited to '.config/wmii-hg') diff --git a/.config/lxpanel/default/panels/panel b/.config/lxpanel/default/panels/panel index e89a833..2418027 100644 --- a/.config/lxpanel/default/panels/panel +++ b/.config/lxpanel/default/panels/panel @@ -9,7 +9,7 @@ Global { width=100 height=16 transparent=1 - tintcolor=#002b36 + tintcolor=#555753 alpha=255 autohide=0 heightwhenhidden=2 @@ -17,7 +17,7 @@ Global { setpartialstrut=1 usefontcolor=1 fontsize=10 - fontcolor=#839496 + fontcolor=#eeeeec usefontsize=0 background=0 backgroundfile=/usr/share/lxpanel/images/background.png diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 8f6df2d..99f084c 100644 --- a/.config/wmii-hg/config.sh +++ b/.config/wmii-hg/config.sh @@ -10,7 +10,7 @@ HIST="$XDG_CACHE_HOME/wmii/history" mkdir -p "${HIST%/*}" # Colors tuples: " " -. `conffile theme-solarized-dark` +. theme-tango-dark Event() { event=$1; shift; diff --git a/.config/wmii-hg/theme-tango b/.config/wmii-hg/theme-tango new file mode 100644 index 0000000..e0e35d4 --- /dev/null +++ b/.config/wmii-hg/theme-tango @@ -0,0 +1,10 @@ +TANGO_butter=("#fce94f" "#edd400" "#c4a000") +TANGO_orange=("#fcaf3e" "#f57900" "#ce5c00") +TANGO_choc=( "#e9b96e" "#c17d11" "#8f5902") +TANGO_cham=( "#8ae234" "#73d216" "#4e9a06") +TANGO_blue=( "#729fcf" "#3465a4" "#204a87") +TANGO_plum=( "#ad7fa8" "#75507b" "#5c3566") +TANGO_red=( "#ef2929" "#cc0000" "#a40000") +TANGO_alum=( "#eeeeec" "#d3d7cf" "#babdb6" + "#888a85" "#555753" "#2e3436") + diff --git a/.config/wmii-hg/theme-tango-dark b/.config/wmii-hg/theme-tango-dark new file mode 100644 index 0000000..04a9fa6 --- /dev/null +++ b/.config/wmii-hg/theme-tango-dark @@ -0,0 +1,11 @@ +#!/bin/bash +# Tango-tark + +. theme-tango + +WMII_BACKGROUND="${TANGO_alum[5]}" + +# =" " +WMII_NORMCOLORS="${TANGO_alum[0]} ${TANGO_alum[4]} ${TANGO_alum[3]}" +WMII_FOCUSCOLORS="${TANGO_alum[5]} ${TANGO_alum[1]} ${TANGO_alum[0]}" +WMII_URGENTCOLORS="${TANGO_orange[0]} ${TANGO_alum[4]} ${TANGO_orange[4]}" -- cgit v1.2.3-54-g00ecf From 969b0e66938b7690007bf2d0ede1fa93e7a5ff61 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Sep 2013 13:55:27 -0400 Subject: wmii-hg: run xcompmgr to add window effects (such as transparency) --- .config/wmii-hg/autostart | 1 + .config/wmii-hg/config.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to '.config/wmii-hg') diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index dc37f40..8b04940 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -1,6 +1,7 @@ #!/bin/bash . include.sh +daemon xcompmgr &> /dev/null daemon lxpanel &> /dev/null daemon nm-applet &> /dev/null daemon notifyd &> /dev/null diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh index 99f084c..3ddc8d5 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 - xsetroot -solid "$WMII_BACKGROUND" + hsetroot -solid "$WMII_BACKGROUND" # Clear the LBar and RBar find $WMII_DIR/{l,r}bar -type f -delete -- cgit v1.2.3-54-g00ecf From a092749c672c997a40decb1afd1dd20fdc9deb60 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Sep 2013 13:57:25 -0400 Subject: use dunst instead of xfce4-notifyd --- .config/wmii-hg/autostart | 2 +- .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml | 6 ++++++ .local/bin/notifyd | 14 -------------- 3 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml delete mode 100755 .local/bin/notifyd (limited to '.config/wmii-hg') diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart index 8b04940..23de062 100755 --- a/.config/wmii-hg/autostart +++ b/.config/wmii-hg/autostart @@ -4,7 +4,7 @@ daemon xcompmgr &> /dev/null daemon lxpanel &> /dev/null daemon nm-applet &> /dev/null -daemon notifyd &> /dev/null +daemon dunst &> /dev/null #Action rbar_cpu 01 & #Action rbar_wifi 97 & diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml new file mode 100644 index 0000000..2dd5c11 --- /dev/null +++ b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/.local/bin/notifyd b/.local/bin/notifyd deleted file mode 100755 index ddd5971..0000000 --- a/.local/bin/notifyd +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -connected_to_x_server() { - xdpyinfo &>/dev/null - return $? -} - -start_backend() { - /usr/lib/xfce4/notifyd/xfce4-notifyd -} - -while connected_to_x_server; do - start_backend -done -- cgit v1.2.3-54-g00ecf From ab764565762ea507c642c4c422d5980b06279c9c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Oct 2013 19:19:27 -0400 Subject: wmii-hg: set the WMII_DIR to include DISPLAY, use tab for indent --- .config/wmii-hg/include.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.config/wmii-hg') diff --git a/.config/wmii-hg/include.sh b/.config/wmii-hg/include.sh index 38551aa..bd9456f 100644 --- a/.config/wmii-hg/include.sh +++ b/.config/wmii-hg/include.sh @@ -1,10 +1,10 @@ #!/bin/bash if [[ -z "$WMII_NAMESPACE" ]]; then - export WMII_NAMESPACE="`wmiir namespace`" + 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 . util.sh -- cgit v1.2.3-54-g00ecf From 927aedb7605bba96a6ea2fc707ab026946b4d2b0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Mar 2014 16:10:08 -0400 Subject: backport changes from my laptop --- .config/abs.conf | 1 + .config/bash/rc.d/emacs.sh | 43 ++++++++++++++-- .config/bash/rc.sh | 12 ++--- .config/login.sh | 34 +++++++++---- .config/lxpanel/default/panels/panel | 11 ---- .config/maildirproc/att.rc | 33 ++++++++---- .config/maildirproc/purdue.rc | 58 ++++++++++++++++++---- .config/ssh/.gitignore | 1 + .config/ssh/config | 13 +++-- .config/symlinks | 23 +++++---- .config/wmii-hg/fixes.sh | 6 +-- .config/wmii-hg/util.sh | 35 ++++++------- .../xfconf/xfce-perchannel-xml/xfce4-notifyd.xml | 6 --- 13 files changed, 179 insertions(+), 97 deletions(-) create mode 100644 .config/abs.conf create mode 100644 .config/ssh/.gitignore delete mode 100644 .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml (limited to '.config/wmii-hg') diff --git a/.config/abs.conf b/.config/abs.conf new file mode 100644 index 0000000..163bc53 --- /dev/null +++ b/.config/abs.conf @@ -0,0 +1 @@ +ABSROOT="$HOME/packages/abs" diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index f484bbb..9c1bf4d 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -1,8 +1,41 @@ +#!/bin/bash + case "$TERM" in eterm*) - SELECTED_EDITOR='emacsclient' - EDITOR=$SELECTED_EDITOR - VISUAL=$SELECTED_EDITOR - export SELECTED_EDITOR EDITOR VISUAL - :;; + SELECTED_EDITOR='emacsclient' + EDITOR=$SELECTED_EDITOR + VISUAL=$SELECTED_EDITOR + export SELECTED_EDITOR EDITOR VISUAL + # The following uses the variable _EMACS_BUFFER to store some state + _emacs_quote() { + local str="$*" + str="${str//\\/\\\\}" + str="${str//\"/\\\"}" + str="\"${str}\"" + printf '%s' "$str" + } + _emacs_rename_terminal() { + local name="$(_emacs_quote "$(_emacs_get_desired_buffer_name)")" + if [[ -n $_EMACS_BUFFER ]]; then + local buffer="(get-buffer $_EMACS_BUFFER)" + else + local buffer='(window-buffer (selected-window))' + fi + _EMACS_BUFFER="$(emacsclient -e "(with-current-buffer ${buffer} (rename-buffer ${name} t)))" 2>/dev/null)" + } + _emacs_get_short_cwd() { + local base=$1 + local suffix='' + if [[ $base =~ (/(src|pkg|doc|pkg-libre|src-libre|trunk|tags|branches))*$ ]]; then + suffix=$BASH_REMATCH + base=${base%$suffix} + fi + base=${base##*/} + echo ${base}${suffix} + } + _emacs_get_desired_buffer_name() { + echo "*ansi-term*<$(_emacs_get_short_cwd "$PWD")>" + } + PROMPT_COMMAND='_emacs_rename_terminal "$(_emacs_get_desired_buffer_name)"' + :;; esac diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index 447796a..2bf60bc 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -13,17 +13,16 @@ shopt -s checkhash ################################################################################ # History settings -export HISTCONTROL=ignoredups -export HISTFILE=${XDG_CACHE_HOME}/bash/history -export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' -export HISTSIZE=5000 +HISTCONTROL=ignoredups +HISTFILE=${XDG_CACHE_HOME}/bash/history +HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' +HISTSIZE=5000 shopt -s histappend # append to the history file, don't overwrite it mkdir -p "${HISTFILE%/*}" # General settings shopt -s checkwinsize # update the values of LINES and COLUMNS shopt -s globstar # Let ** recursively scan directories -PROMPT_COMMAND='' ################################################################################ # Overly complicated setting of PS1 # @@ -38,6 +37,7 @@ term-title() { esac printf "$fmt" "$*" } +PROMPT_COMMAND='' make_prompt() { echo "${BOLD}${GREEN}\u@\h${BLUE}:\w${RESET}" @@ -57,7 +57,7 @@ if tput setaf 1 &>/dev/null; then _STATUS+="\$(v=\$?; [[ \$v = 0 ]] && c='${GREEN}' || c='${RED}'; printf %s%03i \$c \$v)" _STATUS+="${RESET}${BOLD}]${RESET}" else - _STATUS='[$?]' + _STATUS='[$(printf "%03i" $?)]' fi PS1="${_STATUS} $(make_prompt)"'\n\$ ' unset RESET BOLD RED GREEN BLUE _STATUS diff --git a/.config/login.sh b/.config/login.sh index 3dad752..2687a8e 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -27,9 +27,15 @@ export TMPDIR="$HOME/tmp" # XDG ################################################################ . "$HOME/.local/lib/xdg.sh" +ln -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions # Settings ########################################################### +# Spell check +if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then + export DICTIONARY="${LANG%%.*}" +fi + # Text editor if [[ -f "$HOME/.selected_editor" ]]; then . "$HOME/.selected_editor" @@ -41,13 +47,17 @@ fi # GPG if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then + echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then + echo 'login: Starting gpg-agent' mkdir -p "${XDG_RUNTIME_DIR}/sessions" - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" &>/dev/null + gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null fi if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then + echo 'login: Setting gpg-agent info:' + cat "${XDG_RUNTIME_DIR}/sessions/gpg" . "${XDG_RUNTIME_DIR}/sessions/gpg" export GPG_AGENT_INFO #export SSH_AUTH_SOCK @@ -65,19 +75,21 @@ export _JAVA_OPTIONS # X11 if [[ -z $XAUTHORITY ]]; then - export XAUTHORITY="$HOME/.Xauthority" + #export XAUTHORITY="$HOME/.Xauthority" + mkdir -p "${XDG_RUNTIME_DIR}/sessions" + export XAUTHORITY="${XDG_RUNTIME_DIR}/sessions/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 +# 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 diff --git a/.config/lxpanel/default/panels/panel b/.config/lxpanel/default/panels/panel index 304f201..93bdb61 100644 --- a/.config/lxpanel/default/panels/panel +++ b/.config/lxpanel/default/panels/panel @@ -31,17 +31,6 @@ Plugin { image=/usr/share/lxpanel/images/my-computer.png system { } - separator { - } - item { - command=run - } - separator { - } - item { - image=gnome-logout - command=logout - } } } diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index e862b3f..381ce8f 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -76,7 +76,7 @@ def handle_incoming_unknown(mail): def my_filters(mail): # Sort mail from GNU mailing lists - for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla' ]: + for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla', 'bug-librejs' ]: if ( False or mail["List-Id"].matches(list+"\.gnu\.org") @@ -101,6 +101,9 @@ def my_filters(mail): if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"): if mail["From"].contains("monit@"): if mail["Message-Id"].contains("@repo.parabolagnulinux.org"): + if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"): + mail.move(".software.parabola-maintenance.monit-repo.sshd") + return mail.move(".software.parabola-maintenance.monit-repo") return if mail["Message-Id"].contains("@rshg054.dnsready.net"): @@ -125,6 +128,9 @@ def my_filters(mail): or is_to_or_from(mail, "parabolagnulinux.org") or is_to_or_from(mail, "kiwwwi.com.ar") ): + if mail["Subject"].contains("[Django]"): + mail.move(".software.parabola-maintenance.django") + return mail.move(".software.parabola-dev") return @@ -132,6 +138,10 @@ def my_filters(mail): mail.move(".software.pacman-dev") return + if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")): + mail.move(".software.systemd-devel") + return + for subject_re in [ "\[Stow-[^\]]*\].*", ]: @@ -179,6 +189,7 @@ def my_filters(mail): or is_to_or_from(mail,"mitchprather@sbcglobal.net") or is_to_or_from(mail,"oa_wap@yahoo.com") or is_to_or_from(mail,"mytroop.us") + or is_to_or_from(mail,"crossroadsbsa.org") ): mail.move(".Troop276") return @@ -250,20 +261,21 @@ def my_filters(mail): # Sort mail from software people for address in [ - "gnu.org", - "gnome.org", + "@archlinux.org", + "@fsf.org", + "@github.com", + "canonical.org", + "cnuk.org", "eff.org", + "esr@thyrsus.com", + "foocorp.net", "gitorious.org", - "sourceforge.com", + "gnome.org", + "gnu.org", "ietf.org", "kde.org", + "sourceforge.com", "trustees@core3.amsl.com", - "esr@thyrsus.com", - "canonical.org", - "foocorp.net", - "cnuk.org", - "@archlinux.org", - "@github.com", ]: if is_to_or_from(mail,address): mail.move(".software") @@ -305,6 +317,7 @@ def my_filters(mail): or mail["Subject"].contains("newsletter") or mail["From"].contains("Info@mailing.jamendo.com") or mail["From"].contains("info@demandprogress.org") + or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net")) ): mail.move(".misc.Newsletters") return diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index 0ffc1e6..6d4b913 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -27,7 +27,7 @@ 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 ######################################################## @@ -37,11 +37,11 @@ def my_filters(mail): or is_to_or_from(mail,"Purduealumni@purdue.edu") or is_to_or_from(mail,"pase@purdue.edu") ): - mail.move("INBOX.PASE") + mail.move("INBOX.crap.PASE") return if mail["Subject"].contains("[PLUG]"): - mail.move("INBOX.PLUG") + mail.move("INBOX.crap.PLUG") return if mail["From"].matches(".*bursar.*@purdue\.edu"): @@ -49,15 +49,19 @@ def my_filters(mail): return if mail["From"].contains("mailhub-admin@purdue.edu"): - mail.move("INBOX.mailhub-admin") + mail.move("INBOX.crap.mailhub-admin") return if mail["From"].matches("pmx-.*@purdue.edu"): - mail.move("INBOX.spam") + mail.move("INBOX.crap.spam") return if is_to_or_from(mail,"linkedin.com"): - mail.move("INBOX.LinkedIn") + mail.move("INBOX.crap.LinkedIn") + return + + if is_to_or_from(mail,"follet.com"): + mail.move("INBOX.Follet") return if ( @@ -65,12 +69,14 @@ def my_filters(mail): or is_to_or_from(mail,"@edrtrust.com") or is_to_or_from(mail,"@propertysolutions.com") or is_to_or_from(mail,"collegestationapartments@gmail.com") + or is_to_or_from_re(mail,"collegestationca\..*@gmail.com") + or is_to_or_from(mail, "@duke-energy.com") ): - mail.move("INBOX.CollegeStation") + mail.move("INBOX.housing.CollegeStation") return if mail["From"].matches("facebook(|mail)\.com"): - mail.move("INBOX.Facebook") + mail.move("INBOX.crap.Facebook") return if ( @@ -78,7 +84,7 @@ def my_filters(mail): or is_to_or_from(mail,"@cable.comcast.com") or is_to_or_from(mail,"@apexsystemsinc.com") ): - mail.move("INBOX.Comcast") + mail.move("INBOX.work.Comcast") return if ( @@ -86,7 +92,10 @@ def my_filters(mail): or mail["Subject"].contains("[CS Opportunity Update]") or mail["Subject"].contains("[CS Majors]") ): - mail.move("INBOX.CS") + mail.move("INBOX.crap.CS") + return + if (mail["From"].contains("shumakl@cs.purdue.edu") and mail["Subject"].matches("^cron:")): + mail.move("INBOX.crap.cron") return # Fall 2012 ############################################################ @@ -145,6 +154,35 @@ def my_filters(mail): mail.move("INBOX.classes.2013-2.MA265") return + # Spring 2014 ########################################################## + + # COM217 + if mail["Subject"].contains("Spring-2014-COM-21700-004"): + mail.move("INBOX.classes.2014-1.COM217") + return + if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"): + mail.move("INBOX.classes.2014-1.COM217.Mixable") + return + # CS252 + if piazza_topic(mail, "CS 25200"): + mail.move("INBOX.classes.2014-1.CS252.Piazza") + return + # CS307 + if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"): + mail.move("INBOX.classes.2014-1.CS307") + return + # SPAN102 + if mail["Subject"].contains("spring-2014-span-102"): + mail.move("INBOX.classes.2014-1.SPAN102") + return + # STAT350 + if is_to_or_from(mail, "ssellke@purdue.edu"): + mail.move("INBOX.classes.2014-1.STAT350") + return + if piazza_topic(mail, "STAT 35000 (SELLKE)"): + mail.move("INBOX.classes.2014-1.STAT350.Piazza") + return + handle_mapping = { "INBOX": my_filters, } diff --git a/.config/ssh/.gitignore b/.config/ssh/.gitignore new file mode 100644 index 0000000..00977c6 --- /dev/null +++ b/.config/ssh/.gitignore @@ -0,0 +1 @@ +id_* diff --git a/.config/ssh/config b/.config/ssh/config index 894af44..b6e53d6 100644 --- a/.config/ssh/config +++ b/.config/ssh/config @@ -1,16 +1,16 @@ Host * Protocol 2 ControlMaster auto - ControlPath ~/.ssh/master-%r@%h:%p + ControlPath ~/.sessions/ssh-%r@%h:%p Compression yes Host lore - HostName lore.cs.purdue.edu - User shumakl + HostName lore.cs.purdue.edu + User shumakl Host data - HostName data.cs.purdue.edu - User shumakl + HostName data.cs.purdue.edu + User shumakl Host repo Port 1863 @@ -20,6 +20,5 @@ Host rshg054 Port 1863 HostName parabolagnulinux.org -Host lukeshu +Host lukeshu.com Port 1863 - HostName 199.180.255.147 diff --git a/.config/symlinks b/.config/symlinks index dfd06d4..030954c 100644 --- a/.config/symlinks +++ b/.config/symlinks @@ -15,39 +15,40 @@ .config/bash/logout.sh .bash_logout # Files plucked out of multi-purpose directories -.config/ssh/config .ssh/config .config/gpg/gpg.conf .gnupg/gpg.conf # Individual config files +.config/abs.conf .abs.conf .config/conkerorrc .conkerorrc -.config/hgrc .hgrc .config/hgk .hgk +.config/hgrc .hgrc .config/irbrc .irbrc -.config/linphonerc .linphonerc +.config/linphonerc .linphonerc # .config/selected_editor .selected_editor -.cache/offlineimap .offlineimap .config/offlineimaprc .offlineimaprc +.cache/offlineimap .offlineimap # Directories .cache/maildirproc/ .maildirproc -.config/icons/ .icons + .config/arduino/ .arduino .config/bazaar/ .bazaar .config/cpan/ .cpan .config/emacs/ .emacs.d +.config/icons/ .icons .config/mozilla/ .mozilla # -.config/mplayer/ .mplayer -.config/nanorc .nanorc +.config/mplayer/ .mplayer # .config/purple/ .purple +.config/ssh/ .ssh .config/subversion/ .subversion -.config/wmii/ .wmii # .config/wmii-hg/ .wmii-hg +.config/wmii/ .wmii # # KDE -.config/ .kde/share/apps -.config/ .kde/share/config -.kde/ .kde4 +.config/ .kde/share/apps # +.config/ .kde/share/config # +.kde/ .kde4 # # Alias for conkeror .mozilla/ .conkeror.mozdev.org diff --git a/.config/wmii-hg/fixes.sh b/.config/wmii-hg/fixes.sh index aa09157..5858859 100644 --- a/.config/wmii-hg/fixes.sh +++ b/.config/wmii-hg/fixes.sh @@ -7,11 +7,11 @@ ## unalias ls &>/dev/null ls() { - real_ls="`which ls` -1F" - [ $# = 0 ] && set -- "`pwd`" + local real_ls=("$(which ls)" -1F) + [ $# = 0 ] && set -- "$PWD" f="${1/#${WMII_DIR}/}" if [ "$f" = "$1" ]; then - $real_ls "$f" + "${real_ls[@]}" "$f" else wmiir ls "$f" fi diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index a4c4bb4..71dbc41 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -13,7 +13,7 @@ # It escapes ways to execute code, but not variables. ## dquote() { - str=$1 + local str=$1 str="${str//\\/\\\\}" # backslash str="${str//\"/\\\"}" # dquote str="${str//\$(/\\\$(}" # $(...) @@ -32,8 +32,8 @@ expand_variables() { } is_mounted() { - dir="$(readlink -m $1)" - mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -- "$dir")" + local dir="$(readlink -m $1)" + local mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -Fx -- "$dir")" [[ $dir = "$mntpnt" ]] return $? } @@ -47,8 +47,9 @@ is_mounted() { # 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 + local dirs + IFS=: dirs=($@) + find -L "${dirs[@]}" -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null | sort -u } ## @@ -56,9 +57,9 @@ path_ls() { # Find the full path of PROGRAM by searching PATH ## path_which() { - mypath=$1 - prog=$2 - which=`which which` + local mypath=$1 + local prog=$2 + local which=$(which which) PATH="$mypath" "$which" -- "$prog" 2>/dev/null } @@ -71,7 +72,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' } ################################################################################ @@ -97,18 +98,18 @@ connected_to_x_server() { # If SECTION is not given, it reads all doc comments. ## scansection() { - file=`conffile config.sh` - sec=$1 - tmp=`mktemp` + 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 + < "$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 + < "$file" sed "/\s*}\s*##\s*End\s/d" > "$tmp" fi - < $tmp sed -n '/##/p' | while read; do + < "$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 @@ -117,12 +118,12 @@ scansection() { printf '\t%s\t%s\n' "$(echo "$var"|expand_variables)" "$comment" fi done - rm $tmp + rm -- "$tmp" } ## # Usage: conffile FILE ## conffile() { - echo "$HOME/.wmii-hg/$@" + echo "$HOME/.wmii-hg/$1" } diff --git a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml b/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml deleted file mode 100644 index 2dd5c11..0000000 --- a/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - -- cgit v1.2.3-54-g00ecf