config.py:
Key([], "XF86AudioMute", lazy.spawn("bash", "-c", "pactl set-sink-mute 0
toggle && /home/Odd/.config/qtile/dunst_volume_monitor.sh")
Key([], "XF86AudioLowerVolume", lazy.spawn("bash", "-c", "pactl
set-sink-volume 0 -10% && /home/Odd/.config/qtile/dunst_volume_monitor.sh"),
Key([], "XF86AudioRaiseVolume", lazy.spawn("bash", "-c", "pactl
set-sink-volume 0 +10% && /home/Odd/.config/qtile/dunst_volume_monitor"),
i did as told above but noting worked, additionally qtile broke down in a
weird way like not opening terminal, not switching workspaces, not opening
applications:
i went to check out the log and this is the latest log:
2024-07-16 22:00:47,680 ERROR libqtile core.py:_xpoll():L359 Got an
exception in poll loop
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/core.py",
line 334, in _xpoll
self.handle_event(event)
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/core.py",
line 301, in handle_event
ret = target(event)
^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/window.py",
line 2216, in handle_PropertyNotify
self.update_name()
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/window.py",
line 590, in update_name
self.name = self.window.get_name()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/window.py",
line 167, in get_name
r = self.get_property("_NET_WM_VISIBLE_NAME", "UTF8_STRING")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/window.py",
line 382, in get_property
).reply()
^^^^^^^
File "/usr/lib/python3.12/site-packages/xcffib/__init__.py", line 330, in
reply
data = self.conn.wait_for_reply(self.sequence)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/xcffib/__init__.py", line 579, in
wrapper
return f(*args)
^^^^^^^^
File "/usr/lib/python3.12/site-packages/xcffib/__init__.py", line 673, in
wait_for_reply
raise XcffibException("Bad sequence number %d" % sequence)
xcffib.XcffibException: Bad sequence number 15680
2024-07-16 22:01:07,294 ERROR libqtile core.py:_xpoll():L359 Got an
exception in poll loop
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/core.py",
line 334, in _xpoll
self.handle_event(event)
File "/usr/lib/python3.12/site-packages/libqtile/backend/x11/core.py",
line 301, in handle_event
ret = target(event)
^^^^^^^^^^^^^
File
"/usr/lib/python3.12/site-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^>
On Tuesday, July 16, 2024 at 8:54:59 PM UTC+5:30 Tycho Andersen wrote:
> 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/9f66c73f-304a-4527-b95b-ab5649b274f0n%40googlegroups.com.