diff --git a/1.3.md b/1.3.md index bb919a9b..e5892ba2 100644 --- a/1.3.md +++ b/1.3.md @@ -3,3 +3,8 @@ ### OS - Added support for `BunsenLabs`. + +### Info + +**Song**
+- Added `song_shorthand` which prints the Artist/Title on seperate lines. diff --git a/README.md b/README.md index 326355fe..8ae5209f 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,7 @@ alias fetch2="fetch \ --battery_num num Which battery to display, default value is 'all' --battery_shorthand on/off Whether or not each battery gets its own line/title --ip_host url Url to ping for public IP + --song_shorthand on/off Print the Artist/Title on seperate lines --birthday_shorthand on/off Shorten the output of birthday --birthday_time on/off Enable/Disable showing the time in birthday output diff --git a/config/config b/config/config index d4fb2388..092585fc 100644 --- a/config/config +++ b/config/config @@ -140,6 +140,13 @@ battery_shorthand="off" public_ip_host="http://ident.me" +# Song + +# Print the Artist and Title on seperate lines +# --song_shorthand on/off +song_shorthand="off" + + # Birthday # Whether to show a long pretty output diff --git a/fetch b/fetch index 4150294a..deb4d1d1 100755 --- a/fetch +++ b/fetch @@ -158,6 +158,13 @@ battery_shorthand="off" public_ip_host="http://ident.me" +# Song + +# Print the Artist and Title on seperate lines +# --song_shorthand on/off +song_shorthand="off" + + # Birthday # Whether to show a long pretty output @@ -1123,6 +1130,20 @@ getsong () { song="Stopped" ;; esac + + # Display Artist and song on seperate lines. + if [ "$song_shorthand" == "on" ]; then + artist="${song/ -*}" + song=${song/*- } + + if [ "$song" != "$artist" ]; then + prin "Artist: ${artist}" + prin "Song: ${song}" + else + prin "${subtitle}: ${song}" + fi + unset song + fi } # }}} @@ -2277,6 +2298,7 @@ usage () { cat << EOF --battery_num num Which battery to display, default value is 'all' --battery_shorthand on/off Whether or not each battery gets its own line/title --ip_host url Url to ping for public IP + --song_shorthand on/off Print the Artist/Title on seperate lines --birthday_shorthand on/off Shorten the output of birthday --birthday_time on/off Enable/Disable showing the time in birthday output @@ -2382,6 +2404,7 @@ while [ "$1" ]; do --battery_num) battery_num="$2" ;; --battery_shorthand) battery_shorthand="$2" ;; --ip_host) public_ip_host="$2" ;; + --song_shorthand) song_shorthand="$2" ;; --birthday_shorthand) birthday_shorthand="$2" ;; --birthday_time) birthday_time="$2" ;; --disable)