From 6c02553c34fccfe7c7f2d31b91c6d086f3730a1e Mon Sep 17 00:00:00 2001 From: dx Date: Sat, 6 Jun 2020 19:35:14 +0100 Subject: +mpc volume script to get the volume of mpc --- Scripts/.local/scripts/mpc_volume | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 Scripts/.local/scripts/mpc_volume (limited to 'Scripts/.local/scripts') diff --git a/Scripts/.local/scripts/mpc_volume b/Scripts/.local/scripts/mpc_volume new file mode 100755 index 0000000..c8d2031 --- /dev/null +++ b/Scripts/.local/scripts/mpc_volume @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [[ $# -eq 0 ]] +then + echo "$(mpc volume | tr -d 'volume: ' | tr -d '%')" +elif [[ $# -eq 1 ]] +then + mpc volume "$(echo $1 | tr -d '%')" +fi -- cgit v1.2.3-13-gbd6f