Closed Infinemen closed 3 years ago
FYI the volume block is only updated on events related to sound change, like on changing volume, muting/unmuting, plugging/unplugging headphones, etc. This is achieved through the provided pulse_daemon.sh which listens for those events and notifies dwmblocks to update when there is an event.
The problem with your approach will be that suppose the volume is changed by some means other than your keybindings, say be running pactl on the terminal or when plugging/unplugging headphones. Then the volume block will not show the changes.
Anyway you can achieve what you want by adding a keybinding in dwm which is bound to a shell command which changes the volume and at the same time signals dwmblocks.
By the way pulsemixer is very inefficient and you are using it twice. You can wrap up volume.sh
provided in blocks folder. It will be much more efficient.
Hi , thank you for your great job.
I don't think the system sound needs to be updated from time to time. So I want to send a signal to update the block at the same time as I change the sound. The block is not updated at other times.
The first try is: In my configuration, left mouse click on the sound block will mute the system. I want to have the block show the mute icon at the same time.
Hear are the blocks.h file and volume setting file (Copied from Luke, modify little by yourself)
The final version I want is to update the sound block once whenever I increase or decrease volume not just the icon. Usually I used to use shortcut keys to adjust the sound. I don't know what to do in this situation. Any suggestions would be highly appreciated, thanks in advance.