BurntSushi / wingo

A fully-featured window manager written in Go.
Do What The F*ck You Want To Public License
1k stars 90 forks source link

add menus #36

Open BurntSushi opened 12 years ago

BurntSushi commented 12 years ago

I have to think carefully about how I want to do this.

It would be great if I could somehow interoperate menus with the command system in a way that the "output" of a command could be the input of a menu.

The real problem here is that a menu can't just take a list of anything; it has to be a list of items that each have its own contextual action.

In other words, the input of a menu should be a list of pairs, where each pair is a command to execute and a display string.

Also, do we want to bother with sub-menus? They would make the implementation more difficult, but they'd be useful to folks who want to build a menu to launch apps. (I think the proper route here is to build a menu system with sub-menus in mind, but to leave the implementation for another day.)

Antovigo commented 11 years ago

I totally agree, menus are what I found lacking when I tried wingo, coming from Openbox. One thing that I especially value is the ability to select an entry by simply typing the first letter. This way, I can quickly access any program with my keyboard, without having to memorize a lot of keyboard shortcuts. The « path » that leads to an application is just the same whether you use the mouse or the keyboard, in a very intuitive way. About submenus, wouldn't it be easy to just use a « showmenu » command that displays the submenu?