diff --git a/pkgs/change-audio/change-audio b/pkgs/change-audio/change-audio index 22479d4..836e0c1 100755 --- a/pkgs/change-audio/change-audio +++ b/pkgs/change-audio/change-audio @@ -10,8 +10,14 @@ fi pamixer --allow-boost "$upDown" "$2" newVolume="$(pamixer --get-volume || true)" +[ "$(pamixer --get-volume-human)" = "muted" ] && isMuted=true + +MSG="Set volume to $newVolume%" +if [ "${isMuted:-false}" = true ]; then + MSG="$MSG (muted)" +fi notify-send -u low \ -h string:x-canonical-private-synchronous:change-audio \ -h "int:value:$newVolume" \ - -- "Set volume to $newVolume%" + -- "$MSG" diff --git a/pkgs/change-audio/default.nix b/pkgs/change-audio/default.nix index c931ee6..de050ff 100644 --- a/pkgs/change-audio/default.nix +++ b/pkgs/change-audio/default.nix @@ -1,7 +1,7 @@ { lib, libnotify, makeWrapper, pamixer, shellcheck, stdenvNoCC }: stdenvNoCC.mkDerivation rec { pname = "change-audio"; - version = "0.1.1"; + version = "0.1.2"; src = ./change-audio;