You are not logged in.

#1 2024-08-13 21:26:31

steve1701
Member
Registered: 2023-07-10
Posts: 2

Qtile: Syntax error when setting Key() for audio volume control

Hi gang,

I keep getting dinged for a syntax error (perhaps missing comma?) on this line, as follows (and I cannot figure this out!)

"python3 ~/.config/qtile/config.py File "home/steve/.config/qtile/config.py", line 199
Key([], "XF86AudioLowerVolume", lazy.spawn("a mixer sset Master 2db-"),
desc="Lower volume by 2db"),
Syntax error: invalid syntax. Perhaps you forgot a comma?"

If I comment out this line, my config loads properly.

Can someone point me in the right direction here?

Any helpful suggestions much appreciated!

Last edited by steve1701 (2024-08-13 22:22:42)

Offline

#2 2024-08-13 23:26:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Qtile: Syntax error when setting Key() for audio volume control

- Key([], "XF86AudioLowerVolume", lazy.spawn("a mixer sset Master 2db-"),
+ Key([], "XF86AudioLowerVolume", lazy.spawn("amixer sset Master 2db-")),

EDIT: I added the change based on V1del's comment which I completely overlooked.

Last edited by Trilby (2024-08-14 12:28:52)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-08-14 11:52:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,880

Re: Qtile: Syntax error when setting Key() for audio volume control

You probably also want to remove the space from amixer and if you're actually using pipewire/pulseaudio you might get more consistent and correct results with a "pactl set-sink-volume @DEFAULT_SINK@ -2dB" instead

Offline

#4 2024-08-15 18:41:37

steve1701
Member
Registered: 2023-07-10
Posts: 2

Re: Qtile: Syntax error when setting Key() for audio volume control

Hello Trilby, V1del,

Thanks so much, but, these lines give the same errors.

How might I start to troubleshoot this?

Last edited by steve1701 (2024-08-15 18:42:40)

Offline

#5 2024-08-15 18:48:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Qtile: Syntax error when setting Key() for audio volume control

It certainly cant give the exact same error.  Post the actual error output you are now getting.

EDIT: just in case, my code block had two lines in "diff" style with a "-" indicating a line that should be removed and a "+" indicating what should be there instead.  Neither the "-" or the "+" should actually be copied into the file.

Last edited by Trilby (2024-08-15 18:50:15)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB