Get the icon path from the icon theme, for KDE, GNOME, in accordance to the freedesktop standards
npm install get-icon-pathAn alternative to hardcode tray for electron apps !
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.
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')
https://maxerbox.github.io/get-icon-path/
- Herited theme parsing
- KDE enabled theme detection