Re: [dev] [surf] URI handling, with patch

From: Gene Auyeung <quaker4lyf_AT_gmail.com>
Date: Wed, 18 Aug 2010 09:08:53 -0700

I've been using a patched version of dmenu since I started using surf.
 It sort of emulates firefox's address bar, (but I haven't been using
firefox in a while so I'm not too sure..):

1) The Tab key acts as the Down key and Shift+Tab acts as Up.
2) Before Tab/Down/Shift+Tab/Up keys are pressed, no item is selected,
regardless of if any items are matched or not.
3) Selecting an item doesn't cause dmenu to match, editing the char
*text buffer does.
4) Selecting an item, though, fills the text buffer with the selected item.
5) When Return is pressed, whatever is in the text buffer will be outputted.

So if I just want to input something, I'll type it and hit Return.
If I want to input something similar to what dmenu matched, I'll type
it, complete it by pressing Down or Tab, then backspace or Ctrl+w to
edit, then I hit Return.
Obviously if I want to input something that dmenu matched, I'll type
enough so that the item is just a couple Tabs away, select it then hit
Return.

Attached is the patch that's really ugly, it was nicer before but
dmenu tip's been going through some changes (thanks to cls) and I just
wanted to make my patch work for now. If anyone's interested I can
maintain one on the wiki.

-Gene

On Wed, Aug 18, 2010 at 4:56 AM, anonymous <ya6iod1e_AT_lavabit.com> wrote:
> On Tue, Aug 17, 2010 at 06:52:40PM -0400, Ryan Mullen wrote:
>> Second, dmenu's "suggested" integration with surf is a bit dodgy. If,
>> for example, a user is viewing surf.suckless.org and they wish to
>> navigate to suckless.org, they would be required to strike
>> shift+return in order to actually visit suckless.org. If the shift key
>> is not used, the current page will simply refresh. The reason for the
>> refresh is because dmenu matches the input text against the selected
>> text, and if it is a substring of the selected text, it will just
>> output the selected text when return has been struck, which means the
>> page simply refreshes because the new URI is the same as the current
>> one.
>
>> As far as I know, the dmenu problem is a feature for one set of users
>> and an issue for another set. I wouldn't know how to please everyone
>> on this. Feedback appreciated.
>
> Maybe just make return act like shift-return and remove shift-return?
> So dmenu will act like shell with tab-completion.
>
>
>

Received on Wed Aug 18 2010 - 18:08:53 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 18 2010 - 18:12:02 CEST