Spaced out some if statements to make them more readable

This commit is contained in:
Dylan 2016-01-24 22:59:35 +11:00
parent 4cd78d3148
commit b80b09376a

6
fetch
View file

@ -313,9 +313,11 @@ case "$os" in
"Linux" )
if type -p crux >/dev/null 2>&1; then
distro="CRUX"
elif type -p lsb_release >/dev/null 2>&1; then
distro="$(lsb_release -a 2>/dev/null | awk -F':' '/Description/ {printf $2}')"
distro=${distro/[[:space:]]/}
else
distro="$(grep -h '^NAME=' /etc/*ease)"
distro=${distro#NAME\=*}
@ -846,11 +848,13 @@ getmemory () {
getsong () {
if type -p mpc >/dev/null 2>&1; then
song="$(mpc current)"
elif type -p cmus >/dev/null 2>&1; then
song="$(cmus-remote -Q | grep "tag artist\|title")"
song=${song/tag artist }
song=${song/tag title/-}
song=${song//[[:space:]]/ }
else
song="Unknown"
fi
@ -978,8 +982,10 @@ getwallpaper () {
"Linux" | *"BSD")
if type -p feh >/dev/null 2>&1 && [ -f "$HOME/.fehbg" ]; then
img="$(awk -F\' '/feh/ {printf $2}' "$HOME/.fehbg")"
elif type -p nitrogen >/dev/null 2>&1; then
img="$(awk -F'=' '/file/ {printf $2}' "$HOME/.config/nitrogen/bg-saved.cfg")"
elif type -p gsettings >/dev/null 2>&1; then
img="$(gsettings get org.gnome.desktop.background picture-uri 2>/dev/null)"
img=${img/'file://'}