Hello,

Have you tried to put your command in an executable script that mimic the output of amixer?

Something like :

   /#!/bin/bash/

   /my_volume=$(pactl list sinks | grep "Description: WH-1000XM3" -A 6
   | grep % | cut -d " " -f 6)/

   /echo "["$my_volume"%]"/

   /exit 0/

I don't know the output of pactl, so it's just a guess that you only get a number with your command.

Then you just have to replace your command by the script in the get_volume_command assignment of the widget :

   /get_volume_command = '/path/to/your_script.bash'/


Le 11/05/2021 à 10:15, Seph IZ a écrit :
Hi,

I'm using a bluetooth headset and try to get the volume with Volume widget.
amixer seems not compatible with bluetooth headset.

Therefore I'm trying to get the volume with pactl piped to different commands :

pactl list sinks | grep "Description: WH-1000XM3" -A 6 | grep % | cut -d " " -f 6

This command run in the terminal will success to get the volume of my headset.
I try then to use this command in the widget :


widget.Volume(
 foreground = colors[9],
background = colors[0],
padding = 5,
get_volume_command = 'pactl list sinks | grep "Description: WH-1000XM3" -A 6 | grep % | cut -d " " -f 6'
),

Unfortunately it doesn't works.
Do you have a solution to get the volume of my bluetooth headset ?
--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/qtile-dev/6c176ccd-951e-4958-9158-f66d6a881707n%40googlegroups.com <https://groups.google.com/d/msgid/qtile-dev/6c176ccd-951e-4958-9158-f66d6a881707n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/c91892a5-d040-797d-9f92-e105c2be84c4%40gmail.com.

Reply via email to