Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudhakar3697/node-gnome-favorite-apps
Get, Add, Remove Gnome favorite apps
https://github.com/sudhakar3697/node-gnome-favorite-apps
favorite-applications gnome gsettings
Last synced: about 2 months ago
JSON representation
Get, Add, Remove Gnome favorite apps
- Host: GitHub
- URL: https://github.com/sudhakar3697/node-gnome-favorite-apps
- Owner: sudhakar3697
- License: mit
- Created: 2020-04-02T09:56:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-03T15:37:24.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T02:55:43.691Z (3 months ago)
- Topics: favorite-applications, gnome, gsettings
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gnome-favorite-apps
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gnome-favorite-apps
### Why?
1) To Get, Add, Remove Gnome favorite apps
2) To group launcher .desktop files (Perform Add, Remove, Get .desktop files on Groups)
3) Add & Delete .desktop files, To either local (~/.local/share/applications) or global(/usr/share/applications)Usage 1
```
const GnomeFavoriteApps = require('gnome-favorite-apps');(async () => {
try {
console.log('Initially', await GnomeFavoriteApps.get());
await GnomeFavoriteApps.add('org.gnome.Nautilus.desktop', 'sqlitebrowser.desktop');
console.log('After adding', await GnomeFavoriteApps.get());
await GnomeFavoriteApps.remove('org.gnome.Nautilus.desktop', 'sqlitebrowser.desktop');
console.log('After removing', await GnomeFavoriteApps.get());
} catch (err) {
console.error(err.message);
}
})();```
Usage 2
```
const GnomeFavoriteApps = require('gnome-favorite-apps');(async () => {
try {
console.log('Intially', await GnomeFavoriteApps.getAppsByGroup('test12'));
console.log(await GnomeFavoriteApps.addAppsToGroup('test12', 'Test', ['ab.desktop', 'xy.desktop']));
console.log('After adding to group', await GnomeFavoriteApps.getAppsByGroup('test12'));
console.log(await GnomeFavoriteApps.removeAppsFromGroup('test12', ['ab.desktop', 'xy.desktop']));
console.log('After removing from group', await GnomeFavoriteApps.getAppsByGroup('test12'));
} catch (err) {
console.error(err.message);
}
})();```
Usage 3
```
const GnomeFavoriteApps = require('gnome-favorite-apps');(async () => {
try {
console.log(await GnomeFavoriteApps.addDesktopFiles('/home/user1/apps', ['ab.desktop', 'xy.desktop'], false));
console.log(await GnomeFavoriteApps.deleteDesktopFiles(['ab.desktop', 'xy.desktop'], false));
} catch (err) {
console.error(err.message);
}
})();```