pkgs: change-audio: 0.1.1 -> 0.1.2
Show if volume is currently muted.
This commit is contained in:
parent
e295a60cf5
commit
ce0c634a05
|
@ -10,8 +10,14 @@ fi
|
||||||
|
|
||||||
pamixer --allow-boost "$upDown" "$2"
|
pamixer --allow-boost "$upDown" "$2"
|
||||||
newVolume="$(pamixer --get-volume || true)"
|
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 \
|
notify-send -u low \
|
||||||
-h string:x-canonical-private-synchronous:change-audio \
|
-h string:x-canonical-private-synchronous:change-audio \
|
||||||
-h "int:value:$newVolume" \
|
-h "int:value:$newVolume" \
|
||||||
-- "Set volume to $newVolume%"
|
-- "$MSG"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib, libnotify, makeWrapper, pamixer, shellcheck, stdenvNoCC }:
|
{ lib, libnotify, makeWrapper, pamixer, shellcheck, stdenvNoCC }:
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "change-audio";
|
pname = "change-audio";
|
||||||
version = "0.1.1";
|
version = "0.1.2";
|
||||||
|
|
||||||
src = ./change-audio;
|
src = ./change-audio;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue