firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
783 stars 74 forks source link

Use basename of `command[0]` when extending the args in dmenu_cmd() #119

Closed Yuhf7 closed 1 year ago

Yuhf7 commented 1 year ago

Setting dmenu_command in the config file to something other than the base name for the supported executables (dmenu, rofi, etc...), such as /home/me/.local/bin/dmenu, will not show a prompt message, nor will the password obscuring feature work properly, because the string command[0] will not be a valid key for the commands/pass_prompts dictionaries.

This PR attempts to solve the issue by using the os.path.basename() function to retrieve the basename of command[0].

firecat53 commented 1 year ago

Thanks for the help!