-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Status command to return the player status #126
Comments
Please try implementing it. |
and grabbing just the part we're interested in:
As a side note, I would be careful about adding too much to the prompt only because it can slow things down if your prompt is constantly trying to pull extraneous information. There's a noticeable difference when I'm in a folder and my prompt provides the git branch info... |
That is a possible way to go about it, but as you mentioned it would slow down the prompt considering it retrieves a lot of data that I won't really use. I added a command in #127 which is around 5x faster than doing |
Right, I guess does it make more sense to add an extra command to the
script? To be clear, I’m not against splitting it up, but I do think it
adds a bit of clutter. Could probably just as easily add that line of code
directly to your prompt:
https://github.com/hnarayanan/shpotify/blob/cd6556331a95bf6b3caba5e28c33d9dcc32c2abb/spotify#L117
…On Sat, Feb 29, 2020 at 4:52 AM Anomitra Saha ***@***.***> wrote:
That is a possible way to go about it, but as you mentioned it would slow
down the prompt considering it retrieves a lot of data that I won't really
use. I added a command in #127
<#127> which is around 5x
faster than doing spotify status - good enough for using in a prompt.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#126?email_source=notifications&email_token=ABKYODCV4GKXGSAXYCT2733RFDNGVA5CNFSM4K36NCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENLVV6A#issuecomment-592927480>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKYODDAEIEJP3I57SJ25UDRFDNGVANCNFSM4K36NCHA>
.
|
Yes, it's definitely possible for me to add that line of code to my prompt. But I still think it's a good-to-have functionality for the library. A lot of Oh-My-Zsh users (like me) use |
This turned out to be extremely easy to implement! |
Oh wait - @anomitra already did it. But have a look: there's a bit of DRYing that can be done, since a number of different functions are checking the player state. |
This is pretty self-explanatory - it'd be nice if I had something like
spotify status player
which returns eitherPLAYING
,PAUSED
orSTOPPED
. Think of it as mirroring the play button's status on a music player.The motivation behind this is that I'm using
shpotify
to display the player status on my terminal prompt. I'm okay with taking a stab at implementing this if the maintainers are on-board.The text was updated successfully, but these errors were encountered: