-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spotify segment (linux) #4732
base: main
Are you sure you want to change the base?
Spotify segment (linux) #4732
Conversation
Cool! This isn't a bad start. Allow me to review that somewhere this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to also update the docs, and eventually probably add a source
property too specifying dbus
or something else (but that's not relevant now)
I'm able to get the tests to pass locally, however when testing the binary, the spotify segment is not showing. |
You can use |
@luisegarduno any update? |
Thanks for tip, I've made some progress in my latest commit, having The workflow will not get far though, as I deleted |
5debf6a
to
9bbd91b
Compare
Haven't made much progress so I figured I would clarify the issue just in case someone is able to figure it out before I do. As mentioned in my last response, I have been able to verify WSL//go:build !darwin && !windows
...
func (s *Spotify) Enabled() bool { Linux//go:build linux && !darwin && !windows
...
func (s *Spotify) Enabled() bool { Error:
I have a feeling that adding the
However, I am not sure how I would go about implementing Any help would be appreciated! 😺 |
Prerequisites
Description
The goal of this PR is to create a working segment that displays the song & artist currently playing on the Spotify application via Linux.
I created a solution to fetch information from the Spotify application on Linux (Ubuntu) by using a bash segment to run a command. Having said this, the command is written directly in the theme file (see gist).
About 2 years ago, I forked oh-my-posh with the intention of converting the command into a proper segment, but never got around to getting it to work. Given my limited experience with go, I figured I should ask for help.
Regarding the solution itself, here is the command that retrieves the Spotify information:
The command shown above has been tested on several Ubuntu machines and has show to work consistently well. However, I am uncertain on the compatibility across other Linux distributions.