On Sun, Jul 12, 2009 at 7:18 PM, masterLoki<[email protected]> wrote:
> I've just applied the patch, and I saw the changes in the code. As for now
> I'm using EMACS (with viper mode) to do my coding, but I'll keep in mind the
> style in the bottom of init.lua.
> I'll be asking on how to read and log the output awesome provides.

 - Why bother with EMACS if you're going to use Viper? Just use Vim.
 - EMACS can understand Vim-style "modelines" -- the line at the
bottom of the init.lua. It can use these settings automatically. Vim
of course also does so.
 - Basically, you want to start awesome as awesome &>
/home/you/awesome.log. &> captures all output from awesome and
redirects it to a file. You can then use tail -f to watch this file
constantly and see what the errors in your code are. I use this
extensively. Also, if you're in a TTY because awesome/X crashed, you
can use:
echo "awesome.restart()" | DISPLAY=:0 awesome-client
To restart it. Combine these things for proper debugging: watch the
log, implement fixes to errors, and restart awesome until it stops
having errors.

>>
>>  logic errors, comparisons between strings and ints, and
>> a terrible style with 3 space indents, 4 space indents, and tabs. I
>> understand it's rough work... but I changed/rewrote nearly every line
>> in your code to make it run.
>>
>
> I'm new in lua, but I thinks I'll be needing to read more on it if I want
> really help. Sorry if it consumed your time in a way you didn't want to
> spend it

I'm glad for your attitude and I think I've judged you correctly.
You've had initiative to help on the wiki and in the source. We had a
laugh about some of your mistakes, but it's not really code skill that
I value first and foremost -- its willingness to learn and desire to
work. With a desire to help/learn, lack of skill can be overcome, but
skill without desire is a waste. Keep it up.

> I see the crashing coming that's why I asked how to ask for a parameter when
> initializing  the widget  (i.e. 'obvious.temp_zone("TSZ0")' or
> 'obvious.temp_zone("/path/to/my/thermal/zone")'

You can do this by modifying your metatable setup -- but I don't
recommend it. So far, in Obvious, what we've done in this situation
is:
 a) In the case that the default settings don't work, output an error
message but don't crash Awesome (check if the file exists before
trying to use it. See awful.util for some tools to help with this.)
 b) Provide functions like obvious.temp_info.set_zone("TSZO") that the
user can use rather than making them add it as
obvious.temp_info("TSZO") -- there is no real difference, but it's
just the custom so far.

>> Oh, also! I've pushed up your patch + my fixes to the obvious repo,
>> temperature-widget branch. This isn't in master yet because it needs a
>> lot more work. Also see attached.
>>
>
> Thanks for push!! I've really appreciate it! I guess there's some more work
> to do. And I'll be doing it this week.

Yep, no problems. The idea is that stuff that's not ready for prime
time, but is worthy of testing/exposure goes into a branch in git.
When it's cleaned up and ready to be used by all, we merge it into the
"master" branch. Awesome does something similar.

Cheers, and keep it up.

-Andrei "Garoth" Thorp

--
To unsubscribe, send mail to [email protected].

Reply via email to