abenz1267 / walker

Application launcher similar to Rofi etc. . Wayland native.
MIT License
287 stars 14 forks source link

dmenu option for specifying active row #115

Closed CIAvash closed 2 weeks ago

CIAvash commented 3 weeks ago

Is your feature request related to a problem? Please describe. When using the dmenu mode, sometimes it's useful to highlight an active item(for example selecting an audio sink) like in Rofi.

Describe the solution you'd like A command line option/flag for dmenu for specifying the active row/item. (maybe --active/-a)

And for highlighting the active item, it should be possible to style it; with a default style set in the provided themes.

Additional context Description of the active option in Rofi:

-a X

Active row, mark X as active. Where X is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:

A single row: '5'
A range of (last 3) rows: '-3:'
4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
A set of rows: '2,0,-9'
Or any combination: '5,-3:,7:11,2,0,-9'

Have you checked the wiki? Yes

abenz1267 commented 2 weeks ago

Added. --active, -a. Index is not 0 based for normal humans. 0 = last item.

CIAvash commented 2 weeks ago

Thanks. I tried it and it works fine, but it seems if the active flag is not provided, the first item becomes active.

abenz1267 commented 2 weeks ago

Ah... yeah, I know why. Will fix.

abenz1267 commented 2 weeks ago

should be fixed.