Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t1st3/desktop-env
Detect which desktop environment is run in the current session
https://github.com/t1st3/desktop-env
cinnamon desktop-environment detect gnome javascript kde lxde mate sugar unity xfce
Last synced: 3 months ago
JSON representation
Detect which desktop environment is run in the current session
- Host: GitHub
- URL: https://github.com/t1st3/desktop-env
- Owner: t1st3
- License: mit
- Created: 2016-08-17T16:16:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T09:21:00.000Z (over 4 years ago)
- Last Synced: 2024-09-17T19:54:47.496Z (5 months ago)
- Topics: cinnamon, desktop-environment, detect, gnome, javascript, kde, lxde, mate, sugar, unity, xfce
- Language: JavaScript
- Size: 83 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# desktop-env [![Build Status Travis](https://travis-ci.org/t1st3/desktop-env.svg?branch=master)](https://travis-ci.org/t1st3/desktop-env)
> Detect which [desktop environment](https://en.wikipedia.org/wiki/Desktop_environment) is run in the current session
## Install
```
$ npm install --save desktop-env
```## Usage
```js
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## Related
* [is-cinnamon](https://github.com/t1st3/is-cinnamon) | Check if the current session runs [Cinnamon desktop](https://github.com/linuxmint/Cinnamon).
* [is-gnome](https://github.com/t1st3/is-gnome) | Check if the current session runs [Gnome desktop](https://www.gnome.org/).
* [is-kde](https://github.com/t1st3/is-kde) | Check if the current session runs [KDE desktop](https://www.kde.org/).
* [is-lxde](https://github.com/t1st3/is-lxde) | Check if the current session runs [LXDEdesktop](http://lxde.org/).
* [is-mate](https://github.com/t1st3/is-mate) | Check if the current session runs [Mate desktop](http://mate-desktop.com/).
* [is-sugar](https://github.com/t1st3/is-sugar) | Check if the current session runs [Sugar desktop](https://www.sugarlabs.org/).
* [is-unity](https://github.com/t1st3/is-unity) | Check if the current session runs [Unity desktop](https://unity.ubuntu.com/).
* [is-xfce](https://github.com/t1st3/is-xfce) | Check if the current session runs [XFCE desktop](https://www.xfce.org/).## License
MIT © [t1st3](https://t1st3.com)