summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/config.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-06 13:17:44 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-06 13:17:44 -0500
commitd7128cd444fce3129a78e08fe643978fb25c3846 (patch)
tree53a1d70aa49fad188ede5a69c836ae832eeb901e /.config/wmii-hg/config.sh
parent10fe774027ba3b5230809a142a499802f977360b (diff)
wmii: think harder about when to fork
Diffstat (limited to '.config/wmii-hg/config.sh')
-rw-r--r--.config/wmii-hg/config.sh24
1 files 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
}