maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop (https://talk.maemo.org/showthread.php?t=62091)

AlMehdi 2010-09-11 13:14

[Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
4 Attachment(s)
A gui has been made by D-livil so we are just waiting for it to be released. If you can't wait do the below in terminal.

The gui is finished! Go to this thread instead. Do not do the below.. it is not necessary any longer thanks to D-livils work.







Download (to /home/user/MyDocs/)
hildon-home.launch1.tar.gz (modified by CepiPerez)

Then extract it.
Code:

tar xzvf /home/user/MyDocs/hildon-home.launch1.tar.gz
Move to right dir
Code:

mv /home/user/MyDocs/hildon-home.launch1 /usr/bin/
Mount the extracted hildon-home.launch1 and bind it. This will be undone if reboot.
Code:

sudo gainroot
mount -o bind /usr/bin/hildon-home.launch1 /usr/bin/hildon-home.launch

XX is the size of your icon. I use 42.
Code:

gconftool -s /apps/osso/hildon-home/task-shortcuts-size -t int XX
1 for visble icon background, 0 for hidden icon background.
Code:

gconftool -s /apps/osso/hildon-home/task-shortcuts-back -t int X
XX is the size of you bookmark. I use 100.
Code:

gconftool -s /apps/osso/hildon-home/task-bookmarks-size -t int XX
Restart hildon-home to make the changes visible
Code:

dsmetool -k /usr/bin/hildon-home
dsmetool -t /usr/bin/hildon-home


!! There is a better way doing this now. If you continue reading in the thread you will come to this post by CepiPerez. This will also allow you to change the bookmarks. !!
I have written how it works above...

Do not do the below. It is the old way....

The past week i have been working on a program to resize the program icons. It is pretty basic but works. It is still in a early release state but i have tried it and could not find any big bugs. This is the second program i have made so the code could probably look better.

Everything is done in the shell (terminal). I have not yet learned how to package it to deb. Also, it does not have a real gui. I have zenity helping me with that. To give an illusion of a gui. It works pretty well but is not as good looking as a real gui.

The program will ask you two questions. How big you want the background image and how big you want the foreground image to be. It will then download the custom hildon-home that Matan made and install it. It will ask you if you want to hold it (so it wont get replaced by the old during an upgrade). Lastly it finds which programs you have on the desktop and resize the icons to the values you set in the first step. The last step will take a minute or so.

The change will only affect your current theme and some of the stock icons that are not covered by the theme. If you wish to change the theme it is important to first uninstall to reset all the values. Desktop Shortcut Resizer finds your current icons by the name of your theme. It will not be succesful if you change it and then uninstall.

The size could be set between 0-256 pixels. I have put the default background value to 62 pixels and 42 pixels for the foreground.

The install process:
1. Download the program/script to your n900 (i.e. /home/user/MyDocs/)
Desktop Shortcut Resizer v0.1-beta14
2. Open terminal and:
1. sudo gainroot
2. sh /home/user/MyDocs/desktop-shortcut_0.1beta14.sh -i
3. desktop-shortcut -b
4. desktop-shortcut -L
5. done!


If you want to see all the commands. Just write as root
1. desktop-shortcut

You might want to make a test run first to see if it finds all your program icons.
1. desktop-shortcut -t

I have configured the program to find if you have any missing dependencies and if not install them for you. You will need wget, zenity and imagemagick. It will take a backup on your original icons during the install. In case you decide to uninstall the program later. If so it will reset to your original icons.

I encourage you to also take a normal backup. Which will happen if you do the "desktop-shortcut -b" command.



Please tell me what you think. Is it good? should something be done differently? Did i spell something wrong?

Some pictures below which shows the process.

matts76 2010-09-11 13:50

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Looks wicked, cant wait to get home and test it, is there any chance this app could also be used to resize the bookmark shortcuts too?
also i've set my shortcut backgrounds to invisable except when clicked, will this change that or will it modify them as they are?
Thanks

Matt

AlMehdi 2010-09-11 14:08

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by matts76 (Post 813420)
Looks wicked, cant wait to get home and test it, is there any chance this app could also be used to resize the bookmark shortcuts too?
also i've set my shortcut backgrounds to invisable except when clicked, will this change that or will it modify them as they are?
Thanks

Matt

No, it will not. It is all based on Matans hildon-home. And to my knowledge he just made it possible to change the application shortcuts. If someone would add this function to the hildon-home it would be pretty easy to implement to the program. Same goes for the contact shortcuts.

It will change the background to the size of your likening.. no matter if it is visible or not. As you can see on my screen dump.. the clickable area is contained to the background image.

navsin 2010-09-11 15:03

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
When I run the sh /home/user/MyDocs/filename -i command as given in the 2nd step above, xterm gives an output "incompatible theme"... Any workarounds? I have MohammadAG's modified hildon desktop installed. Can that be the reason?

AlMehdi 2010-09-11 15:17

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by navsin (Post 813464)
When I run the sh /home/user/MyDocs/filename -i command as given in the 2nd step above, xterm gives an output "incompatible theme"... Any workarounds? I have MohammadAG's modified hildon desktop installed. Can that be the reason?

No, you are probably running one of the default themes. They have a different looking ".desktop" file. I will fix this in a later version but have not had time to do it yet.

Edit: By the way.. this will change MohammadAG's hildon-home to Matans.

navsin 2010-09-11 15:20

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
I'm running the Pleegoblue theme, which is a part of the Black Plastic theme package of D-livil.

AlMehdi 2010-09-11 15:27

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by navsin (Post 813472)
I'm running the Pleegoblue theme, which is a part of the Black Plastic theme package of D-livil.

I will check it up.. it is possible to edit the script on row 26-29 and comment that section out. I am not sure what that would do. It might not find all the icons.

So if you want to try it.. do a "desktop-shortcut -t" to test what it finds. A test will not change anything.

AlMehdi 2010-09-11 17:59

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Looks like Black Plastic uses the original icon-theme. Should not be too difficult.. coming with a new version shortly.

AlMehdi 2010-09-11 18:15

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
I have now updated to beta6. It should work with the Black Plastic and default themes. Download the new script and try.. i did and it worked as expected.

AlMehdi 2010-09-11 21:37

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
New update to beta7. I had forgot to make sure the extras-devel repo was active.

AlMehdi 2010-09-12 01:00

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Found a bug. It will not find "dropn900" cause the file it looks in starts with leading spaces. Need to figure out how to compensate that in the awk command.

c:drive 2010-09-12 01:17

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
1 Attachment(s)
Now i can have all apps in single desktop,Thank-x guys

AlMehdi 2010-09-12 08:21

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Great to hear c:drive :)

I have solved the "dropn900" problem yesterday.. but still have problem whit finding the "fapman" icon. So i have not released the new version yet. I will do so as soon as i can.

d-iivil 2010-09-12 08:29

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 813551)
Looks like Black Plastic uses the original icon-theme. Should not be too difficult.. coming with a new version shortly.

Noup, Plastic uses it's own icon theme, but does not include icons for applications (they are automaticly taken from hicolor -icon theme). I think your script should anyway (no matter what icon theme is deined in gtkrc file) resize the hicolor icons ALSO because that's where 3rd party programs places their icons (usually).

Haven't looked through your script, it might do this already.

etuoyo 2010-09-12 09:38

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Would be great if this could be extended to resize contacts shortcuts. That is what I need to resize above all else.

I do not have my n900 at the moment (out for repairs) so cannot try this out at the moment. Just a quick question though - - use transparent short cut backgrounds. Will this retain the transparent backgrounds?

AlMehdi 2010-09-12 10:39

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by D-Iivil (Post 813927)
Noup, Plastic uses it's own icon theme, but does not include icons for applications (they are automaticly taken from hicolor -icon theme). I think your script should anyway (no matter what icon theme is deined in gtkrc file) resize the hicolor icons ALSO because that's where 3rd party programs places their icons (usually).

Haven't looked through your script, it might do this already.

Thats right! It looks for the programs on the desktop. If they lay in hicolor.. it will change them there. If they have a custom made in another theme it will change them too. So sometimes it will change two icons and sometimes just one.. depending on the theme.

edit: When i tried the Black Plastic theme it did not change my icons (except the background). They where all from hicolor. When i looked at the "/etc/hildon/theme/index.theme" it said "default" which normally mean the stock icons. Does this change if you change something in the Black Plastic config?

AlMehdi 2010-09-12 10:46

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by etuoyo (Post 813944)
Would be great if this could be extended to resize contacts shortcuts. That is what I need to resize above all else.

I do not have my n900 at the moment (out for repairs) so cannot try this out at the moment. Just a quick question though - - use transparent short cut backgrounds. Will this retain the transparent backgrounds?

I would love to have that too. But the hildon-home i am using was made by Matan. I have no knowledge about hacking that. It might not even be in hildon-home you can set this.

The transparent background is just an image like all the others. Desktop Shortcut Resizer should treat it the same way. It should resize it.. but it will still be transparent and not be visible. :)

navsin 2010-09-12 12:13

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
I tried beta7 today... it seems there was some error in installing hildon-home by Matan. The script installation completed though. When I changed the icon and background size, the icon size changes but not the background image for pressed mode. The output from xterm was:

/home/user # desktop-shortcut -l
Executing the script!
/usr/sbin/desktop-shortcut: line 180: wget: not found
dpkg: error processing hildon-home_0.3.66-2+0m5_armel.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
hildon-home_0.3.66-2+0m5_armel.deb
rm: cannot remove '/tmp/hildon-home_0.3.66-2+0m5_armel.deb': No such file or directory
...
Dowload and installation successful.


Can you help please?

AlMehdi 2010-09-12 13:21

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
A new version beta9 have been released. Download it from the first post. It will now find both Dropn900 and fapman.

AlMehdi 2010-09-12 13:26

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by navsin (Post 814064)
I tried beta7 today... it seems there was some error in installing hildon-home by Matan. The script installation completed though. When I changed the icon and background size, the icon size changes but not the background image for pressed mode. The output from xterm was:

/home/user # desktop-shortcut -l
Executing the script!
/usr/sbin/desktop-shortcut: line 180: wget: not found
dpkg: error processing hildon-home_0.3.66-2+0m5_armel.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
hildon-home_0.3.66-2+0m5_armel.deb
rm: cannot remove '/tmp/hildon-home_0.3.66-2+0m5_armel.deb': No such file or directory
...
Dowload and installation successful.


Can you help please?

It looks like you didn't install wget. Did you get the dialog asking you to install it? If not maybe you did not install Zenity in the first step.. you need to choose "y" in the terminal to install Zenity.

d-iivil 2010-09-12 13:48

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 813991)
Thats right! It looks for the programs on the desktop. If they lay in hicolor.. it will change them there. If they have a custom made in another theme it will change them too. So sometimes it will change two icons and sometimes just one.. depending on the theme.

edit: When i tried the Black Plastic theme it did not change my icons (except the background). They where all from hicolor. When i looked at the "/etc/hildon/theme/index.theme" it said "default" which normally mean the stock icons. Does this change if you change something in the Black Plastic config?

Don't look into index.theme. Icon theme is defined in gtkrc -file located at /etc/hildon/theme/gtk-2.0/

Anyways, restore didn't work for me (version 7), got bunch of file not found -errors.

navsin 2010-09-12 13:55

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 814105)
It looks like you didn't install wget. Did you get the dialog asking you to install it? If not maybe you did not install Zenity in the first step.. you need to choose "y" in the terminal to install Zenity.

It asked me to install zenity and imagemagic. I installed both. It never asked me to install wget.

navsin 2010-09-12 15:22

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
2 Attachment(s)
OK... I installed wget separately and launched the script then. Seems to be working much better now, except for the following two issues:

1) In case of Black Plastic theme when I am using custom icons option, the icon size for phone application does not change (see screenshot 1)

This happens probably because the custom icons for blackplastic are in different folder than hicolor

2) One of my icons seems to have been cut. (See screenshot 2, terminal icon - laptop). I'm using 94 size for icons and 128 for backgrounds.

AlMehdi 2010-09-12 15:32

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by D-Iivil (Post 814118)
Don't look into index.theme. Icon theme is defined in gtkrc -file located at /etc/hildon/theme/gtk-2.0/

Anyways, restore didn't work for me (version 7), got bunch of file not found -errors.

Thanks! Will look into that. As soon as i get home.

Did you do a restore or uninstall? What did --test give you?

AlMehdi 2010-09-12 15:37

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Navsin: I will check in to the black plastic again. It seams like it is not working as i thought. But D-livil is great as always :)

2) You might need to increase the background a bit

BTW.. awesome destop you got there.

d-iivil 2010-09-12 15:47

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 814171)
Thanks! Will look into that. As soon as i get home.

Did you do a restore or uninstall? What did --test give you?

Test went fine without errors, so did the actual resize function. Restore gave file not found errors pointing to find -command. Uninstall didn't give errors but it didn't restore icon backgrounds. Sorry I didn't write the exact errors down :(

AlMehdi 2010-09-12 16:05

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by D-Iivil (Post 814186)
Test went fine without errors, so did the actual resize function. Restore gave file not found errors pointing to find -command. Uninstall didn't give errors but it didn't restore icon backgrounds. Sorry I didn't write the exact errors down :(

Hmm.. that was strange. It worked when i tested it.. need to see if i forgot something. Your original icons should have ".orig" file endings and the backup got ".dsr". In case you have to do it manually. I will try to pin point the bug thoug.. so a restore should work later.

d-iivil 2010-09-12 16:16

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 814200)
Hmm.. that was strange. It worked when i tested it.. need to see if i forgot something. Your original icons should have ".orig" file endings and the backup got ".dsr". In case you have to do it manually. I will try to pin point the bug thoug.. so a restore should work later.

I just ran the Plastic Theme Setup once since it restores all images for selected scheme from Plastic Pack's own "backup".

I remember that one "not found" messages was like "/usr/share/icons/*: Not found"

I think that the extra : was the issue.

AlMehdi 2010-09-12 17:00

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by D-Iivil (Post 814210)
I just ran the Plastic Theme Setup once since it restores all images for selected scheme from Plastic Pack's own "backup".

I remember that one "not found" messages was like "/usr/share/icons/*: Not found"

I think that the extra : was the issue.

The find string was not correct. I could reproduce the bug. So will release beta10 with the bugfix. I tried it and it should work now.

download Beta10 from the first post.

rolan900d 2010-09-12 17:07

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
it won't install for me.
some syntax error....

AlMehdi 2010-09-12 17:25

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by rolan900d (Post 814242)
it won't install for me.
some syntax error....

Could you tell me more? A syntax error of what?

d-iivil 2010-09-12 17:28

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 814239)
The find string was not correct. I could reproduce the bug. So will release beta10 with the bugfix. I tried it and it should work now.

download Beta10 from the first post.

Restoring seems to work now (it restored the icons, not icon backgrounds), but it still won't resize icons that are under custom icon folder defined @ gtkrc -file.

rolan900d 2010-09-12 17:32

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by AlMehdi (Post 814251)
Could you tell me more? A syntax error of what?

beta9 gave me errors

beta10 worked....

rolan900d 2010-09-12 17:37

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
how to restore it like it was?

AlMehdi 2010-09-12 17:42

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by rolan900d (Post 814255)
beta9 gave me errors

beta10 worked....

Nice to hear ;)

If you uninstall it.. it should reset everything.

rolan900d 2010-09-12 17:47

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
I did this:

desktop-shortcut -r

desktop-shortcut -u

my icons are back but there is a small black box in the left corner??

rolan900d 2010-09-12 18:08

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
apt-get remove zenity

that uninstalled it....

apt-get remove imagemagic

that won't work

AlMehdi 2010-09-12 18:24

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by rolan900d (Post 814279)
apt-get remove zenity

that uninstalled it....

apt-get remove imagemagic

that won't work

Ahh.. didn't think of that. Need to put it in the script. I think you missed the "k".

Try "dpkg -P imagemagick"

AlMehdi 2010-09-12 18:25

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by rolan900d (Post 814266)
I did this:

desktop-shortcut -r

desktop-shortcut -u

my icons are back but there is a small black box in the left corner??

Could you do a screen dump on that? (ctrl+shift+p)

AlMehdi 2010-09-12 18:30

Re: [Announce] Desktop Shortcut Resizer - It will resize your program icons on the desktop
 
Quote:

Originally Posted by D-Iivil (Post 814254)
Restoring seems to work now (it restored the icons, not icon backgrounds), but it still won't resize icons that are under custom icon folder defined @ gtkrc -file.

I will try to incorporate tha gtkrc as soon as i can. Haven't have time for that yet.

hmm... not the backgrounds. Might be a thing with gtkrc too. That is also something i fetch from the index.theme file. I got some hours to look this up now. Will see if i can figure it out.


All times are GMT. The time now is 22:00.

vBulletin® Version 3.8.8