Re: [wmii] Cycle views

2009-03-21 Thread Carlos Eduardo Moreira dos Santos
I tried to add these keys in /etc/wmii-3.5/wmiirc, but "wmiir read
/keys" is not showing them. Do I need to change somewhere else?

Thank you

On Thu, Mar 19, 2009 at 11:04 PM, Carlos Eduardo Moreira dos Santos
 wrote:
> On Thu, Mar 19, 2009 at 9:12 PM, Kris Maglione  wrote:
>> On Thu, Mar 19, 2009 at 08:04:14PM -0300, Carlos Eduardo Moreira dos Santos
>> wrote:
>>>
>>> and gave it perms 755. However, after running this action, the keys
>>> still do nothing. I also tried the action wmiirc without success. What
>>> else should I do?
>>
>> Hi,
>>
>> First, Action-overridekeys is deprecated, and unnecessary. Second,
>> rc.wmii.local is only run if you have plan9port or similar installed. You'll
>> need to run the sh version.
> Thanks for the quick answer. It would be nice to update the code
> snippets web page. If it were a wiki I would have helped you.
>
> What would be the sh version like? Now I know I have to take the code
> away from function Action-overridekeys and maybe add a #!/bin/bash at
> the beginning. But that's not enough. Should I change the code or the
> file location?
>>
>> --
>> Kris Maglione
>>
>> We shall do a much better programming job, provided we approach the
>> task with a full appreciation of its tremendous difficulty, provided
>> that we respect the intrinsic limitations of the human mind and
>> approach the task as very humble programmers.
>>        --Alan Turing
>>
>>
>>
>



Re: [wmii] Cycle views

2009-03-19 Thread Carlos Eduardo Moreira dos Santos
On Thu, Mar 19, 2009 at 9:12 PM, Kris Maglione  wrote:
> On Thu, Mar 19, 2009 at 08:04:14PM -0300, Carlos Eduardo Moreira dos Santos
> wrote:
>>
>> and gave it perms 755. However, after running this action, the keys
>> still do nothing. I also tried the action wmiirc without success. What
>> else should I do?
>
> Hi,
>
> First, Action-overridekeys is deprecated, and unnecessary. Second,
> rc.wmii.local is only run if you have plan9port or similar installed. You'll
> need to run the sh version.
Thanks for the quick answer. It would be nice to update the code
snippets web page. If it were a wiki I would have helped you.

What would be the sh version like? Now I know I have to take the code
away from function Action-overridekeys and maybe add a #!/bin/bash at
the beginning. But that's not enough. Should I change the code or the
file location?
>
> --
> Kris Maglione
>
> We shall do a much better programming job, provided we approach the
> task with a full appreciation of its tremendous difficulty, provided
> that we respect the intrinsic limitations of the human mind and
> approach the task as very humble programmers.
>        --Alan Turing
>
>
>



Re: [wmii] Cycle views

2009-03-19 Thread Kris Maglione

On Thu, Mar 19, 2009 at 08:04:14PM -0300, Carlos Eduardo Moreira dos Santos 
wrote:

and gave it perms 755. However, after running this action, the keys
still do nothing. I also tried the action wmiirc without success. What
else should I do?


Hi,

First, Action-overridekeys is deprecated, and unnecessary. 
Second, rc.wmii.local is only run if you have plan9port or 
similar installed. You'll need to run the sh version.


--
Kris Maglione

We shall do a much better programming job, provided we approach the
task with a full appreciation of its tremendous difficulty, provided
that we respect the intrinsic limitations of the human mind and
approach the task as very humble programmers.
--Alan Turing




[wmii] Cycle views

2009-03-19 Thread Carlos Eduardo Moreira dos Santos
Following http://wmii.suckless.org/scripts_n_snips/code_snippets I
created the file ~/.wmii-3.5/rc.wmii.local with the following:

MODKEY=Mod1
fn Action-overridekeys {
fn next_tag {
awk -v curtag'='`{wmiir read /tag/sel/ctl | sed 1q} '
NR==1 {first = $0}
$0==curtag { if(getline) print $0; else print first; exit }'
}
fn Key-$MODKEY-n {
wmiir xwrite /ctl view `{ read_tags | next_tag}
}
fn Key-$MODKEY-b {
wmiir xwrite /ctl view `{ read_tags | tail -r | next_tag}
}
}

and gave it perms 755. However, after running this action, the keys
still do nothing. I also tried the action wmiirc without success. What
else should I do?

Thank you