wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit cd9952e20fa92d1298f36a2d14ec2a383f206217
parent 1e99e3beb39b8219c36b56f0e25c43efabfa978e
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Wed, 22 Mar 2006 16:28:44 +0100

merged



Diffstat:
rc/status | 3+--
rc/welcome | 30+++++++++++++++---------------
rc/wmiirc | 21++++++++++-----------
3 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/rc/status b/rc/status @@ -1,13 +1,12 @@ #!/bin/sh # periodically print date and load average to the bar -wmiir remove /bar/status && sleep 2 - xwrite() { file="$1"; shift echo -n "$@" | wmiir write "$file" } +wmiir remove /bar/status && sleep 2 wmiir create /bar/status xwrite /bar/status/colors $WMII_NORMCOLORS diff --git a/rc/welcome b/rc/welcome @@ -1,38 +1,38 @@ #!/bin/sh # display a welcome message that contains the wmii tutorial -xmessage -file - <<EOF +xmessage -file - <<'EOF' Welcome to wmii, the non-wimp environment of the WMI Project. This is a small step by step tutorial, intended to make you a little bit familiar with wmii. -Note, \$MODKEY is the Alt-key by default. +Note: $MODKEY is the Alt-key by default. Let's go! -- Start two xterms by pressing \$MODKEY-t twice. -- Switch between the three windows: \$MODKEY-j, \$MODKEY-k - You can also use \$MODKEY-Tab instead of \$MODKEY-j. If you prefer the mouse, +- Start two xterms by pressing $MODKEY-t twice. +- Switch between the three windows: $MODKEY-j, $MODKEY-k + You can also use $MODKEY-Tab instead of $MODKEY-j. If you prefer the mouse, then just click the desired window. -- Create a new column with: \$MODKEY-n -- Tag the selected client with another tag: \$MODKEY-Shift-2 +- Create a new column with: $MODKEY-n +- Tag the selected client with another tag: $MODKEY-Shift-2 IMPORTANT: before you do next step, note that you can select the current tag - with \$MODKEY-1. -- Select the new tag: \$MODKEY-2 -- Select the floating area: \$MODKEY-space -- Open the programs menu: \$MODKEY-Control-p + with $MODKEY-1. +- Select the new tag: $MODKEY-2 +- Select the floating area: $MODKEY-space +- Open the programs menu: $MODKEY-Control-p Type 'xclock' and press Enter. - Resize the xclock window: left-click on the border and, while holding the button down, move the cursor around. - Move the xclock window: left-click on the title bar and, while holding the button down, move the cursor around. -- Open the actions menu: \$MODKEY-Control-a +- Open the actions menu: $MODKEY-Control-a Rerun wmiirc by selecting 'wmiirc'. - Working with mouse efficiently: selecting a window: just click the desired window - move a window: press \$MODKEY-Button1Press - and resize a window: press \$MODKEY-Button3Press and resize it + move a window: press $MODKEY-Button1Press + and resize a window: press $MODKEY-Button3Press and resize it (this can also be done by clicking the titlebar of the window/borders respectively) - We'll now have a look at the internal filesystem used by wmii. Executing wmiir read / @@ -43,7 +43,7 @@ Let's go! will show you the content of the bar. We hope that these steps gave you an idea of how wmii works. You can reread -them at any time by pressing \$MODKEY-Control-a and selecting 'welcome'. +them at any time by pressing $MODKEY-Control-a and selecting 'welcome'. You should now take a look at the wmii(1) man page. An FAQ is available on <http://wmii.de>. diff --git a/rc/wmiirc b/rc/wmiirc @@ -7,11 +7,12 @@ xwrite() { } proglist() { - ls -lL `echo "$@" | tr ':' ' '` | awk '!/^d/ && $1 ~ /x/ {print $NF}' | sort | uniq + ls -lL `echo "$@" 2>/dev/null | tr : ' '` | + awk 'NF>2 && !/^d/ && $1 ~ /x/ {print $NF}' | sort -u } # give wmiiwm a chance to start -while ! echo Start wmiirc | wmiir write /event > /dev/null 2>&1 +while ! echo Start wmiirc | wmiir write /event >/dev/null 2>&1 do sleep 1 done @@ -96,14 +97,13 @@ do type="$1"; shift case "$type" in Start) - if test $1 = "wmiirc" + if test "$1" = wmiirc then - exit 0 - fi - ;; + exit + fi;; NewTag) wmiir create /bar/$1 - if test $1 = "$oldtag" + if test "$1" = "$oldtag" then xwrite /bar/$1/colors $WMII_NORMCOLORS else @@ -117,7 +117,7 @@ do then xwrite /bar/$oldtag/colors $WMII_SELCOLORS fi - xwrite /bar/$1/data "$1" + xwrite /bar/$1/data $1 xwrite /bar/$1/colors $WMII_NORMCOLORS oldtag=$1;; LabelClick) @@ -127,8 +127,7 @@ do $MODKEY-Control-c) xwrite /ws/sel/sel/ctl kill;; $MODKEY-Control-w,y) - wmiirc & - exit 0;; + exec wmiirc;; $MODKEY-Control-q,y) xwrite /ctl quit;; $MODKEY-Control-p) @@ -169,4 +168,4 @@ do xwrite /ws/sel/sel/tags `echo $1 | sed 's/.*-//'`;; esac;; esac -done & +done