Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

desktop-env

t1st326MIT3.0.1

Detect which desktop environment is run in the current session

kde, gnome, mate, cinnamon, xfce, lxde, unity, sugar, desktop, environment, detect

readme

desktop-env Build Status Travis

Detect which desktop environment is run in the current session

Install

$ npm install --save desktop-env

Usage

const desktopEnv = require('desktop-env');

desktopEnv().then(data => {
  console.log(data);
  //=> Cinnamon, Gnome, KDE, LXDE, Mate, Sugar, Unity, XFCE, N/A
});

API

desktopEnv()

Returns a Promise that resolves one of the following:

  • Cinnamon
  • Gnome
  • KDE
  • LXDE
  • Mate
  • Sugar
  • Unity
  • XFCE
  • N/A if none of the above

License

MIT © t1st3