From daa0860fe9b3da2ec3211772e84fc51bcc025e12 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 24 Jul 2023 21:18:55 +0300 Subject: [PATCH] we --- config/xmobar/scripts/volume.sh | 8 ++++++++ config/xmobar/xmobarrc | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 config/xmobar/scripts/volume.sh diff --git a/config/xmobar/scripts/volume.sh b/config/xmobar/scripts/volume.sh new file mode 100644 index 00000000..4342a564 --- /dev/null +++ b/config/xmobar/scripts/volume.sh @@ -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 diff --git a/config/xmobar/xmobarrc b/config/xmobar/xmobarrc index 975fe125..a21f5bef 100644 --- a/config/xmobar/xmobarrc +++ b/config/xmobar/xmobarrc @@ -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: °C|°C" , "--Low" , "70" -- units: °C