1

I created a custom launcher file to launch a program and show progress percentage using notify-send. But I want to show that percentage along my launcher icon. One way I can do this is by creating many icons for all percentages and change icon in my .desktop file. Is there easy way to do this.

160763310024.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=JioFi Battery Notifier
Comment=
Exec=~/bin/jiofi_battery_notifier
Icon=~/Desktop/Files/Icons/jio.png
Path=
Terminal=false
StartupNotify=false

1 Answer 1

1

First Method:

You can achieve this using SVG Image. SVG files can be used as icons for .desktop entry and text can be easily updated in them.

<svg height="100" width="100">
<text x="0" y="100" fill="red" font-weight="bold" font-size="100">XX</text>
</svg>

Update Icon in .desktop file with path to SVG File

Now when updating progress then change percentage(XX) into svg file and update .desktop file.

If you want to show along an image, then you can do this in two ways

  1. Create svg with that image and text
  2. Use second launcher with percentage text beside this launcher

Second Method:

Create second launcher beside this launcher, and in advanced properties of launcher, select "Show label instead of Icon" Now when you will update Name of launcher in .desktop file, it will be updated here as text.

Third Method

Create only single launcher and in advanced properties of launcher, select "Show label instead of Icon". Use emoji in name for show image with text, like

Name=40%🔋

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .