nwg-piotr / nwg-drawer

Application drawer for wlroots-based Wayland compositors
MIT License
233 stars 25 forks source link

Change command execution logic and use `/usr/bin/env` command #103

Closed gouvinb closed 9 months ago

gouvinb commented 9 months ago

Description

@apognu told me in mp that the approach used was perhaps too complex for nwg-drawer's needs and advised me to use the env command.

According to him, nwg-drawer should never try to parse a command line to separate the envvars, from the command, from the arguments, it's actually super complicated (yes indeed :smile:). env is on all UNIX, this command allows you to launch a command with an environment and arguments, and it takes care of the parsing as it should.

So in the case of nwg-drawer, instead of doing your own parsing, you could simply run :

So I've simplified everything, taking his advice into account, and my tests are correct.

gouvinb commented 9 months ago

I'm currently testing on my machine, and if I find any problems, I'll report them here.

nwg-piotr commented 9 months ago

I'm currently testing on my machine, and if I find any problems, I'll report them here.

So am I.