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

module idea: motd #271

Open
fiftydinar opened this issue Jun 26, 2024 · 3 comments
Open

module idea: motd #271

fiftydinar opened this issue Jun 26, 2024 · 3 comments
Assignees
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Comments

@fiftydinar
Copy link
Collaborator

This module would mimic the functionality of Bluefin & Bazzite images, except it would be generic & usable for other custom image variants too.

If not aware,
MOTD (Message of the day) is the functionality of terminal which can be used to display useful information (or silly information if you wish).
It is shown every time you launch the terminal.
I think that the frequency of MOTD presence can be customized too, but not sure.

Maybe we can have some basic MOTD template, which users can build on?

Supported symbols also depend on the font & terminal used.

Any other thoughts?

@xynydev
Copy link
Member

xynydev commented Jun 26, 2024

(or silly information if you wish)

Haha, love it

These seem to be the MOTD-related files in Bluefin;

I couldn't find it implemented for other shells than Fish, and I'm not quite sure how to do that in other shells.

Here's a sketch of a possible config format for such a module with implementation details scattered in as comments:

type: motd # creates an motd and related files at a standard location in /usr/share/bluebuild/, configures shells to run that script when opening an interactive shell session
# ideally support these three shells configurably by default, with the option to turn off automatic shell configuration using `shells: none` or something
shells: [fish, bash, zsh]
# message will be printed as plain text without any formatting
message: |
    ★ Welcome to my custom image! ★
    
    Join the community:
    - Github Discussions: https://github.com/...
    - Discord server: https://discord.gg/...
    
    See all available commands with `ujust --choose`
# will override the default script making it possible to implement custom features or fancy rendering (while the text from `message:` would still be supplied somewhere, probably through a file)
motd-script: custom-motd.sh

@zelikos
Copy link
Contributor

zelikos commented Aug 13, 2024

The implementation for bash is part of ublue-os/config (I assume zsh uses the same file...?): https://github.com/ublue-os/config/blob/main/build/ublue-os-just/etc-profile.d/user-motd.sh

@xynydev
Copy link
Member

xynydev commented Aug 13, 2024

Specifically ublue-os-just, it seems. Interesting. We should be able to leverage that in our module too so that there isn't a double-MOTD on for example Bluefin-based images.

@xynydev xynydev added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Sep 22, 2024
@xynydev xynydev self-assigned this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

No branches or pull requests

3 participants