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
be893d48
Commit
be893d48
authored
Feb 01, 2018
by
Joseph Durel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect iTunes/Spotify successfully when the other is not running
parent
b76513d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
neofetch
neofetch
+10
-6
No files found.
neofetch
View file @
be893d48
...
@@ -1522,7 +1522,7 @@ get_memory() {
...
@@ -1522,7 +1522,7 @@ get_memory() {
}
}
get_song() {
get_song() {
player="
$(
ps
-e
|
grep
-m
1
-o
-F
\
player="
$(
ps
-e
|
grep
-m
1
-o
\
-e
"Google Play"
\
-e
"Google Play"
\
-e
"Spotify"
\
-e
"Spotify"
\
-e
"amarok"
\
-e
"amarok"
\
...
@@ -1537,7 +1537,7 @@ get_song() {
...
@@ -1537,7 +1537,7 @@ get_song() {
-e
"exaile"
\
-e
"exaile"
\
-e
"gnome-music"
\
-e
"gnome-music"
\
-e
"guayadeque"
\
-e
"guayadeque"
\
-e
"iTunes
.app
"
\
-e
"iTunes
$
"
\
-e
"juk"
\
-e
"juk"
\
-e
"lollypop"
\
-e
"lollypop"
\
-e
"mocp"
\
-e
"mocp"
\
...
@@ -1604,9 +1604,11 @@ get_song() {
...
@@ -1604,9 +1604,11 @@ get_song() {
"
Mac OS X
")
"
Mac OS X
")
song="
$(
osascript
<<
END
song="
$(
osascript
<<
END
tell application "Spotify"
if application "Spotify" is running then
tell application "Spotify"
artist of current track as string & " - " & name of current track as string
artist of current track as string & " - " & name of current track as string
end tell
end tell
end if
END
END
)
"
)
"
;;
;;
...
@@ -1615,9 +1617,11 @@ END
...
@@ -1615,9 +1617,11 @@ END
"
itunes
"*)
"
itunes
"*)
song="
$(
osascript
<<
END
song="
$(
osascript
<<
END
tell application "iTunes"
if application "iTunes" is running then
tell application "iTunes"
artist of current track as string & " - " & name of current track as string
artist of current track as string & " - " & name of current track as string
end tell
end tell
end if
END
END
)
"
)
"
;;
;;
...
...
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