#!/bin/sh # i3blocks volume module case $BUTTON in 1)urxvt -e alsamixer;; 3)urxvt -e vim ~/.local/bin/statusbar/volume;; 4)amixer -q sset Master 1%+ unmute;; 5)amixer -q sset Master 1%- unmute;; esac stats=$(amixer sget Master | grep "Front Left:" | cut -d ' ' -f 7,8 | tr -d '[]') [ "${stats##* }" = "on" ] && echo -n "${stats%% *}" || echo -n "${stats%% *}"