mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 15:42:14 +02:00
now getting the volume of the default sink, the actual connected device (headphone, speaker, ...)
This commit is contained in:
@@ -164,7 +164,7 @@ const getBrightness = async () => {
|
|||||||
|
|
||||||
const getVolume = async () => {
|
const getVolume = async () => {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
execute("pactl get-sink-volume 0 | grep 'Volume' | cut -d '/' -f 2"),
|
execute("pactl get-sink-volume @DEFAULT_SINK@ | grep 'Volume' | cut -d '/' -f 2"),
|
||||||
execute("pactl get-sink-mute 0")
|
execute("pactl get-sink-mute 0")
|
||||||
]).then(([volume, muted]) => {
|
]).then(([volume, muted]) => {
|
||||||
return `${muted.includes("no") ? "" : ""} ${volume.trim()}`;
|
return `${muted.includes("no") ? "" : ""} ${volume.trim()}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user