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