Skip to content

Commit

Permalink
Swapped Amixer for Pactl audio control
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricM9 authored Aug 19, 2022
1 parent d75c9c4 commit 3db7181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awesome/components/volume-adjust.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ awesome.connect_signal("volume_change",
function()
-- set new volume value
awful.spawn.easy_async_with_shell(
"amixer sget Master | grep 'Right:' | awk -F '[][]' '{print $2}'| sed 's/[^0-9]//g'",
"pactl list sinks | grep '^[[:space:]]Volume:' | \\head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \\([0-9][0-9]*\\)%.*,\\1,'",
function(stdout)
local volume_level = tonumber(stdout)
volume_bar.value = volume_level
Expand Down

0 comments on commit 3db7181

Please sign in to comment.