Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSAWidget bar not visible #33

Closed
ACosmicWolf opened this issue Jan 13, 2022 · 14 comments · Fixed by #34
Closed

ALSAWidget bar not visible #33

ACosmicWolf opened this issue Jan 13, 2022 · 14 comments · Fixed by #34

Comments

@ACosmicWolf
Copy link

image

ALSAWidget config

widget.ALSAWidget(
  mode="both",
  theme_path="/usr/share/icons/Paper/24x24/panel",
  background=colors[14],
),


@elParaguayo
Copy link
Owner

elParaguayo commented Jan 13, 2022

Sorry. It's not clear what I'm meant to be looking at here.

When the mode is "both" you get the icon on your bar all of the time (I assume that volume icon is from this widget) and, when you change the volume, you'll see the bar.

Is that not what you're seeing or what you want?

Also, how have you imported qtile-extras into your config?

@elParaguayo
Copy link
Owner

Also, I should add, that bar looks really nice!

@ACosmicWolf
Copy link
Author

ACosmicWolf commented Jan 13, 2022

I am not able to see the bar when i change the volume and yes that icon is from the widget.
i have imported qtile extras like from qtile_extras import widget

@ACosmicWolf
Copy link
Author

Also, I should add, that bar looks really nice!

Thanks :)

@elParaguayo
Copy link
Owner

OK. Anything in your log?

What happens when you run amixer get Master from a terminal?

@ACosmicWolf
Copy link
Author

Nothing in the log.

Output of amixer get Master

~ ❯ amixer get Master                                                             5m 16s
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 59 [68%] [-21.00dB] [on]

@elParaguayo
Copy link
Owner

ok. Try this:

qtile cmd-obj -o widget alsawidget -f eval -a self.volume

@ACosmicWolf
Copy link
Author

The bar still doesnt appear :(

Output of the command.

(True, '-1')

@elParaguayo
Copy link
Owner

Thanks - this is just showing what the widget thinks is the current volume.

The issue is the regular expression is not matching anything with that output. I'll need to submit a fix.

@elParaguayo
Copy link
Owner

If you do qtile cmd-obj -o widget alsawidget -f eval -a "self.status_change(50,False)" you should hopefully see the bar - (it's not a fix though).

@ACosmicWolf
Copy link
Author

If you do qtile cmd-obj -o widget alsawidget -f eval -a "self.status_change(50,False)" you should hopefully see the bar - (it's not a fix though).

Thanks it works.

elParaguayo added a commit that referenced this issue Jan 13, 2022
Where amixer includes decibel levels in the output, the current
regex will fail and so no volume will be recognised.

This PR fixes that by making the regex less strict.

Fixes #33
@ACosmicWolf
Copy link
Author

Oh sorry forgot it wasnt a fix.
I will try to solve it if I can.

@ACosmicWolf ACosmicWolf reopened this Jan 13, 2022
elParaguayo added a commit that referenced this issue Jan 13, 2022
Where amixer includes decibel levels in the output, the current
regex will fail and so no volume will be recognised.

This PR fixes that by making the regex less strict.

Fixes #33
@elParaguayo
Copy link
Owner

I've submitted a fix. If the tests pass then I'll merge this.

@ACosmicWolf
Copy link
Author

oh ok.
Thank You Very Much.

elParaguayo added a commit that referenced this issue Jan 13, 2022
Where amixer includes decibel levels in the output, the current
regex will fail and so no volume will be recognised.

This PR fixes that by making the regex less strict.

Fixes #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants