---
name: "wmiiloop"
section: "1"
platform: "linux"
package: "wmii"
version: "3.6+debian-8"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/wmiiloop"
---

# wmiiloop(1)

tool for easy wmii event handling

## NAME

wmiiloop-VERSION - tool for easy wmii event handling

## SYNOPSIS

eval "$(wmiiloop \<events)"

## DESCRIPTION

wmiiloop is an awk and sh script which preprocesses [*sh*(1)](/sh/1.md) syntax  to simplify writing a wmii event loop.

wmiiloop associates lines begining with *Event*, *Action*, or  *Key* (henceforth known as **$keyword**), followed by arbitrary  text (henceforth known as **$args**), with functions which call any  indented lines which follow. In the function names, all non-alphanumeric  characters in **$args** are replaced with underscores (\_). The  functions are named **$keyword**'\_'**$args**.

Any variables in the unintented lines are interpolated by the shell.

Additionally, each declaration's **$args** are assigned to a variable  named **$keyword**'s'. In this case, no transliteration occurs. For  instance, the following declaration:

```
Key $MODKEY-j
	echo Got $@
```

yields (assuming *$MODKEY* is set to *Mod1*):

```
Keys=" $Keys Mod1-j"
Mod1_j() {
	echo Got $@
}
```

## SEE ALSO

[*wmii*(1)](/wmii/1.md), [*wmii*(1)](/wmii/1.md). [*wmiir*(1)](/wmiir/1.md), PREFX/etc/wmiirc
