MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / getXdgCurrentDesktop

Function getXdgCurrentDesktop

emain/emain-platform.ts:215–223  ·  view source on GitHub ↗

* Gets the value of the XDG_CURRENT_DESKTOP environment variable. If ORIGINAL_XDG_CURRENT_DESKTOP is set, it will be returned instead. * This corrects for a strange behavior in Electron, where it sets its own value for XDG_CURRENT_DESKTOP to improve Chromium compatibility. * @see https://www.elect

()

Source from the content-addressed store, hash-verified

213 * @returns The value of the XDG_CURRENT_DESKTOP environment variable, or ORIGINAL_XDG_CURRENT_DESKTOP if set, or undefined if neither are set.
214 */
215function getXdgCurrentDesktop(): string {
216 if (process.env.ORIGINAL_XDG_CURRENT_DESKTOP) {
217 return process.env.ORIGINAL_XDG_CURRENT_DESKTOP;
218 } else if (process.env.XDG_CURRENT_DESKTOP) {
219 return process.env.XDG_CURRENT_DESKTOP;
220 } else {
221 return undefined;
222 }
223}
224
225/**
226 * Calls the given callback with the value of the XDG_CURRENT_DESKTOP environment variable set to ORIGINAL_XDG_CURRENT_DESKTOP if it is set.

Callers 3

runWaveSrvFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected