Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#11
ok, probably no way to do this without restart of lipstick..
 
fravaccaro's Avatar
Posts: 52 | Thanked: 143 times | Joined on Mar 2013 @ Rome, Italy
#12
Originally Posted by coderus View Post
delete desktop, call desktop-file-install, create desktop, call desktop-file-install is the only way.
Hi, how can I actually implement this?

My script doesn't update the icon.

Code:
sh /usr/share/harbour-dynclock/script.sh
cp /usr/share/harbour-dynclock/clock.png /usr/share/themes/jolla-ambient/meegotouch/z1.0/icons/icon-launcher-clock.png
desktop-file-install /usr/share/applications/jolla-clock.desktop
rm -rf /usr/share/applications/jolla-clock.desktop
echo '[Desktop Entry]
Type=Application
Name=Clock
X-MeeGo-Logical-Id=clock-ap-name
X-MeeGo-Translation-Catalog=clock
Icon=icon-launcher-clock
Exec=invoker -s --type=silica-qt5 /usr/bin/jolla-clock
Comment=Jolla clock
X-Desktop-File-Install-Version=0.20' > /usr/share/applications/jolla-clock.desktop
desktop-file-install /usr/share/applications/jolla-clock.desktop
__________________
Jolla Community Italia admin
Ping me @fravaccaro | fravaccaro.wordpress.com
When I don't blog, I attempt to other people' phone integrity with DynCal, DynClock and Theme pack support.
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#13
Probably a bug in lipstick so it doesnt reload icon. You can fill a bug to tjc or nemomobile github repo.
__________________
Telegram | Openrepos | GitHub | Revolut donations

Last edited by coderus; 2015-09-27 at 15:45.
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#14
Originally Posted by fravaccaro View Post
Hi, how can I actually implement this?
My script doesn't update the icon.
I use it this way... For example 2 scripts:
1. active.sh:
Code:
#!/bin/bash

rm -f /usr/share/icons/hicolor/86x86/apps/betterperformance-on.png
rm -f /usr/share/applications/openrepos-betterperformance.desktop
/usr/share/openrepos-betterperformance/update-icon
su -l nemo -c "python /usr/share/openrepos-betterperformance/notifier1.py"
cp -f /usr/share/openrepos-betterperformance/betterperformance-off.png /usr/share/icons/hicolor/86x86/apps
echo '[Desktop Entry]
Type=Application
Name=Inactive
Exec=/usr/share/openrepos-betterperformance/betterperformance-root
Icon=betterperformance-off
X-Desktop-File-Install-Version=0.20' > /usr/share/applications/openrepos-betterperformance.desktop
/usr/share/openrepos-betterperformance/update-icon
2. inactive.sh:
Code:
#!/bin/bash

rm -f /usr/share/icons/hicolor/86x86/apps/betterperformance-off.png
rm -f /usr/share/applications/openrepos-betterperformance.desktop
/usr/bin/desktop-file-install /usr/share/applications/openrepos-betterperformance.desktop
su -l nemo -c "python /usr/share/openrepos-betterperformance/notifier2.py"
cp -f /usr/share/openrepos-betterperformance/betterperformance-on.png /usr/share/icons/hicolor/86x86/apps
echo '[Desktop Entry]
Type=Application
Name=Active
Exec=/usr/share/openrepos-betterperformance/betterperformance-root
Icon=betterperformance-on
X-Desktop-File-Install-Version=0.20' > /usr/share/applications/openrepos-betterperformance.desktop
/usr/bin/desktop-file-install /usr/share/applications/openrepos-betterperformance.desktop
Most of the times it working without any problem, but sometimes it not updating, probably like Coderus said - problem in lipstick, in this case -> restart lipstick.
 

The Following User Says Thank You to Schturman For This Useful Post:
fravaccaro's Avatar
Posts: 52 | Thanked: 143 times | Joined on Mar 2013 @ Rome, Italy
#15
Thank you so much to the both of you!

I managed to get my icon updated, but I have noticed that the icon is updated only if desktop-file-install triggers a file with a different name, so in my case I had to rename the new icon with something different from the previous icon of the desktop file otherwise it's not updated.

So if I have 1.png and 2.png and I want to re-apply 1.png to my desktop file I must run the script applying 2.png first and then I can apply 1.png, if I just re-apply 1.png it doesn't work (ofc, unless I refresh the whole homescreen).

Well, it's kinda weird and convoluted, I don't really know why it happens and surely don't have enough knowledge to dig into this, that's been just some emprirical observations.
__________________
Jolla Community Italia admin
Ping me @fravaccaro | fravaccaro.wordpress.com
When I don't blog, I attempt to other people' phone integrity with DynCal, DynClock and Theme pack support.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#16
Yep, known... This is a reason I use different icons and always delete icon at beginning of my script and copy icon before creating new .desktop file.
 

The Following User Says Thank You to Schturman For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:47.