reintroduced wmiir as a wrapper to ixpc, adapted all scripts and manpages

This commit is contained in:
Denis Grelich 2006-12-24 00:20:28 +01:00
parent 9647171574
commit fd731c3afa
8 changed files with 88 additions and 29 deletions

View File

@ -44,8 +44,10 @@ install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@sed 's|CONFPREFIX|${CONFPREFIX}|g; s|VERSION|${VERSION}|g' <wmii >${DESTDIR}${PREFIX}/bin/wmii
@cp -f wmiir ${DESTDIR}${PREFIX}/bin
@cp -f wmiiwm ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmii
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmiir
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmiiwm
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@mkdir -p ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@ -55,19 +57,23 @@ install: all
done
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed 's/VERSION/${VERSION}/g; s/CONFPREFIX/${CONFPREFIX}/g' < wmii.1 > ${DESTDIR}${MANPREFIX}/man1/wmii.1
@sed 's/VERSION/${VERSION}/g ; s,CONFPREFIX,${CONFPREFIX},g' < wmii.1 > ${DESTDIR}${MANPREFIX}/man1/wmii.1
@sed 's/VERSION/${VERSION}/g' < wmiir.1 > ${DESTDIR}${MANPREFIX}/man1/wmiir.1
@sed 's/VERSION/${VERSION}/g' < wmiiwm.1 > ${DESTDIR}${MANPREFIX}/man1/wmiiwm.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/wmii.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/wmiir.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/wmiiwm.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/wmii
@rm -f ${DESTDIR}${PREFIX}/bin/wmiir
@rm -f ${DESTDIR}${PREFIX}/bin/wmiiwm
@echo removing scripts from ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@rm -rf ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/wmii.1
@rm -f ${DESTDIR}${MANPREFIX}/man1/wmiir.1
@rm -f ${DESTDIR}${MANPREFIX}/man1/wmiiwm.1
.PHONY: all options clean dist install uninstall

View File

@ -1,2 +1,2 @@
#!/bin/sh
echo -n quit | ixpc write /ctl
echo -n quit | wmiir write /ctl

View File

@ -3,11 +3,11 @@
xwrite() {
file="$1"; shift
echo -n "$@" | ixpc write "$file"
echo -n "$@" | wmiir write "$file"
}
ixpc remove /rbar/status 2>/dev/null && sleep 2
echo $WMII_SELCOLORS | ixpc create /rbar/status
wmiir remove /rbar/status 2>/dev/null && sleep 2
echo $WMII_SELCOLORS | wmiir create /rbar/status
while xwrite /rbar/status "$WMII_NORMCOLORS" `date` `uptime | sed 's/.*://; s/,//g'`
do
sleep 1

View File

@ -19,7 +19,7 @@ Let's go!
- Create a new column with: $MODKEY-Shift-l
This moves the client right-wards.
- Tag the selected client with another tag: $MODKEY-Shift-2
IMPORTANT: before you do next step, note that you can select the current tag
IMPORTANT: before you do the 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
@ -30,13 +30,13 @@ Let's go!
- Resize the xclock window: Press $MODKEY, right-click the window and, while holding
the button down, move the cursor around.
- Open the actions menu: $MODKEY-a
Rerun ixpcc by selecting 'ixpcc'.
Rerun wmiirc by selecting 'wmiirc'.
- We'll now have a look at the internal filesystem used by wmii. Executing
ixpc read /
wmiir read /
in the shell of the terminal will list all the files in the root directory.
Entries beginning with a 'd' are directories.
If you are curious, you can now dig deeper into the directory trees. For instance,
ixpc read /bar/
wmiir read /bar/
will show you the content of the bar.
We hope that these steps gave you an idea of how wmii works. You can reread

View File

@ -3,7 +3,7 @@
xwrite() {
file="$1"; shift
echo -n "$@" | ixpc write "$file"
echo -n "$@" | wmiir write "$file"
}
proglist() {
@ -19,8 +19,8 @@ conf_which () {
}
tagsmenu() {
tag=`ixpc read /tag/sel/ctl`
tags=`ixpc ls /tag | sed 's,/,,; /^sel$/d' | awk "BEGIN{print \"$tag\"} !/^$tag\$/" | $DMENU`
tag=`wmiir read /tag/sel/ctl`
tags=`wmiir ls /tag | sed 's,/,,; /^sel$/d' | awk "BEGIN{print \"$tag\"} !/^$tag\$/" | $DMENU`
test -n "$tags" && xwrite $@ "$tags"
}
@ -42,10 +42,10 @@ WMII_TERM="xterm"
export DMENU WMII_FONT WMII_SELCOLORS WMII_NORMCOLORS WMII_TERM
# stop any running instances of wmiirc
echo Start wmiirc | ixpc write /event || exit 1
echo Start wmiirc | wmiir write /event || exit 1
# WM CONFIGURATION
ixpc write /ctl << EOF
wmiir write /ctl << EOF
font $WMII_FONT
selcolors $WMII_SELCOLORS
normcolors $WMII_NORMCOLORS
@ -54,12 +54,12 @@ border 2
EOF
# COLUMN RULES
ixpc write /colrules <<EOF
wmiir write /colrules <<EOF
/1/ -> 50+50
EOF
# TAGGING RULES
ixpc write /tagrules <<EOF
wmiir write /tagrules <<EOF
/XMMS.*/ -> ~
/Gimp.*/ -> ~
/MPlayer.*/ -> ~
@ -75,7 +75,7 @@ ACTIONS_DIRS=`echo "$WMII_CONFPATH" | tr : ' '`
proglist `echo "$PATH" | tr : ' '` >$PROGS_FILE &
# SHORTCUTS
ixpc write /keys <<EOF
wmiir write /keys <<EOF
$MODKEY-$LEFT
$MODKEY-$RIGHT
$MODKEY-$DOWN
@ -119,25 +119,25 @@ $MODKEY-Shift-9
EOF
# TAG BAR
ixpc ls /lbar |
wmiir ls /lbar |
while read bar
do
ixpc remove "/lbar/$bar"
wmiir remove "/lbar/$bar"
done
seltag="`ixpc read /tag/sel/ctl 2>/dev/null`"
ixpc ls /tag | sed -e 's,/$,,; /^sel$/d' |
seltag="`wmiir read /tag/sel/ctl 2>/dev/null`"
wmiir ls /tag | sed -e 's,/$,,; /^sel$/d' |
while read tag
do
if [ "X$tag" = "X$seltag" ]; then
echo "$WMII_SELCOLORS" "$tag" | ixpc create "/lbar/$tag"
echo "$WMII_SELCOLORS" "$tag" | wmiir create "/lbar/$tag"
else
echo "$WMII_NORMCOLORS" "$tag" | ixpc create "/lbar/$tag"
echo "$WMII_NORMCOLORS" "$tag" | wmiir create "/lbar/$tag"
fi
done
# EVENT LOOP
ixpc read /event 2>/dev/null |
wmiir read /event 2>/dev/null |
while read event
do
set -f
@ -152,10 +152,10 @@ do
exit
fi;;
CreateTag)
echo "$WMII_NORMCOLORS" "$parms" | ixpc create "/lbar/$parms"
echo "$WMII_NORMCOLORS" "$parms" | wmiir create "/lbar/$parms"
;;
DestroyTag)
ixpc remove "/lbar/$parms"
wmiir remove "/lbar/$parms"
;;
FocusTag)
xwrite "/lbar/$parms" "$WMII_SELCOLORS" "$parms"
@ -209,7 +209,7 @@ do
$MODKEY-Shift-c)
xwrite /client/sel/ctl kill;;
$MODKEY-Shift-t)
tagsmenu "/client/`ixpc read /client/sel/ctl`/tags" &;;
tagsmenu "/client/`wmiir read /client/sel/ctl`/tags" &;;
$MODKEY-Shift-[0-9])
xwrite /client/sel/tags "`echo $1 | sed 's/.*-//'`";;
esac;;

4
wmii
View File

@ -3,8 +3,8 @@
WMII_CONFPATH="$HOME/.wmii-VERSION:CONFPREFIX/wmii-VERSION" export WMII_CONFPATH
WMII_NS_DIR="/tmp/ns.$USER.${DISPLAY%.0}" export WMII_NS_DIR
IXP_ADDRESS="unix!$WMII_NS_DIR/wmii" export IXP_ADDRESS
WMII_ADDRESS="unix!$WMII_NS_DIR/wmii" export WMII_ADDRESS
mkdir -m 700 "$WMII_NS_DIR" 2>/dev/null
mkdir $HOME/.wmii-VERSION 2>/dev/null && CONFPREFIX/wmii-VERSION/welcome &
exec wmiiwm -a $IXP_ADDRESS -r `PATH="$WMII_CONFPATH:$PATH" which wmiirc`
exec wmiiwm -a $WMII_ADDRESS -r `PATH="$WMII_CONFPATH:$PATH" which wmiirc`

2
wmiir Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
IXP_ADDRESS="$WMII_ADDRESS" ixpc $@

51
wmiir.1 Normal file
View File

@ -0,0 +1,51 @@
.TH WMIIR 1 wmii-VERSION
.SH NAME
wmiir \- wrapper script for ixpc
.SH SYNOPSIS
.B wmiir
.RB [ \-a
.IR address ]
.I action
.I file
.br
.B wmiir
.B \-v
.SH DESCRIPTION
.SS Overview
.B wmiir
is a wrapper script for
.BR ixpc (1)
to conveniently access the filesystem of
.BR wmiiwm (1)
from the command line or from shell
scripts. It can be used to configure
.BR wmii (1).
.SS Options
See the manual page of
.BR ixpc (1) .
.SH ENVIRONMENT
.TP
WMII_ADDRESS
The address of the wmiiwm file server to which wmiir will connect.
.SH EXAMPLES
.TP
.B wmiir read /
This prints the root directory of the wmii filesystem. For more information
about the contents of this filesystem, see
.BR wmiiwm (1).
.TP
.B echo -n quit | wmiir write /ctl
Write 'quit' to the main control file of the wmii filesystem, effectively
leaving wmii.
.TP
.B echo -n view 2 | wmiir write /ctl
Bring into view all clients tagged '2'. To learn about clients and
tags, see
.BR wmii (1).
.SH SEE ALSO
.BR wmii (1),
.BR ixpc (1),
.BR wmiiwm (1)
http://www.cs.bell-labs.com/sys/man/5/INDEX.html