1.1.0 • Published 4 years ago

xdg-apps v1.1.0

Weekly downloads
64
License
-
Repository
github
Last release
4 years ago

node-xdg-apps

npm.io

Find the best app to open a file / thumbnailize it according to XDG Specifications

npm install xdg-apps

Usage

Find the right app to open a file

var Finder = require("xdg-apps");
var finder = new Finder();
finder.find("/path/to/my/file",function(err,launcher){
  //DO SOMETHING
});
//OR
  finder.find("/path/to/my/file").then(function(launcher){
    //DO SOMETHING
  }).catch(function(e){
    //ERROR
  });

If you want to really open the file afterward, take a look at desktop-launch.

Find a list of system apps

var Finder = require("xdg-apps");
var finder = new Finder();    
finder.apps.list().then(function(apps){
  //An array of parsed desktop entries
}).catch(function(e){
    //Handle errors
})

Options

finder takes only one parameter : the type of apps we want to search for. Possible values :

Other values wont throw an error but will produce undefined results.

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.0

6 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago