summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-29 00:51:20 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-29 00:51:20 -0500
commit8396ed0fba3dc50d7f802dd1c6db282eb6fc73fa (patch)
tree076be17c31c59930c8a03e040aa4760f037a65a1
parentf207384c99764edbac8f66ca82c717d99becb03e (diff)
wmii: 2 fixes
- unset _PATH in child processes - local=$(FAILURE) succeeds; delcare local on a separate line.
-rw-r--r--.config/wmii-hg/config.sh18
-rwxr-xr-x.config/wmii-hg/wmiirc6
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