Quoting sqweek <[EMAIL PROTECTED]>:
> On 10/8/07, Dewey Hylton <[EMAIL PROTECTED]> wrote:
> > i'm still trying to port my settings from 3.1; i have only two outstanding
> > issues. any help would be greatly appreciated; so far banging my head has
> only
> > broadened the bruise ...
> >
> > 1) WMII_TERM=x-terminal-emulator
> >
> > i *really want to change this ... what follows is what fails to work for me
> -
> > you should be able to decipher what i'm actually trying to achieve:
> >
> > WMII_TERM="xterm -bg black -fg white -ls -vb -sb -rightbar -s -sl 1000 -fn
> fixed
> > -fb fixed"
> >
> > i've tried different quoting methods (and none at all) to no avail. what
> > braindead thing am i doing wrong?
>
> I'm assuming based on what you have below that you're using rc.wmii,
> in which case your syntax is bogus. In rc, WMII_TERM="xterm -bg black
> ..." defines a list with a single element, $WMII_TERM expands to a
> single argument (rc wordsplits on list elements not whitespace).
> You want:
> WMII_TERM=(xterm -bg black -fg white -etc -etc)
>
> > 2) fn status { echo -n `{uptime | sed 's/.*://; s/,//g'} '|' `{date} }
> >
> > same idea as #1; if you spot the stupidity, please let me know how to
> correct it:
> >
> > fn status {
> > load=`uptime | sed 's/.*://; s/,//g'`
> > export=`df -h /export|awk 'END {print "Export: "$3"/"$1"/"$4}'`
> > root=`df -h /|awk 'END {print "Root: "$3"/"$1"/"$4}'`
> > status="`date` || `acpi` || $root || $export ||$load"
> > echo -n $status
> > }
> >
> > this particular item prevents wmii from starting correctly (well, it starts
> but
> > i have no hotkeys or anything else - no method of starting apps).
>
> Syntax again. Replace `foo` with `{foo}. Also, " doesn't quote in rc
> so you'll need to use something more like status=`{date}' || '`{acpi}'
> || '$root. HTH.
> -sqweek
the first one seems to have worked like a champ, but the second one is still
problematic. obviously, i didn't understand the rc.wmii syntax initially and
apparently still don't.
here's my last attempt (trying to follow the great info from sqweek):
fn status {
load=`{uptime | sed 's/.*://; s/,//g'}
export=`{df -h /export|awk 'END {print "Export: "$3"/"$1"/"$4}'}
root=`{df -h /|awk 'END {print "Root: "$3"/"$1"/"$4}'}
status=`{date}' || '`{acpi}' || '$root || '$export || '$load
echo -n $status
}
this doesn't work either. i've gotten around the problem by just writing a shell
script which does this and calling the script from the status function. this of
course works, but i'd like to understand what i'm doing wrong in the rc.wmii
config.