Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
92c3ad74
Commit
92c3ad74
authored
Sep 10, 2018
by
xPMo
Committed by
Michael Straube
Dec 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extra spaces in song information
parent
ed0b0a97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
neofetch
neofetch
+15
-15
No files found.
neofetch
View file @
92c3ad74
...
...
@@ -2374,18 +2374,18 @@ get_song() {
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' \
string:'Metadata' |\
awk -F '"' 'BEGIN {RS=" entry"}; /xesam:artist/ {a = $4} /xesam:album/ {b = $4}
/xesam:title/ {t = $4} END {print a "
\n " b " \n
" t}'
/xesam:title/ {t = $4} END {print a "
\n" b "\n
" t}'
)"
}
case "${player/*\/}" in
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
"mocp"*) song="$(mocp -Q '%artist
\n %album \n
%song')" ;;
"mocp"*) song="$(mocp -Q '%artist
\n%album\n
%song')" ;;
"google play"*) song="$(gpmdp-remote current)" ;;
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta
\n %at \n
%tt')" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%
\n %album% \n
%title%')" ;;
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta
\n%at\n
%tt')" ;;
"deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist%
\n%album%\n
%title%')" ;;
"xmms2d"*) song="$(xmms2 current -f "\${artist}"$'\n'"\${album}"$'\n'"\${title}")" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p
\n %a \n
%t')" ;;
"qmmp"*) song="$(qmmp --nowplaying '%p
\n%a\n
%t')" ;;
"gnome-music"*) get_song_dbus "GnomeMusic" ;;
"lollypop"*) get_song_dbus "Lollypop" ;;
"clementine"*) get_song_dbus "clementine" ;;
...
...
@@ -2416,7 +2416,7 @@ get_song() {
/tag title/ {
$1=$2=""; sub(" ", ""); t=$0
}
END { print a "
\n " b " \n
" t }')"
END { print a "
\n" b "\n
" t }')"
;;
"spotify"*)
...
...
@@ -2425,36 +2425,36 @@ get_song() {
"Mac OS X")
song="$(osascript -e 'tell application "Spotify" to artist of current track as¬
string & "
\n
" & album of current track as¬
string & "
\n
" & name of current track as string')"
string & "
\n
" & album of current track as¬
string & "
\n
" & name of current track as string')"
;;
esac
;;
"itunes"*)
song="$(osascript -e 'tell application "iTunes" to artist of current track as¬
string & "
\n
" & album of current track as¬
string & "
\n
" & name of current track as string')"
string & "
\n
" & album of current track as¬
string & "
\n
" & name of current track as string')"
;;
"banshee"*)
song="$(banshee --query-artist --query-album --query-title |\
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
END {print a "
\n " b " \n
"t}')"
END {print a "
\n" b "\n
"t}')"
;;
"exaile"*)
# NOTE: Exaile >= 4.0.0 will support mpris2.
song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \
org.exaile.Exaile.Query |
awk -F':|,' '{if ($6 && $8 && $4) printf $6 "
\n" $8 "
\n" $4}')"
awk -F':|,' '{if ($6 && $8 && $4) printf $6 "
\n" $8 "
\n" $4}')"
;;
"quodlibet"*)
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
/title/ {getline; t=$2} END {print a "
\n " b " \n
" t}')"
/title/ {getline; t=$2} END {print a "
\n" b "\n
" t}')"
;;
"pogo"*)
...
...
@@ -2472,10 +2472,10 @@ get_song() {
getline;
t=$2
}
END {print a "
\n " b " \n
" t}')"
END {print a "
\n" b "\n
" t}')"
;;
*) mpc &>/dev/null && song="$(mpc -f '%artist%
\n %album% \n
%title%' current)" ;;
*) mpc &>/dev/null && song="$(mpc -f '%artist%
\n%album%\n
%title%' current)" ;;
esac
[[ "$song" != *[a-z]* ]] && { unset -v song; return; }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment