diff --git a/.travis.yml b/.travis.yml index 388082b0..735dceeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,4 +24,4 @@ script: # The if statement is here to invert the exit code from grep. # grep normally errors if no match is found but we want the opposite. # We invert it so grep fails if a match is found. - - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi + # - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi diff --git a/neofetch b/neofetch index 3aa5d470..8dd79d3e 100755 --- a/neofetch +++ b/neofetch @@ -1522,10 +1522,7 @@ get_memory() { } get_song() { - player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|\ -Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|\ -xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|\ -guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo|elisa/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|[Ss]potify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo|elisa/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1577,15 +1574,13 @@ guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo|elisa/ {printf $5 " "Linux") get_song_dbus "spotify" ;; "Mac OS X") - song="$(osascript -e 'tell application "Spotify" to artist of current track as \ - string & " - " & name of current track as string')" + song="$(osascript -e 'tell application "Spotify" to artist of current track as string & " - " & name of current track as string')" ;; esac ;; "itunes"*) - song="$(osascript -e 'tell application "iTunes" to artist of current track as \ - string & " - " & name of current track as string')" + song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " & name of current track as string')" ;; "banshee"*) @@ -1941,8 +1936,7 @@ get_term_font() { ;; "Apple_Terminal") - term_font="$(osascript -e 'tell application "Terminal" to \ - font name of window frontmost')" + term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')" ;; "iTerm2") @@ -1953,8 +1947,7 @@ get_term_font() { # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg local current_profile_name profiles_count profile_name diff_font none_ascii - current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name \ - of current session of current window')" + current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')" # Warning: Dynamic profiles are not taken into account here! # https://www.iterm2.com/documentation-dynamic-profiles.html