summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/config.sh
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 /.config/wmii-hg/config.sh
parentf207384c99764edbac8f66ca82c717d99becb03e (diff)
wmii: 2 fixes
- unset _PATH in child processes - local=$(FAILURE) succeeds; delcare local on a separate line.
Diffstat (limited to '.config/wmii-hg/config.sh')
-rw-r--r--.config/wmii-hg/config.sh18
1 files changed, 11 insertions, 7 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
}