Comments (7)
I see... well the commit that is causing this issue for you was put in place to solve a similar issue for someone else (myself included) because either pulse people or alsa people switched conventions at some unknown version. Honestly, we don't know of an automatic way to tell what the correct $MIXER and $SCONTROL values are because it apparently depends on a huge number of variables, including version of pulse, version of alsa, and even what distro you are using. :(
For now, see the new commit and use the -m
and -s
options.
from i3blocks-contrib.
Interesting behavior... could post the output of the blocklet when you run it from the command line please?
#regular
./volume-pulseaudio
#scroll up and down
BLOCK_BUTTON=4 ./volume-pulseaudio
BLOCK_BUTTON=5 ./volume-pulseaudio
#toggle mute twice
BLOCK_BUTTON=2 ./volume-pulseaudio
BLOCK_BUTTON=2 ./volume-pulseaudio
Hopefully there are some helpful errors.
from i3blocks-contrib.
As a side note, if the issue is what I think it is (script wrongly things your mixer is "default" instead of "pulse"), you can temporarily fix this by editing the script and hard coding
MIXER=pulse
SCONTROL=Master
CAPABILITY=""
from i3blocks-contrib.
Here's the output:
~/.local/bin/i3blocks/volume-pulseaudio on master
$ ./volume-pulseaudio
29% [0:analog-stereo]
29% [0]
#ffffff
~/.local/bin/i3blocks/volume-pulseaudio on master
$ BLOCK_BUTTON=4 ./volume-pulseaudio
33% [0:analog-stereo]
33% [0]
#ffffff
~/.local/bin/i3blocks/volume-pulseaudio on master
$ BLOCK_BUTTON=5 ./volume-pulseaudio
29% [0:analog-stereo]
29% [0]
#ffffff
~/.local/bin/i3blocks/volume-pulseaudio on master
$ BLOCK_BUTTON=2 ./volume-pulseaudio
29% [0:analog-stereo]
29% [0]
#a0a0a0
~/.local/bin/i3blocks/volume-pulseaudio on master
$ BLOCK_BUTTON=2 ./volume-pulseaudio
29% [0:analog-stereo]
29% [0]
#a0a0a0
from i3blocks-contrib.
Could you investigate the behavior of
amixer -D $MIXER sset $SCONTROL 5%+
and
amixer -D $MIXER sset $SCONTROL toggle
on your computer, trying different values for $MIXER and $SCONTROL? $MIXER is usually default or pulse, and $SCONTROL is usually Master, pulse, or Pulse.
from i3blocks-contrib.
From your previous comment. Yeah, that's what I thought. That works if I edit the script like that. I just do not want to get into merge conflict if there is a new commit.
No, I didn't set the environment variable of $MIXER.
Also this is my amixer info:
$ amixer info
Card default 'SB'/'HDA ATI SB at 0x90440000 irq 16'
Mixer name : 'Realtek ALC270'
If you mean something like this:
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D default sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 66 [76%] [-15.75dB] [on]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D default sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 66 [76%] [-15.75dB] [off]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D default sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 66 [76%] [-15.75dB] [on]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D pulse sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 35808 [55%] [on]
Front Right: Playback 35808 [55%] [on]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D pulse sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 35808 [55%] [off]
Front Right: Playback 35808 [55%] [off]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D pulse sset Master toggle
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 35808 [55%] [on]
Front Right: Playback 35808 [55%] [on]
The output in workspace bar is 55%, but in default is 76%
from i3blocks-contrib.
So what I think after test both devices is when I scroll volume, I incresase both volumes of the device.
i3 config:
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q -D pulse sset Master 5%- unmute
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q -D pulse sset Master 5%+ unmute
bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle
i3blocks config:
[volume-pulseaudio]
command=~/.local/bin/i3blocks/volume-pulseaudio/volume-pulseaudio
interval=1
signal=10
This is before toggle mode, the output volume in a bar is 73% and volume is active:
$ amixer -D default sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 76 [87%] [-8.25dB] [on]
$ amixer -D pulse sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 47751 [73%] [on]
Front Right: Playback 47751 [73%] [on]
Then when I do a toggle mode with scroll's click, it just mute "pulse" and "default" volume:
$ amixer -D default sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 76 [87%] [-8.25dB] [off]
$ amixer -D pulse sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 47751 [73%] [off]
Front Right: Playback 47751 [73%] [off]
When I turned it back by clicking on the scroll again, nothing happened, and the bar still muted. But it is active again in "default" device:
$ amixer -D default sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 76 [87%] [-8.25dB] [on]
~/.local/bin/i3blocks/volume-pulseaudio on master
$ amixer -D pulse sget Master
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 47751 [73%] [off]
Front Right: Playback 47751 [73%] [off]
from i3blocks-contrib.
Related Issues (20)
- volume-pipewire is not able to forward default sink when clicked on HOT 1
- confusing formatting in rofi-calendar
- bandwidth2: missing dependency
- temperature block shows wrong temperature
- The cpu_usage2 blocklet isn't working HOT 1
- The blocklet battery-poly isn't working HOT 2
- only appears the clock with date
- key_layout doesn't work because it doesn't output a \n at the end HOT 1
- Root Makefile errors
- Using Font Awesome 6 instead of Font Awesome 5 for dunst
- apt-upgrades
- Issue with Icons in volume-pipewire
- The memory2 block uses incorrect math to calculate ram usage HOT 1
- volume-pulseaudio higher than 100%
- calendar: calendar display at wrong position for different i3 bar position HOT 2
- [bandwidth] tailscale showing as "down"
- [volume_pulse] grep warning
- [mediaplayer] no output if metadata invalid
- [mediaplayer][rfc] make MPRIS a hard dependency?
- The module `cpu_usage2` doesn't compile with clang/llvm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3blocks-contrib.