Re: [wmii] wmii9menu sorting

2009-04-19 Thread Alex Kilgore

Kris Maglione wrote:

On Sun, Apr 19, 2009 at 08:11:37PM -0400, Alex Kilgore wrote:

I think I should probably reword my somewhat vague question, sorry!
When I right-click the titlebar of a client, "Fullscreen" comes 
before  "Delete" in the menu, and I was trying to reverse that,
(as a side note, if i change the Menu Client-3-Delete to Menu  
Client-3-Close, "Close" comes before "Fullscreen" for whatever reason).
I can do this when I call wmii9menu on my own by reversing the args, 
but  I cannot seem to do it with wmiirc / wi_fnmenu()

I hope this clarifies what I was trying to ask.


Ah, apparently I can't read numbers. Well, in the case of wmiirc, the 
order is actually at the mercy of awk's hashing algorithm.



Oh, okay, I see.
Well, at any rate, Close instead of Delete reverses the options for me, 
which is what I was going for, so that is fine,


Also, while experimenting with wmii9menu, I noticed the -i option, which 
apparently controls which one is selected when the menu pops up, And I 
remember at one point, the way wi_fnmenu did it was that when you ran 
the menu once and selected a certain option, that the same option would 
be selected next time you opened the menu, i believe. It is not behaving 
the same way for me anymore, is that intended?, I could be wrong about 
how this worked, but I was reminded when i saw that wmii9menu was called 
with the -i option in wmii.sh

Alex



Re: [wmii] wmii9menu sorting

2009-04-19 Thread Kris Maglione

On Sun, Apr 19, 2009 at 08:11:37PM -0400, Alex Kilgore wrote:

I think I should probably reword my somewhat vague question, sorry!
When I right-click the titlebar of a client, "Fullscreen" comes before  
"Delete" in the menu, and I was trying to reverse that,
(as a side note, if i change the Menu Client-3-Delete to Menu  
Client-3-Close, "Close" comes before "Fullscreen" for whatever reason).
I can do this when I call wmii9menu on my own by reversing the args, but  
I cannot seem to do it with wmiirc / wi_fnmenu()

I hope this clarifies what I was trying to ask.


Ah, apparently I can't read numbers. Well, in the case of 
wmiirc, the order is actually at the mercy of awk's hashing 
algorithm.


--
Kris Maglione

We all agree on the necessity of compromise.  We just can't agree on
when it's necessary to compromise.
--Larry Wall




Re: [wmii] wmii9menu sorting

2009-04-19 Thread Alex Kilgore

Kris Maglione wrote:
Well, to begin with, they're not sorted. After that, they're grouped by 
how they match your filter. Exact matches appear in the first group, 
then matches that match at the begining of the string, then matches that 
appear anywhere else in the string.



Thank you kris, for your quick reply!
I think I should probably reword my somewhat vague question, sorry!
When I right-click the titlebar of a client, "Fullscreen" comes before 
"Delete" in the menu, and I was trying to reverse that,
(as a side note, if i change the Menu Client-3-Delete to Menu 
Client-3-Close, "Close" comes before "Fullscreen" for whatever reason).
I can do this when I call wmii9menu on my own by reversing the args, but 
I cannot seem to do it with wmiirc / wi_fnmenu()

I hope this clarifies what I was trying to ask.
Alex Kilgore




Re: [wmii] wmii9menu sorting

2009-04-19 Thread Kris Maglione

On Sun, Apr 19, 2009 at 01:16:07PM -0400, Alex Kilgore wrote:

I recently I was trying to change the order of the wmii9menu entries, I
was wondering how they are sorted. I had a few guesses, but niether of
them seem to be right based on my tests. any ideas?


Well, to begin with, they're not sorted. After that, they're 
grouped by how they match your filter. Exact matches appear in 
the first group, then matches that match at the begining of the 
string, then matches that appear anywhere else in the string.


--
Kris Maglione

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
--Brian W. Kernighan




[wmii] wmii9menu sorting

2009-04-19 Thread Alex Kilgore

Hello all,
I recently I was trying to change the order of the wmii9menu entries, I
was wondering how they are sorted. I had a few guesses, but niether of
them seem to be right based on my tests. any ideas?
Alex