You are not logged in.
Pages: 1
bash script: https://raw.githubusercontent.com/bront … intVolCont
needs: awk, bc, sed, grep, alsactl, amixer
It echoes current master volume (Alsa and Pulse should work, pulse=experimental) and mute state like this
······ 14 ······························ Pulse
If you plug that into tint2 as executor
execp = new
execp_centered = 1
execp_has_icon = 0
execp_command = printVolCont
execp_continuous = 1
execp_font = cuprum 8
execp_font_color = #111111 100
execp_padding = 0 0 0
execp_tooltip = volume
execp_mclick_command = amixer set Master toggle
execp_rclick_command = amixer set Master 5%+
execp_lclick_command = amixer set Master 5%-
execp_uwheel_command = amixer set Master 1%-
execp_dwheel_command = amixer set Master 1%+
You will get mice scrollable slider (scroll up, scroll down, lmb, rmb, middleclick=mute toggle).
I have been using this with Alsa for quite some time, pulseaudio is experimental and I'am not sure how to get more logarithmic scale for it at this point. < Shows the same as pnmixer.
Hacking:
- To disable "Pulse" at the end, change 'mode=" Pulse"' to 'mode=""' in pulse function.
- To change ascii art see lines
# config
chars="50"
fil="·"
poschar="│"
posnum="true" # show percent number instead of "$poschar" char
posmute=" ___ "
- To disable checking for which system is active, change line that calls function "alsaOrPulse" to either "alsa" or "pulse"
Last edited by brontosaurusrex (2018-03-25 17:48:26)
Offline
nice!
again, i couldn't resist being a smartass.
i mostly played with the logic; removed a few needless calls to external utilities (bc and seq), generally simplified a few things, and made sure the output always has the same width.
Last edited by ohnonot (2021-06-07 17:02:32)
Offline
Same width would assume using monotheistic font? I'll take a diff look at the rest.
Offline
i enjoy playing with this, so i made it a gist now, for further editing...
Offline
Pages: 1