Closed p4p1 closed 4 years ago
You can already change the colors at runtime via X resources.
I think that specifying colors via X resources is better than specifying it via command-line options because you don't need to call xmenu with the same options all the time or create an alias, just put the colors at ~/.Xresources
and you're done: every xmenu
call will have the same colors scheme.
I separate appearance configuration from behavior configuration in my programs this way: appearance goes to ~/.Xresources
and behavior goes as command-line options during invocation.
I'm gonna see if setting colors at invocation is a feature that other users want. If it is, I'll merge the pull request, otherwise I'll keep with the X resources way.
dmenu argment parser for styling
I added a dmenu style argument parser to change the font, the color of background and foreground during selection and in normal mode. Edited the usage and man page accordingly. I also kept the same error messages as getopt and keeps the title logic at the end if needed.
Example
Usage