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.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index c560f3f..437c585 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -13,7 +13,7 @@ mkdir -p -- "${HIST%/*}"
. theme-tango-dark
Event() {
- event=$1; shift;
+ local event=$1; shift;
case "$event" in
## Mouse event meanings:
## MouseDown = mouse down
@@ -42,7 +42,7 @@ Event() {
# Clear the LBar and RBar
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`
+ local tag seltag="$(sed 1q $WMII_DIR/tag/sel/ctl)"
while read -r tag; do
Event CreateTag "$tag"
if [ "$tag" = "$seltag" ]; then
@@ -99,14 +99,14 @@ Event() {
NotUrgent) ## $1=client $2=[Manager|Client]
;;
ClientMouseDown) ## $1=client $2=button
- client=$1
- button=$2
+ local client=$1
+ local button=$2
case $button in
1) ;;
2) ;;
3)
{
- case `wmii9menu Delete Fullscreen` in
+ case $(wmii9menu Delete Fullscreen) in
Delete)
echo kill >> $WMII_DIR/client/$client/ctl;;
Fullscreen)
@@ -117,8 +117,9 @@ Event() {
ClientClick) ## $1=client $2=button
;;
Unresponsive) ## $1=client
- client=$1
- client_name=`cat $WMII_DIR/client/$client/label`
+ local client=$1
+ local client_name=$(< $WMII_DIR/client/$client/label)
+ local msg resp
msg="The client \`${client_name}' is not responding."
msg+=" What would you like to do?"
{
@@ -166,7 +167,7 @@ Event() {
}
Key() {
- key=$1
+ local key=$1
case "$key" in
## Moving around
@@ -239,7 +240,7 @@ Key() {
}
Action() {
- prog=$(path_which "$WMII_CONFPATH" "$1"); shift
+ local prog=$(path_which "$WMII_CONFPATH" "$1"); shift
if [ -n "$prog" ]; then
"$prog" "$@"
else