diff options
Diffstat (limited to 'scripts/scripts/vol')
-rwxr-xr-x | scripts/scripts/vol | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/scripts/vol b/scripts/scripts/vol new file mode 100755 index 0000000..8ed96da --- /dev/null +++ b/scripts/scripts/vol | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | fg="$( ~/scripts/get_xres color7 )" | ||
4 | icon="$( ~/scripts/get_xres color2 )" | ||
5 | |||
6 | while getopts idq options | ||
7 | do | ||
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 sget Master | awk -F"[][]" '/dB/ { print $2 }' ) | ||
18 | echo " %{F$fg}$cur_vol" | ||
19 | ;; | ||
20 | esac | ||
21 | done | ||