On Tue, Jul 16, 2024 at 04:35:16PM +0200, 'Kai Stian Olstad' via qtile-dev
wrote:
> On Tue, Jul 16, 2024 at 07:19:02AM -0700, Piyush Chaudhary wrote:
> > I am trying to get notifications when i increase my volume, so i created a
> > bash script and binded it together to the same key which i use to increase
> > my volume but when i restart qtile and press the key, nothing happens. The
> > notification doesn't show up and the volume does not increase or decrease.
> >
> > config.py:
> > Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute 0 toggle &&
> > /home/Odd/.config/qtile/dunst_volume_monitor.
> > Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume 0 -10% &&
> > /home/Odd/.config/qtile/dunst_volume_monitor.
> > Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume 0 +10% &&
> > /home/Odd/.config/qtile/dunst_volume_monitor.sh")),
> >
> > I tried running the script manually through the command line to see if
> > there was any issue, and it worked gracefully.
>
> spawn is not a shell, so you can't use && in there.
> But you can use a shell like this
>
> Key([], "XF86AudioMute", lazy.spawn("bash", "-c", "pactl set-sink-mute 0
> 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.
Tycho
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qtile-dev/ZpaQxQa%2BTHZiZWRC%40tycho.pizza.