From 1480b833b0c2349b69806580e73555499f58869b Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 10 May 2018 09:14:39 +0200 Subject: [PATCH 1/8] song: add support for sayonara --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3efa3f3b..9234630e 100755 --- a/neofetch +++ b/neofetch @@ -435,6 +435,7 @@ disk_subtitle="mount" # tomahawk # xmms2d # yarock +# sayonara music_player="auto" # Format to display song information. @@ -2389,7 +2390,8 @@ get_song() { -e "spotify" \ -e "tomahawk" \ -e "xmms2d" \ - -e "yarock")" + -e "yarock" \ + -e "sayonara")" [[ "$music_player" && "$music_player" != "auto" ]] && \ player="$music_player" @@ -2424,6 +2426,7 @@ get_song() { "deepin-music"*) get_song_dbus "deepinmusic" ;; "tomahawk"*) get_song_dbus "tomahawk" ;; "elisa"*) get_song_dbus "elisa" ;; + "sayonara"*) get_song_dbus "sayonara" ;; "audacious"*) song="$(audtool current-song)" From f93da07f36dff27a4b7e75c868ccf000a8555efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Birger=20J=2E=20Nord=C3=B8lum?= Date: Thu, 10 May 2018 14:05:27 +0200 Subject: [PATCH 2/8] kitty: style tweaks on regex --- neofetch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 9234630e..ea4384b0 100755 --- a/neofetch +++ b/neofetch @@ -2910,9 +2910,11 @@ END fi - term_font="$(awk '/^[\S\n_#]+?font_family\s+?/ {$1="";gsub(/^[[:space:]]/,"");font=$0}\ - /^[\S\n_#]+?font_size\s+?\d+?/ { size = $2 } END { print font " " size}' \ - "${kitty_file}")" + term_font="$(awk '/^[\S\n_#]+?font_family\s+?/ + { $1 = ""; gsub(/^[[:space:]]/, ""); font = $0 } + /^[\S\n_#]+?font_size\s+?\d+?/ + { size = $2 } END { print font " " size}' \ + "${kitty_file}")" ;; "konsole"*) From 358006dd924f23535b4d6a2104e3b0f264282d0c Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 11 May 2018 18:37:37 +0200 Subject: [PATCH 3/8] song: fix deepin-music --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ea4384b0..b689191b 100755 --- a/neofetch +++ b/neofetch @@ -2423,7 +2423,7 @@ get_song() { "bluemindo"*) get_song_dbus "Bluemindo" ;; "guayadeque"*) get_song_dbus "guayadeque" ;; "yarock"*) get_song_dbus "yarock" ;; - "deepin-music"*) get_song_dbus "deepinmusic" ;; + "deepin-music"*) get_song_dbus "DeepinMusic" ;; "tomahawk"*) get_song_dbus "tomahawk" ;; "elisa"*) get_song_dbus "elisa" ;; "sayonara"*) get_song_dbus "sayonara" ;; From 670161e13a6733d75bd51f21aaea0a78a8fd3d06 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 11 May 2018 19:22:34 +0200 Subject: [PATCH 4/8] song: simplify get_song_dbus --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index ea4384b0..cfd2ecf1 100755 --- a/neofetch +++ b/neofetch @@ -2403,8 +2403,8 @@ get_song() { dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \ org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' \ string:'Metadata' |\ - awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\ - awk -F '"' '/artist/ {a=$2} /album"/ {b=$2} /title/ {t=$2} END{print a " ‡ " b " ‡ " t}' + awk -F '"' 'BEGIN {RS=" entry"}; /xesam:artist/ {a = $4} /xesam:album/ {b = $4} + /xesam:title/ {t = $4} END {print a " ‡ " b " ‡ " t}' )" } From 8513b62259375eeddc1f0b03e402b5275b9e9244 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 12 May 2018 10:54:56 +0200 Subject: [PATCH 5/8] song: update song_shorthand example --- neofetch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index ea4384b0..cb3b6c15 100755 --- a/neofetch +++ b/neofetch @@ -448,7 +448,7 @@ music_player="auto" # default: 'Song: Jet - Get Born - Sgt Major' song_format="%artist% - %album% - %title%" -# Print the Artist and Title on separate lines +# Print the Artist, Album and Title on separate lines # # Default: 'off' # Values: 'on', 'off' @@ -456,9 +456,10 @@ song_format="%artist% - %album% - %title%" # # Example: # on: 'Artist: The Fratellis' +# 'Album: Costello Music' # 'Song: Chelsea Dagger' # -# off: 'Song: The Fratellis - Chelsea Dagger' +# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' song_shorthand="off" From bd0e62d5f31ace5b91e7db11a53174d27a0129f3 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 12 May 2018 13:53:23 +0200 Subject: [PATCH 6/8] song: audacious: remove audtool, closes #986 --- neofetch | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/neofetch b/neofetch index cb3b6c15..4f508ef6 100755 --- a/neofetch +++ b/neofetch @@ -2428,11 +2428,7 @@ get_song() { "tomahawk"*) get_song_dbus "tomahawk" ;; "elisa"*) get_song_dbus "elisa" ;; "sayonara"*) get_song_dbus "sayonara" ;; - - "audacious"*) - song="$(audtool current-song)" - [[ -z "$song" || "$song_shorthand" == "on" ]] && get_song_dbus "audacious" - ;; + "audacious"*) get_song_dbus "audacious" ;; "cmus"*) song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "}; From 33fbed0b1491e7b962a5f28025d253ad928d15a9 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 13 May 2018 11:06:22 +0200 Subject: [PATCH 7/8] general: update copyright year --- LICENSE.md | 2 +- neofetch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 851d9f6a..835c1789 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2017 Dylan Araps +Copyright (c) 2016-2018 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/neofetch b/neofetch index cb3b6c15..9983e3e3 100755 --- a/neofetch +++ b/neofetch @@ -6,7 +6,7 @@ # # The MIT License (MIT) # -# Copyright (c) 2016-2017 Dylan Araps +# Copyright (c) 2016-2018 Dylan Araps # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal From a62c3d20298d5fb30c660d34ce89fb6be4df9c80 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 13 May 2018 11:15:24 +0200 Subject: [PATCH 8/8] song: add support for vlc --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 84fef598..f7e99fa3 100755 --- a/neofetch +++ b/neofetch @@ -436,6 +436,7 @@ disk_subtitle="mount" # xmms2d # yarock # sayonara +# vlc music_player="auto" # Format to display song information. @@ -2392,7 +2393,8 @@ get_song() { -e "tomahawk" \ -e "xmms2d" \ -e "yarock" \ - -e "sayonara")" + -e "sayonara" \ + -e "vlc")" [[ "$music_player" && "$music_player" != "auto" ]] && \ player="$music_player" @@ -2429,6 +2431,7 @@ get_song() { "elisa"*) get_song_dbus "elisa" ;; "sayonara"*) get_song_dbus "sayonara" ;; "audacious"*) get_song_dbus "audacious" ;; + "vlc"*) get_song_dbus "vlc" ;; "cmus"*) song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};