From a12f3189bcf6d2cf277acfa7824961b158bd57e6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 29 Nov 2014 22:38:56 -0500 Subject: stuff --- .config/wmii-hg/config.sh | 20 ++++++++++---------- .config/wmii-hg/util.sh | 2 +- .config/wmii-hg/wmiirc | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to '.config/wmii-hg') 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: " " . 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) diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index f15031e..2211d28 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -71,7 +71,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' } ################################################################################ diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index a7dd80c..a6585de 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -13,6 +13,6 @@ Event WmiircStart trap "Event Quit" EXIT -wmiir read /event 2>/dev/null | while read event; do +while read -r event; do Event $event -done +done < <(wmiir read /event 2>/dev/null) -- cgit v1.2.3-54-g00ecf