Tomas-M / xlunch

Graphical app launcher for X with minimal dependencies
http://xlunch.org
GNU General Public License v3.0
219 stars 37 forks source link

Feature request: support for adding "empty" launchers in the entries #78

Open neuromancer opened 6 years ago

neuromancer commented 6 years ago

I'm using a simple hack to display an empty entry:

<200b>;;true

where the <200b> is a zero-width space. This trick allows me to easily customize how entries are presented and grouped in every screen. It will be nice to have a proper support for this special case.

PMunch commented 6 years ago

Hmm, it's a bit strange that it doesn't work with a regular space. What would you consider proper support? Just a line starting with ; to be parsed as an empty entry? Or something more functional like not being able to highlight or click entries without a name?

neuromancer commented 6 years ago

Using this trick you can hightlight and click entries without name. It is quite useful if you include a menu with launchers to shutdown or restart since we don't want the user to click in the wrong one. Also, it will be nice to have a special item to force to display an entry in the next screen.

PMunch commented 6 years ago

I'm not sure if I understand completely what you want. If I've got it correctly you want to have separator entries to create some space between certain other entries. To force something onto the next screen you can set the parameter for how many entries you want to see in a screen, anything else would probably be really confusing (and how would it work with scrolling?)

neuromancer commented 6 years ago

A little of context: I'm doing a game laucher using xlunch and I'm grouping different games or emulators in differents screens. First screen is this one:

screen

And in the next one:

games

I'm using the 5 colums and 1 row of icons. So every screen contains different groups of icons. To be able to skip until the next screen, I'm using the trick described in #78, but it will be nice to have a special item for that.

Tomas-M commented 6 years ago

@neuromancer you should probably use buttons functionality instead of this separator hack. That way you can specify exact positions of all entries and you won't have any dummy clickable areas which do nothing.

PMunch commented 6 years ago

Well using buttons you would need to specify the x and y position of all the entries, completely breaking the automatic positioning xlunch offers. They are mostly meant to position buttons along the edges or for statically sized special case GUIs. But I agree that having dummy entries isn't the best solution. @neuromancer how do you plan on changing between the "pages"? If you navigate by buttons you could simply use recur with a different entries file, but for scrolling that doesn't work. We could certainly add a "break" character that would force all following entries onto a new line, and I think that might be the best option. Maybe we could even support proper categories with a heading above each break.

neuromancer commented 6 years ago

Well using buttons you would need to specify the x and y position of all the entries, completely breaking the automatic positioning xlunch offers. They are mostly meant to position buttons along the edges or for statically sized special case GUIs.

Indeed. I want to avoid placing every single button.

@neuromancer how do you plan on changing between the "pages"? If you navigate by buttons you could simply use recur with a different entries file, but for scrolling that doesn't work.

I have all the entries in a single file. So I'm using my keyboard/joystick to move between the "lines". This causes the automatic change between the "pages".

We could certainly add a "break" character that would force all following entries onto a new line, and I think that might be the best option.

I agree.

Maybe we could even support proper categories with a heading above each break.

That could be nice as well!

PMunch commented 6 years ago

I've thought some more about this and I think it would be hard to implement because of how xlunch is implemented.. The problem is that xlunch simply assumes that each entry takes the same amount of space, and that there are no gaps. I'll have a look at implementing this, but don't keep your hopes too high..

Tomas-M commented 6 years ago

Maybe it would be sufficient to make xlunch ignore hovering of empty items? So user could add dummy entries, each occupying exactly one standard spot, but they would be practically invisible? Eg. if the cmd is empty, do not hover the item. Could this be sufficient?

PMunch commented 6 years ago

That would certainly help the original issue at least