Ok its working now i used shell = True and it worked:
Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute 0 toggle && 
/home/Odd/.config/qtile/dunst_volume_monitor.sh", shell=True)), 

It was not working when i used this:
Key([], "XF86AudioMute", lazy.spawn("bash", "-c", "pactl set-sink-mute 0 
toggle && /home/Odd/.config/qtile/dunst_volume_monitor.sh")), 

Can you explain why ?
On Tuesday, July 16, 2024 at 11:43:55 PM UTC+5:30 Kai Stian Olstad wrote:

> On Tue, Jul 16, 2024 at 11:52:16AM -0600, Tycho Andersen wrote:
> >On Tue, Jul 16, 2024 at 07:39:53PM +0200, 'Kai Stian Olstad' via 
> qtile-dev wrote:
> >>
> >> My solution doesn't work, I have seen this someplace so I thought it 
> would
> >> work.
> >>
> >> But as Tycho said, it has shell=True so you can do this.
> >> Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute 0 toggle && 
> /home/Odd/.config/qtile/dunst_volume_monitor.sh", shell=True),
> >>
> >>
> >> > On Tuesday, July 16, 2024 at 8:54:59 PM UTC+5:30 Tycho Andersen wrote:
> >> >
> >> > > toggle && /home/Odd/.config/qtile/dunst_volume_monitor.sh")),
> >> > >
> >> > > There is `shell=True` though, which you can use to spawn a command
> >> > > inside a shell.
> >>
> >> Aha, thanks. It's not in the documentation unfortunately.
> >> But found a PR, https://github.com/qtile/qtile/pull/4709, that it also 
> support
> >> env :-)
> >
> >I see it in the docs: 
> https://docs.qtile.org/en/stable/manual/commands/api/root.html#libqtile.core.manager.Qtile.spawn
> >
> >but maybe we are generating them in multiple places? where did you
> >look?
>
> I search for lazy.spawn and the first link was this
> https://docs.qtile.org/en/stable/manual/config/lazy.html
>
> And your link did not show up because I searched for lazy.spawn and not 
> spawn.
> But searching for any spawn it's the first link in the list.
>
> -- 
> 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/71674ac4-fb1b-4fa6-9832-3a50dcd4199cn%40googlegroups.com.

Reply via email to