diff --git a/simplestatus/config b/simplestatus/config index 03f00de..4f1685b 100644 --- a/simplestatus/config +++ b/simplestatus/config @@ -1,8 +1,9 @@ module power 7 30 module time 7 30 module date 7 30 -module bspwm 10 1000000 +module volume 12 30 +module bspwm 10 30 -order bspwm date time power +order bspwm date time volume power -format %{l}&%{c}& &%{r}& +format %{l}&%{r}& & & & diff --git a/simplestatus/date b/simplestatus/date index e76a83a..5dbddec 100755 --- a/simplestatus/date +++ b/simplestatus/date @@ -1,5 +1,5 @@ #!/bin/sh -printf "%s" $(date '+%Y-%m-%d') +printf "%s" $(date '+%m-%d') exit diff --git a/simplestatus/volume b/simplestatus/volume new file mode 100755 index 0000000..dcce443 --- /dev/null +++ b/simplestatus/volume @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$(ps aux | grep pulseaudio | wc -l)" -eq 2 ]; then + text="$(pactl list sinks | awk -F' ' '$1 == "Volume:" {print $5}')" + printf "pv%s" "$text" +else + text="$(amixer | grep '^ Front' | awk -F'[' '{ ORS = ""; print substr($2, 1, 3); exit }')" + printf "av%s" "$text" +fi