general: Revert problamatic lines to over 100 chars long.

This commit is contained in:
Dylan Araps 2018-02-02 09:24:48 +11:00
parent 2cecb142e1
commit 7a543e8fa6
2 changed files with 6 additions and 13 deletions

View File

@ -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

View File

@ -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