On Tue, Jul 16, 2024 at 12:00:35PM -0700, Piyush Chaudhary wrote:
what do these parameters indicate here like "bash", "-c" ? Key([], "XF86AudioMute", lazy.spawn(["bash", "-c", "pactl set-sink-mute 0 toggle && /home/Odd/.config/qtile/dunst_volume_monitor.sh"])),
bash is a shell and -c is a option to bash to run commands inside the bash shell. I recommend reading "man bash" and check out the option "-c" if you want to know more.
and how the above function call is different from the this one: Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute 0 toggle && /home/Odd/.config/qtile/dunst_volume_monitor.sh", shell=True)),
When you use shell=True Qtile add the "bash -c" for you. (to be technically correct "shell=True" uses "sh -c" and not "bash -c", but for you in this case the result is the same)
is the spawn function overloaded.
I wouldn't say that, but Linux have many ways to do the same thing. So which of them you use is up to you, both work and in the end they do the same thing. -- Kai Stian -- You received this message because you are subscribed to the Google Groups "qtile-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to qtile-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/crzxq63hqdql4fgsf3cydalbwjify674ov3gohs46oapkcffnl%40qknglrgstqdl.