fix volume and backlight OSD(new dependency) fix icon_handler causing crash if client had no .class or .name prop

This commit is contained in:
Rene Kievits
2022-04-20 10:29:05 +02:00
parent fbd7d5e920
commit b11fa86729
7 changed files with 120 additions and 86 deletions

View File

@@ -59,8 +59,7 @@ return function()
local get_volume = function()
awful.spawn.easy_async_with_shell(
[[
SINK="$(pacmd stat | awk -F": " '/^Default sink name: /{print $2}')"
echo $(pacmd list-sinks | awk '/^\s+name: /{indefault = $2 == "<'$SINK'>"} /^\s+volume: / && indefault {print $5; exit}')
pacmd list-sinks|grep -A 15 '* index'| awk '/volume: front/{ print $5 }' | sed 's/[%|,]//g'
]],
function(stdout)
local icon = icondir .. "volume"