-
Notifications
You must be signed in to change notification settings - Fork 11
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
Suggestion for running spotify #40
Comments
Sorry for the long time to comment your suggestion. It has been a very busy weather right here. I think we can split this addition into some steps: i) option to opt-in the functionality of starting a spotify client if none is present ii) default to only warn the user through a minibuffer message iii) if opt-in, try open the client, inform message if not succeded. What you think about this? Can you submit a PR to accomplish those behaviors? thanks |
What you think about this? Can you submit a PR to accomplish those
behaviors?
Let me see what I can come up with, once I find out what a PR is :)
… —
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#40?email_source=notifications&email_token=AAJELKXJOCRMFUFJ47ZV3FLP4DUR5A5CNFSM4HEZJPVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNMBZQ#issuecomment-505069798>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJELKRFENG5QHKNVS3N6XTP4DUR5ANCNFSM4HEZJPVA>
.
--
Bob Newell
Honolulu, Hawai`i
Via Linux/Emacs/Gnus/BBDB.
|
PR = Pull Request hehehe. It's the process of submitting code to contribute with a repository in github. If you need guidance, don't wait to ask. I hope to be able to help. |
This is just something I do on my own for my Linux system. Since Spotify has to already be running to play a track, I add this code to my startup (after helm-spotify-plus is loaded). This could probably be done more nicely, and is only for Linux, but it does what I need, namely, be sure Spotify is running before trying to play something.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun spotify-check (&rest args)
(interactive)
"See if spotify is running and if not, run it"
(if (not (string= (shell-command-to-string "pgrep -x "spotify"") ""))
(message "Spotify running")
(progn
(message "Starting Spotify")
(start-process "spotify" nil "spotify")
(sleep-for 3))
)
)
;;; To ensure spotify is running before trying to play stuff.
(advice-add 'helm-spotify-plus-play-href :before #'spotify-check)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The text was updated successfully, but these errors were encountered: