summaryrefslogtreecommitdiff
path: root/.config/wmii-hg/config.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/wmii-hg/config.sh')
-rw-r--r--.config/wmii-hg/config.sh20
1 files changed, 10 insertions, 10 deletions
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: "<text> <background> <border>"
. 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)