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

plymouth: support question and message widgets #842

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

Conversation

0x5a4
Copy link
Contributor

@0x5a4 0x5a4 commented Feb 9, 2025

I've added support for the plymouth question and message widgets (shown via plymouth ask-question and plymouth display-message respectively). These can by pretty useful for more sophisticated setups that require more than "please enter a password".

You can try them out via

boot.initrd.systemd.services.plymouth-start.postStart = ''
  ${lib.getExe' pkgs.plymouth "plymouth"} display-message --text "Hi! I am a Message"
  ${lib.getExe' pkgs.plymouth "plymouth"} ask-question --prompt "Answer me!"
'';

Please let me know what you think about the placement of the message. I'm a bit unsure where to put it...

@0x5a4 0x5a4 force-pushed the more-plymouth-widgets branch from 7fef698 to 78d492d Compare February 9, 2025 11:07
@trueNAHO trueNAHO requested a review from danth February 9, 2025 16:39
@danth
Copy link
Owner

danth commented Feb 9, 2025

What about placing the message at baseline_y? (Without shifting it by the height of the image.) That might look consistent with the other prompts.

@0x5a4
Copy link
Contributor Author

0x5a4 commented Feb 9, 2025

The issue then is that we get something like the following, because message isnt exclusive.

Enter password
Hi I am a Message
••••••••••••

I've found this to be pretty confusing...

While we're at it: What do you think about merging the two theme files? This could easily be achieved by inlining the theme into the module and just use regular nix conditionals.
Also what about an option to not show the password bullets?
(I'd be willing to test + implement both)

@0x5a4
Copy link
Contributor Author

0x5a4 commented Feb 9, 2025

How about

Hi I am a Message!

Enter Password

•••••••

though I think we'd have to cheat a bit, because prompt may not be there. but we could get there using a dummy label (which is quite ugly)

@trueNAHO
Copy link
Collaborator

On a sidenote, I am unsure whether I like Stylix applying such arbitrary configurations instead of end-users implementing this themselves by accessing Stylix variables. However, I see the convenience since most people might not bother configuring their splash screen.

@0x5a4
Copy link
Contributor Author

0x5a4 commented Feb 10, 2025

Plymouth also has the most horrible documentation i've ever seen... You are forced to just copy paste from others and adapt, which I find to just not be very enjoyable.

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.

3 participants