Skip to content

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

Open
josephmturner wants to merge 17 commits intojorenvo:masterfrom
josephmturner:master
Open

Echo relevant info from mpc status in interactive simple-mpc* functions#16
josephmturner wants to merge 17 commits intojorenvo:masterfrom
josephmturner:master

Conversation

@josephmturner
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@josephmturner
Copy link
Copy Markdown
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