-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add an icon in the tray ? #56
Comments
Maybe use an emoji? https://emojipedia.org/battery https://emojipedia.org/computer-mouse |
If you really want an icon, you can copy https://github.com/Zren/plasma-applet-commandoutput/blob/master/package/metadata.json#L25 Then in https://github.com/Zren/plasma-applet-commandoutput/blob/master/package/contents/ui/main.qml#L346 Text {
id: output
width: parent.width
height: parent.height
...
} to RowLayout {
width: parent.width
height: parent.height
Kirigami.Icon {
source: 'battery-full'
}
Text {
id: output
// width: parent.width
// height: parent.height
...
}
} Install |
Hi @Zren Thank you a lot for your help, it works great ! i can display an icon of my choice. Nonetheless, i have difficulties to find the right parameter in main.qml to set the correct width. I have tried to play with itemWidth, preferredWidth, but it's stucked to the same default width apparently so that the icon is displayed very well but the percentage overlaps the date/time, like so: Do you know how to set the width ? |
Hello,
Thanks for your applet, it allows me to display the battery level, in percentage, of my mouse (a razer one) as there is no possibility with openrazer/polychromatic.
Now, when i was using xfce, i had also the possibility with their genmon (generic monitor) to run a script like you did, but also to modify the appearance of what is displaying in the tray with some kind of pango markup, like adding an icon next to the text, changing the font, background color and so on.
In any way, is there a possibility to add an icon, say, next to my percentage ? I have tried with no success until now.
Thank you
The text was updated successfully, but these errors were encountered: