Shizcow / dmenu-rs

A pixel perfect port of dmenu, rewritten in Rust with extensive plugin support
GNU General Public License v3.0
200 stars 9 forks source link

missing -fn option #5

Closed 0x85C closed 4 years ago

0x85C commented 4 years ago

Hello, Small issue but dmenu-rs is not fully backwards compatible (1:1) with dmenu due to the following unsupported option "-fn"

dmenu-rs uses "--font" instead of "-fn" to control the menu font.

As a drop-in replacement for dmenu, this option has to be manually changed to get the same behavior as dmenu, but should really be the same.

Shizcow commented 4 years ago

I'm unsure the best way to fix this, and made a deliberate choice to use --font over -fn. Because this project uses clap to parse command line arguments, and clap does not support multi-character short arguments, this would be difficult to properly fix.

I'm inclined to simply call this project "nearly drop-in" due to this. I'll leave this issue open for a bit if anyone has extra ideas.

0x85C commented 4 years ago

I see.

I noticed "--(nb, nf, sb, sf)" changed from short to long options. Maybe this font option should be changed to "--fn" just for consistence sake, as they all are 2 char options like in the original dmenu, (even if these 5 options cannot be short).

https://linux.die.net/man/1/dmenu

Shizcow commented 4 years ago

This sounds like a good way forward. The only issue I have with it is that clap does not currently support visible_alias in YAML files. I've pushed out a temporary fix with an invisible alias so that --fn works.

The logical next step for this issue is to see about getting clap up do date. I'll do some investigating on it shortly.

Shizcow commented 4 years ago

I've hacked together support for visible_aliases. It doesn't go through clap, so there's no dependency issues. The functionality exists on branch develop now. Targeting for 5.2.3 release.