diff --git a/media_control.lua b/media_control.lua index a5bcb8d..e938534 100644 --- a/media_control.lua +++ b/media_control.lua @@ -28,7 +28,7 @@ end -- Volume control function getVolume() - local handle = io.popen("amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n 1", "r") + local handle = io.popen("amixer -D pulse sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n 1", "r") local volume = string.gsub(handle:read("*a"), "[\n%%]+", "") / 100 handle:close() return volume @@ -154,11 +154,11 @@ local displayVolume = function() timer:start() end local raiseVolume = function() - os.execute("amixer set Master 5%+") + os.execute("amixer -D pulse set Master 5%+") displayVolume() end local lowerVolume = function() - os.execute("amixer set Master 5%-") + os.execute("amixer -D pulse set Master 5%-") displayVolume() end -- }}}