GitShow/sindresorhus/is-wayland
sindresorhus

is-wayland

Check if the current Linux session is using Wayland

by sindresorhus
Star on GitHubForknpm

JavaScript

21 stars2 forks1 contributorQuiet · 11mo agoSince 2025v0.1.0MIT

Meet the team

See all 1 on GitHub →
sindresorhus
sindresorhus2 contributions

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
thegoodduck
Made the script a lot more edge case resistantMergedPR

Added edge cases for the script in cases if the user is not on Linux, or if using XWayland, and make if the script is unsure returns false as to not break app that require Wayland only API calls. Github Copilot Summary: This pull request significantly refactors and extends the Wayland detection logic in . The main change is the introduction of a new, more robust function, which allows for easier testing and greater flexibility by accepting environment and platform parameters. The default export now delegates to this function, and basic sanity tests are included for verification. Wayland detection improvements: Introduced a new function that checks multiple environment variables and runtime indicators to determine if the current session is running under Wayland, making detection more robust and testable. Enhanced detection logic to consider additional environment variables (, , , ), the contents of the directory, and to exclude WSL environments. Testing and flexibility: Added inline sanity tests using Node's module, which run when the script is executed directly, ensuring correctness of the detection logic. Refactored the default export to use the new detection function and support custom file system and environment accessors, improving testability and modularity. Compatibility improvements:**

thegoodduck · 10mo ago
Structured data for AI agents

Repository: sindresorhus/is-wayland. Description: Check if the current Linux session is using Wayland Stars: 21, Forks: 2. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v0.1.0 (11mo ago). Open PRs: 0, open issues: 0. Last activity: 11mo ago. Community health: 71%. Top contributors: sindresorhus.

·@ofershap

Replace github.com with gitshow.dev