Skip to content
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

Echo relevant info from mpc status in interactive simple-mpc* functions #16

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

josephmturner
Copy link
Contributor

Add helper functions to extract specific pieces of information from mpc status in a hacky way. Echo the extracted information on relevant commands.

Also, display mpc status in the simple-mpc buffer. This functionality could be improved, since it only updated when the buffer is reverted (by pressing g or calling simple-mpc again). Functions which changes the status, e.g., simple-mpc-toggle, do not update the buffer.

@josephmturner
Copy link
Contributor Author

Oh, hmm, I didn't realize that pushing to my master branch would add more to this PR, but I guess that's okay. The last commit adds functionality for toggling single status.

@josephmturner
Copy link
Contributor Author

Forgot the copyright notice.

@josephmturner josephmturner changed the title Display mpc status elements in interactive simple-mpc* functions Echo relevant info from mpc status in interactive simple-mpc* functions Dec 6, 2022
@josephmturner
Copy link
Contributor Author

I moved the code which displayed the full stdout of mpc status in the simple-mpc-buffer, since it didn't work perfectly.

I've not yet noticed any bugs in the remaining code.

@josephmturner josephmturner force-pushed the master branch 3 times, most recently from eb2cc6c to c9aeb85 Compare December 15, 2022 06:03
This is more robust and easier than using buffer movements.
Replaces simple-mpc-message-current-volume.
Replaces simple-mpc-get-current-playlist-position.
Replaces simple-mpc-get-amount-of-songs-in-playlist.
@josephmturner
Copy link
Contributor Author

I rewrote this functionality to extract bits of information from mpc status with regular expressions rather than buffer movement.

@josephmturner
Copy link
Contributor Author

@jorenvo if you decide to merge, I am happy to squash these commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant