Skip to content

Conversation

@aequabit
Copy link
Contributor

@aequabit aequabit commented Aug 10, 2025

Putting it in square brackets next to the WM seemed like the most logical choice after looking at how icon and font information is displayed. If you want any changes made, just tell me and I'll take care of it.

image image

@CarterLi
Copy link
Member

What does it print on original X11?

ffStrbufInit(&result.wmProtocolName);
ffStrbufInit(&result.deProcessName);
ffStrbufInit(&result.dePrettyName);
ffStrbufInit(&result.serverVendor);
Copy link
Member

Choose a reason for hiding this comment

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

So this is only used for X11. I think it should be ok to append the string to wmProtocolName. Like X11-XLibre

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think differentiating between the protocol and the implementation detail is important (as it's done for fonts already), even if it means allocating a few more bytes.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Most, if not all, distros still use the original X11 impl by default. So syou get The X.Org Foundation in most cases.
  2. More and more distros are moving to Wayland. For Wayland it's not used at all.

I still think a separate field is not necessary. I'd like to implement this:

  1. If xcb_setup_vendor reports The X.Org Foundation, set protocol name to X11
  2. Otherwise, set protocol name to whatever xcb_setup_vendor reports ( in your case, XLibre )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really should've tested this on Xorg before submitting, I assumed the vendor string to be "Xorg". Sorry about that.

What do you think about WM: KWin (X11) [Xorg] and WM: KWin (X11) [XLibre]? Or maybe WM: KWin (X11/Xorg) and WM: KWin (X11/XLibre) ?

Copy link
Member

Choose a reason for hiding this comment

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

I prefer WM: KWin (X11) and WM: KWin (XLibre), so if a user uses the original X11 nothing changes.

Comment on lines 105 to 112
void* replyValue = malloc((size_t)length + 1);
memcpy(replyValue, data->ffxcb_setup_vendor(setup), (size_t) length);
((char*) replyValue)[length] = '\0';

if (ffStrSet(replyValue))
ffStrbufSetS(&result->serverVendor, replyValue);

free(replyValue);
Copy link
Member

Choose a reason for hiding this comment

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

ffStrbufSetNS(&result->serverVendor, (uint32_t) length, data->ffxcb_setup_vendor(setup))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@CarterLi
Copy link
Member

I prefer WM: KWin (X11) and WM: KWin (XLibre)

I will do this change myself.

@CarterLi CarterLi merged commit 1124342 into fastfetch-cli:dev Aug 11, 2025
CarterLi added a commit that referenced this pull request Aug 11, 2025
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