1.0.3 • Published 4 years ago

linux-desktop v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

linux-desktop

npm

This is a module that indexes .desktop files on linux, and then allows you to query them using js. It also converts them to JSON, so

[Desktop Entry]
Name=Discord
GenericName=Internet Messenger
Exec=/usr/bin/discord
Icon=discord
Type=Application
Categories=Network;InstantMessaging;
Path=/usr/bin

becomes

{
  Name: Discord,
  GenericName: 'Internet Messenger',
  Exec: '/usr/bin/discord',
  Icon: '/usr/share/pixmaps/discord.png',
  Type: 'Application',
  Categories: [ 'Network', 'InstantMessaging' ],
  Path: '/usr/bin'
}

Example usage:

var linuxDesktop = require('linux-desktop');

linuxDesktop.indexItems()
	.then(() => {
        console.log(
			linuxDesktop.refineEntry(
				linuxDesktop.findByCommand('discord')
			)
		)
	})
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago