pkgs: change-audio: 0.1.1 -> 0.1.2
Show if volume is currently muted.
This commit is contained in:
parent
6ebfa1a8cc
commit
2d7f01f035
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue