This commit is contained in:
Sakooooo 2023-07-24 21:18:55 +03:00
parent 6ee2dde4fb
commit daa0860fe9
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,8 @@
#!/bin/sh
# Get the maximum volume of any pulseaudio sink channel
# amixer get Master | egrep -o "[0-9]+%"
vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
echo Vol: $vol%
exit 0

View file

@ -12,7 +12,7 @@ Config {
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "%StdinReader% | %battery% | %multicpu% | %memory% }{ %date% | %kbd% %_XMONAD_TRAYPAD%"
, template = "%StdinReader% | %battery% | %multicpu% | %memory% }{ %vol% | %date% | %kbd% %_XMONAD_TRAYPAD%"
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
@ -62,6 +62,8 @@ Config {
, "--high" , "darkred"
] 10
, Run Com "/home/sako/.config/xmobar/scripts/get-volume.sh" [] "vol",
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C"
, "--Low" , "70" -- units: °C