Skip to content

Add Wayland on Mac/Darwin support#2397

Open
M0chaCat wants to merge 1 commit into
fastfetch-cli:devfrom
M0chaCat:dev
Open

Add Wayland on Mac/Darwin support#2397
M0chaCat wants to merge 1 commit into
fastfetch-cli:devfrom
M0chaCat:dev

Conversation

@M0chaCat

Copy link
Copy Markdown

Summary

Adds Wayland on MacOS support via XDG variables :3

see Wawona and iLand.

Related issue (required for new logos for new distros)

N/A

Changes

  • MacOS displayserver detection

Screenshots

CleanShot 2026-06-11 at 12 09 36

Checklist

  • I have tested my changes locally.

Adds Wayland on MacOS support via XDG variables :3
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@aspauldingcode

Copy link
Copy Markdown

+1 - This PR is significant to me, as I’m the developer of the Wawona Wayland compositor.

We have successfully implemented DRM/KMS and nested Wayland rendering on macOS. However, Fastfetch’s reporting as “aqua de/wm” is highly inaccurate in this context. This PR helps improve the accuracy of screenshots taken from Wayland clients on macOS. I look forward to it being merged upstream.

@M0chaCat

Copy link
Copy Markdown
Author

quartz*

if (getenv("WAYLAND_DISPLAY")) { // Is user on wayland?
const char *desktop = getenv("XDG_CURRENT_DESKTOP");

ffStrbufSetStatic(&ds->wmProcessName, "Wayland");

@CarterLi CarterLi Jun 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does this mean? Wayland is a protocol. There's no process named Wayland.

const char *desktop = getenv("XDG_CURRENT_DESKTOP");

ffStrbufSetStatic(&ds->wmProcessName, "Wayland");
if (desktop && *desktop) { // If user is on a custom WM that sets XDG_CURRENT_DESKTOP?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AFAIK XDG_CURRENT_DESKTOP is the name of the current desktop environment, such as KDE Plasma. While kwin is the name of Window manager (or Wayland compositors, strictly speaking)

In fastfetch they are different modules.

@CarterLi

CarterLi commented Jun 12, 2026

Copy link
Copy Markdown
Member

I don't like this. Setting an environment variable doesn't magically make you running in wayland. In the implementation of Linux port, we actually connect the wayland protocol and query screen resolutions (in this case, resizing the compositor window should change what Display reports), refresh rates and the name of Wayland compositors. This implementation feels cheap and dirty to me.

@CarterLi

Copy link
Copy Markdown
Member

This PR helps improve the accuracy of screenshots taken from Wayland clients on macOS.

Not at all. This PR doesn't touch other parts. Fastfetch will be reporting as “aqua de/wm”.

BTW, is fastfetch wrong? Does your compositor replace quartz? Instead, your compositor is fully built upon quartz (CoreGraphics, Cocoa, etc), isn't it?

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