nyyManni / dmenu-wayland

dmenu for wayland-compositors
MIT License
197 stars 22 forks source link

'deobfuscate' a bit and move the argument parsing into a seperate fun… #21

Open DRG-developer opened 3 years ago

DRG-developer commented 3 years ago

…ction, fix indenting in main and usage function, fix usage function, add help function

in the main and usage function a mixture of tabs and spaces is used. I made it all tabs, as per suckless coding style and common sense. I also moved all the command line argument parsing into a seperate function, as it's quite a big chunk of code. also made the variable assignments multiple lines and used braces for the if else ladder, as per kernel and suckless coding style. renamed the show_in_bottom bool to bar_at_bottom; I also added a --help argument for when you want to see help, in which case the usage function will not return failure but exit success. also made the nostdint bool a use_stdin bool, so the if function doesn't need to be so vague.

in my personal code base i also sorted all functions alphabetically, added static to all static functions, and all braces at a function moved to a new line, if you want that too, please tell me and i'll open a new PR for that.