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

Allow Setting Window Title #806

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Conversation

xsadia
Copy link
Contributor

@xsadia xsadia commented Nov 20, 2024

This PR adds support for specifying a custom window title using the --title argument in the CLI. This feature allows users to define a specific name for the window, improving usability in multi-window setups and enabling better integration with window managers.

Default window title

image

Custom name with --title flag

image

closes #405

@@ -57,6 +57,8 @@ pub struct Window {
pub decorations: Decorations,
#[serde(default = "bool::default", rename = "macos-use-unified-titlebar")]
pub macos_use_unified_titlebar: bool,
#[serde(skip_serializing)]
pub title: Option<String>,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename it for title_placeholder or initial_title ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Will change

@raphamorim
Copy link
Owner

Overall it looks good! thanks for the PR @xsadia I appreciate!

Would you mind also to include it in the docs?

@xsadia
Copy link
Contributor Author

xsadia commented Nov 20, 2024

Overall it looks good! thanks for the PR @xsadia I appreciate!

Would you mind also to include it in the docs?

Absolutely, I'll update the docs as well shortly!

@xsadia
Copy link
Contributor Author

xsadia commented Nov 20, 2024

@raphamorim anything else you'd like me to change just let me know!

@raphamorim
Copy link
Owner

Thank you @xsadia 🙏 ⭐

@@ -57,6 +57,8 @@ pub struct Window {
pub decorations: Decorations,
#[serde(default = "bool::default", rename = "macos-use-unified-titlebar")]
pub macos_use_unified_titlebar: bool,
#[serde(skip_serializing)]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one small thing: add rename = "initial-title"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

@raphamorim raphamorim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@raphamorim raphamorim merged commit 3c2cb57 into raphamorim:main Nov 20, 2024
7 checks passed
@raphamorim
Copy link
Owner

@xsadia feel free to join our discord :) https://discord.gg/zRvJjmKGwS

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.

Feature Request: Allow Setting Window Class and/or Title
2 participants