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

playerctl: add settings to control which elements are displayed #309

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uninsane
Copy link

the defaults are to keep existing behavior, and display all fields.

new boolean options are added for:

  • show-previous shows "<<" icon to rewind the player
  • show-play-pause shows "||" or "|>" icon to play/pause the player
  • show-next shows ">>" icon to advance the player
  • show-name shows the media name (e.g. the artist + title) and the number of players

these are especially useful for narrow screens, like mobile phones, where a user may wish to disable all but "show-play-pause" in order to fit size limitations of the panel. see below for an example (the chevron in the control-settings menu was also removed to make this fit: i can open a PR to make that an option too if this type of change is appreciated).

2024-06-19-21h20m25

the defaults are to keep existing behavior, and display all fields.

new boolean options are added for:
- show-previous     shows "<<" icon to rewind the player
- show-play-pause   shows "||" or "|>" icon to play/pause the player
- show-next         shows ">>" icon to advance the player
- show-name         shows the media name (e.g. the artist + title) and
                    the number of players

these are especially useful for narrow screens, like mobile phones,
where a user may wish to disable all but "show-play-pause" in order to
fit size limitations of the panel.
@nwg-piotr
Copy link
Owner

Your PR misses necessary additions to config.py and language files. We don't expect users to edit configs manually.

@uninsane
Copy link
Author

i can add the new keys to en_US.json and dig into config.py. i expect i would be touching the glade files (nwg_panel/glade/config_playerctl.glade), which will be new for me. i'm guessing you don't edit those by hand: is the workflow something like me installing glade and then running glade config_playerctl.glade to edit that graphically?

before i do those things, do you agree with the direction of this PR? i was split between separate config options for show-previous and show-next v.s. one unified show-navigation option, for example. or taking all the elements here (previous/play-pause/next/cover-image/media-name) and exposing just a single list-type config option like you do with the "components" in the controls module.

@nwg-piotr
Copy link
Owner

nwg-piotr commented Jun 19, 2024

Yes, you open and edit glade files with Glade. :)

"Show navigation" may be ambiguous, but yes, leaving one of the two buttons while the second is turned off makes little sense. We just need a better name, maybe "Show back/forward" or something? Use Gtk.CheckButton for each option.

do you agree with the direction of this PR?

I'll probably always use all buttons, but who knows, maybe someone else is going to like it?

@uninsane uninsane marked this pull request as draft June 24, 2024 12:59
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.

2 participants