https://github.com/maxerbox/get-icon-path
Get the icon path from the icon theme, for KDE, GNOME, in accordance to the freedesktop standards
https://github.com/maxerbox/get-icon-path
Last synced: over 1 year ago
JSON representation
Get the icon path from the icon theme, for KDE, GNOME, in accordance to the freedesktop standards
- Host: GitHub
- URL: https://github.com/maxerbox/get-icon-path
- Owner: maxerbox
- License: isc
- Created: 2019-01-24T19:28:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-25T18:38:38.000Z (over 7 years ago)
- Last Synced: 2025-03-17T07:54:12.744Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://maxerbox.github.io/get-icon-path/
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get icon path from theme - freedesktop spec
An alternative to hardcode tray for electron apps !
## What's this
A lot of electron apps use hardcoded icons for tray icon, such as discord, rambox, etc...
This module allows those apps to use icons from icons themes installed for Gnome, KDE...
It was originally developped for rambox.
It's based on freedesktop icon theme specification.
## USAGE
`npm i --save get-icon-path`
```js
const { getIcon, getIconSync } = require('get-icon-path')
getIcon({ iconName: 'rambox-notification', size: 32 }, 'test.path', function (e) {
console.log(e, 'Promised')
})
getIcon('rambox-notification', 'test.path', function (e) {
//e will equals to 'test.path' if no icons is found
console.log(e, 'Promised')
})
var res = getIconSync({ iconName: 'rambox-notification' }, 'text.path')
console.log(res, 'Non promised')
```
## DOCUMENTATION
[https://maxerbox.github.io/get-icon-path/](https://maxerbox.github.io/get-icon-path/)
## TO DO
- Herited theme parsing
- KDE enabled theme detection