Spaced out some if statements to make them more readable
This commit is contained in:
parent
4cd78d3148
commit
b80b09376a
1 changed files with 6 additions and 0 deletions
6
fetch
6
fetch
|
@ -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://'}
|
||||
|
|
Loading…
Reference in a new issue