mirror of
https://github.com/0intro/wmii
synced 2024-12-12 14:47:26 +03:00
42 lines
1.0 KiB
Bash
42 lines
1.0 KiB
Bash
#!9PREFIX/bin/rc
|
|
# window manager improved 2 wrapper
|
|
|
|
if(! ~ $#* 0) {
|
|
exec wmiiwm $*
|
|
}
|
|
|
|
if(! wmiiwm -c) {
|
|
exit 1 # wmiiwm is already running or $DISPLAY is unset
|
|
}
|
|
|
|
WMII_CONFDIR=CONFPREFIX/wmii-3
|
|
OLD_PATH=$PATH
|
|
PATH=$HOME/.wmii-3:$WMII_CONFDIR:9PREFIX/bin:$PATH
|
|
WMII_IDENT=`{date -n}^'-'^$pid
|
|
WMIIR_SOCKET=/tmp/.ixp-$USER/wmiifs-$WMII_IDENT
|
|
|
|
# start window manager and utilities:
|
|
mkdir -p /tmp/.ixp-$USER
|
|
wmiiwm -s /tmp/.ixp-$USER/wmiiwm-$WMII_IDENT &
|
|
wmiiwmpid=$apid
|
|
wmiifs -s /tmp/.ixp-$USER/wmiifs-$WMII_IDENT &
|
|
wmiikeys -s /tmp/.ixp-$USER/wmiikeys-$WMII_IDENT &
|
|
wmiimenu -s /tmp/.ixp-$USER/wmiimenu-$WMII_IDENT &
|
|
sleep 1
|
|
|
|
# mount ixp file systems:
|
|
wmiir write /ctl 'bind /wm /tmp/.ixp-'^$USER/wmiiwm-$WMII_IDENT
|
|
wmiir write /ctl 'bind /menu /tmp/.ixp-'^$USER/wmiimenu-$WMII_IDENT
|
|
wmiir write /ctl 'bind /keys /tmp/.ixp-'^$USER/wmiikeys-$WMII_IDENT
|
|
|
|
# display the wmii introduction if necessary:
|
|
if(mkdir $HOME/.wmii-3 >[2]/dev/null) {
|
|
welcome &
|
|
}
|
|
|
|
# run configuration:
|
|
wmiirc &
|
|
|
|
# wait for wmiiwm's termination:
|
|
wait $wmiiwmpid
|