all repos — dotfiles @ 82f917dcdae3cae107bf8cf2ac1f27f8ea293237

my *nix dotfiles

bin/vol.sh (view raw)

 1#!/usr/bin/env bash
 2
 3fg="$(xres color0)"
 4light="$(xres color8)"
 5
 6while getopts idq options
 7do
 8	case $options in
 9		i)
10			amixer sset Master 2%+
11			;;
12
13		d)
14			amixer sset Master 2%-
15			;;
16		q)
17			cur_vol=$(amixer get Master | grep 'Right' | awk -F'[][]' '{ print $2 }' | tr -d '\n')
18			echo -ne "%{F$light}vol %{F$fg}$cur_vol"
19			;;
20	esac
21done