Files
nixos-config/home/common/programs/eww/scripts/getvol
T
Miguel Palhas a436a816b6 git scripts
2024-10-06 14:36:09 +01:00

13 lines
250 B
Bash

#!/bin/sh
if command -v pamixer &>/dev/null; then
if [ true == $(pamixer --get-mute) ]; then
echo 0
exit
else
pamixer --get-volume
fi
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi