This patch makes the program run in Debian and other systems. In them, pgrep has a limit of 15 characters, so the
"slimbookbatterypreferences" string is too long for it. This patch uses the -f parameter to fix this.
It also adds some extra fixes, like using /usr/bin/env in the shebang, and launching the childs with "subprocess.run", which removes the shell (this is also needed to make pgrep work, because with the -f parameter, it searches in all the command line, and since os.system() launches the process inside a shell, there would be at least two processes with that).
This patch makes the program run in Debian and other systems. In them, pgrep has a limit of 15 characters, so the "slimbookbatterypreferences" string is too long for it. This patch uses the -f parameter to fix this.
It also adds some extra fixes, like using /usr/bin/env in the shebang, and launching the childs with "subprocess.run", which removes the shell (this is also needed to make pgrep work, because with the -f parameter, it searches in all the command line, and since os.system() launches the process inside a shell, there would be at least two processes with that).
Fix https://github.com/Slimbook-Team/slimbookbattery/issues/96