English Amiga Board


Go Back   English Amiga Board > Requests > request.Apps

 
 
Thread Tools
Old 22 May 2023, 11:26   #1
trixster
Guru Meditating
 
Join Date: Jun 2014
Location: England
Posts: 2,337
Utility to save desktop icon positions?

Hi,

Anyone know of a utility which can save and manage the positions of all the icons on the desktop and then allow you to load different profiles? So if you were to change desktop resolution you could load the icon layout profile for that larger (or smaller) desktop area. A quick look through aminet has failed me.

Thanks

Last edited by trixster; 22 May 2023 at 11:35.
trixster is offline  
Old 22 May 2023, 12:33   #2
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
Well... the icon positioning information are stored inside the .info file of each icon.
I thought that the fantactic tool ProcessIcon (http://aminet.net/package/util/wb/ProcessIcon) by Dirk Stoecker would have had such sort of feature but from the Doc I only found that it has an Unsnap feature among the others.

If noone else has a more clever idea, what I'd do is to copy every icon into a temporary storage drawer (for example SYS:Icons-800x600)
Then running a script that depending on the resolution deletes and copies the icons from that storage drawer to the original location OR delete and MakeLink the icons from the storage drawer into actual location.

Edit: I'm under the impression that the UpdateIcon tool by Olaf Barthel will be good for the job: http://aminet.net/package/util/wb/updateicon

Last edited by mfilos; 22 May 2023 at 12:52.
mfilos is offline  
Old 22 May 2023, 13:11   #3
Snoopy1234
Registered User
 
Snoopy1234's Avatar
 
Join Date: Apr 2022
Location: Australia
Age: 51
Posts: 836
Deficons displays icon sets from stored locations. IDK about multiple resolutions but researching iconlib authors might help.
Snoopy1234 is offline  
Old 22 May 2023, 13:15   #4
trixster
Guru Meditating
 
Join Date: Jun 2014
Location: England
Posts: 2,337
Good suggestions, thanks folks
trixster is offline  
Old 31 May 2023, 17:16   #5
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
I was using a button in DirOpus to scan my SYS: for icons and create an archive from that list. Which I then simply could extract back whenever I wanted. And I have actually used it to easily switch between icon sets like MagicWB and Clover Icons. Which resembles using different screen modes.

I've quickly wrote a script which can do this and creates an icon which can be used to install the backup. It obviously needs to have LhA installed somewhere in your path.
It also needs the original commands IconX and RequestChoice.
Included are the archives fdate (to create a unique filename), ProcessIcon (to unsnap the icon for each archive. Not really needed but without it, the icons will overlap) and MSys (for its Reboot command).
The script will check if it can find the commands and extract them if it couldn't find them.
For example WB3.2 already has an Reboot command in C, so MSys won't be extracted.
The extracted files are stored within the IconSaver directory, so it is possible to delete that directory and everything is gone.

The problem with using archives as storage is that it might be possible to also store icons which have been deleted later. So you might end up with icons which are obsolete if an archive is restored. I might look into creating a better method later.

Hope it is useful.

Edit: I've looked for an alternative way but it doesn't seem that there is a way to avoid copying obsolete icons without causing other issues.
I've used IconCopy before and it has an option to check if the actual file for an icon exist but since there are icons without files (like System/Shell, all of the def_#? icons and disk icons) those won't be replaced. Which means I don't think there is a way around this problem.

I do have updated the script but I don't think it is actually worth uploading. It has the benefit that archives can easily be deleted since it uses CLICon to extract the files instead of a separate script. So deleting the icon will delete the archive, now it just deletes the script. But it also requires CLICon and FilePart from 0Utils. But it doesn't need ProcessIcon anymore. Maybe I can optimize it more.

Edit2: Found a workaround for obsolete icons. See below for new version.

Last edited by EctoOne; 31 May 2023 at 23:01.
EctoOne is offline  
Old 31 May 2023, 22:42   #6
Matt_H
Registered User
 
Matt_H's Avatar
 
Join Date: Jul 2008
Location: Boston, MA
Posts: 943
IconPos is a CLI tool to adjust, as the name implies, icon positions. It’s on the OS Install disks for 2.x-3.1 (and possibly later) but doesn’t actually get copied to C: since it’s only used in the installation process.

So you could conceivably set up different scripts that call IconPos for each of your (most important) icons, different versions for different resolutions. You could even make loading different Screenmode presets part of the same script. The downside is that since you have to do each icon individually it’s not really practical for a system-wide change, but if you just want to adjust a few essential icons this might be the way to go. None of your tooltypes or other icon data get lost/overwritten this way.
Matt_H is offline  
Old 31 May 2023, 22:57   #7
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
Fantastic idea @EctoOne
Will check your script and adjust accordingly. \o/
mfilos is offline  
Old 31 May 2023, 22:59   #8
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
I've updated my script and it now checks beforehand if the target exist before it attempts to copy the icon.
It also uses IconCopy, so new/changed tooltypes won't be overwritten.
It does have some more requirements regarding needed commands but they are included and in my opinion well worth the effort.
And I added a doc which should explain everything noteworthy.

Edit: I just noticed that the initial setup for the required commands isn't perfect. It currently only checks if a command is in PATH which isn't the case for some commands. So it will extract them every time. It doesn't cause any problems but it takes a bit longer. I will change that later.

Edit2: Attached the fixed version. Now the dependency test should be correct. At least it worked for me when I ran it using a plain WB3.1 disk.
And if I remember correctly, there might have been an error in v2 where the Rep command was extracted in the wrong directory.

Edit3: Another small fix, script now properly works with renamed archives

Edit4: Added an option to select a method for the restoration process.
Since switching to use IconCopy didn't actually save the positions, it is now possible to directly extract the backup and overwrite the icons.
Remember, this brings back the issues with restoring obsolete and updated icons.

Edit5: Changed the restoration process to use the COPY command instead of extracting the files directly to SYS. This fixes at least the issue with obsolete icons.

Edit6: Removed FilePart dependency.

Edit7: Added DirII dependency. Handles certain characters better during the file list creation.

See below for last update.

Last edited by EctoOne; 04 June 2023 at 19:46.
EctoOne is offline  
Old 02 June 2023, 03:45   #9
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
Quote:
Originally Posted by Matt_H View Post
IconPos is a CLI tool to adjust, as the name implies, icon positions. It’s on the OS Install disks for 2.x-3.1 (and possibly later) but doesn’t actually get copied to C: since it’s only used in the installation process.
Holy cow. I just tried this and it is amazing. And it is very easy to create a script to use it on all files since the output from IconPos can be directly used as arguments. So it is possible to collect the data for all icons using List and then turn it that into a script to apply the data.

I'm really impressed with this and will work on a script for this. Don't know why I haven't looked earlier into this and spend so much time with my other script.

Edit: Here you go. I've only tested it with the WB3.1 IconPos command and you need to provide it yourself. The script will again install its dependencies when needed and it will open a file requester where you need to select IconPos. It will be copied so you can just insert the WB3.1 install disk and select it in the C directory.

Edit2: Removed FilePart dependency.
Edit3: Reupload because the archive was containing an backup file.
Edit4: Added DirII dependency. Handles certain characters better during the file list creation.

See below for last update.

Last edited by EctoOne; 04 June 2023 at 19:46.
EctoOne is offline  
Old 02 June 2023, 13:52   #10
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
Fantastic EctoOne!
Need to make some thorough read! Your scripts never cease to amaze me
mfilos is offline  
Old 02 June 2023, 16:41   #11
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
Thanks mfilos.
I'm just lazy and try to make things as easy as possible. Although it is kinda ironic that I spent so much time on trying to optimize things.

If you have any suggestions for improvements, I might try to implement them.
I'm still considering adding support for selecting the source drive and a way to edit the output filename directly for both scripts but I personally don't need that right now.
And I just had the idea for another project which might take some more work.

Btw. I have updated both scripts again and removed a dependency because it was possible to do it with a plain Workbench command. And I'm pretty sure I've used that method before, don't know why I went back to use an extra tool.
EctoOne is offline  
Old 03 June 2023, 06:02   #12
Matt_H
Registered User
 
Matt_H's Avatar
 
Join Date: Jul 2008
Location: Boston, MA
Posts: 943
Quote:
Originally Posted by EctoOne View Post
Holy cow. I just tried this and it is amazing. And it is very easy to create a script to use it on all files since the output from IconPos can be directly used as arguments. So it is possible to collect the data for all icons using List and then turn it that into a script to apply the data.

I'm really impressed with this and will work on a script for this. Don't know why I haven't looked earlier into this and spend so much time with my other script.

I should have guessed that a script guru would find workarounds for getting the most out of IconPos. Glad you found it useful.
Matt_H is offline  
Old 03 June 2023, 20:03   #13
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
@EctoOne
I'm having issues with the IconSaverV7 script (didn't have time to test previous versions).
I have installed all dependencies by hand as I found very handy the CLI tools provided.

Script is running and creating the T:ILIST file, which after all the icon files, the file's last's line has an entry: "LIST: object not found".
As you can imagine this line once fed into the script, brings up a Volume requester "Please insert volume LIST in any drive"

I'm running OS3.2.2.1 and haven't checked running the script in older environment. Any idea why that could be happening?

Edit: Found out that a drawer named Iconset that holds all my OS4.1 icons may have some issues with some entry that probably creates this issue that I need to investigate. Sadly LIST gets the entries kinda randomly so it's hard in a folder with hundrends of .info files to see what's the faulty :S
Can I exclude this drawer (as I don't want any backup from it) in the list statement?
Edit2: Ok it's the items with parenthesis in the filename... kinda sux cause Remus drawer for example under Modules is full of those :S - OK I have too many filenames with parentesis (RedPill, EaglePlayer, DeliTracker2) - How can we fix that issue?

Last edited by mfilos; 03 June 2023 at 22:24.
mfilos is offline  
Old 03 June 2023, 22:18   #14
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
Not really. I admit, I removed the FilePart dependency in the IconSaver script after I found the alternative way without testing. But I just did a test on a clean 3.2.2.1 installation with only LhA added and it worked.

Then there is the issue that I don't know which version of T:ILIST you mean. Since the file gets generated twice. Once as list of the icons which is just used to create the initial archive with LhA and it is not executed.
The second time as script with If/Endif commands which gets added to the archive. So the last line should be obviously Endif.
In both cases there should be never be the case that an object wasn't found.

The other time LIST is used is to get the file name of the archive. But that is just to set a variable, nothing gets executed.

I have to say that I don't quite understand why you're looking at T:ILIST though. That file never gets executed. The only ILIST file that gets executed is the one inside the archive.

The only thing I can think of is that for some reason the name of the archive is different from the icon assigned to it.
Meaning that setting the variable fails because LIST can't find the archive. Although I think the variable is set by using the icons path not the archive. Maybe it's a path issue!? I'm using double quotes but I don't know how they are handled by CLICon. Have you any spaces or other special characters in your path?

Last edited by EctoOne; 03 June 2023 at 22:28.
EctoOne is offline  
Old 03 June 2023, 22:26   #15
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
OK everytime a filename has a parenthesis, then the ILIST (irrelevant the 1st or 2nd declaration) stops loading with the "LIST: object not found" entry.
If I remove the filename with parenthesis, then the ILIST file continues to load until another filename with parenthesis is found.
Sadly I have too many filenames with parentesis (RedPill, EaglePlayer, DeliTracker2, Remus) - How can we fix that issue (even using the older dependency)?
mfilos is offline  
Old 04 June 2023, 00:54   #16
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
Quote:
Originally Posted by mfilos View Post
OK everytime a filename has a parenthesis, then the ILIST (irrelevant the 1st or 2nd declaration) stops loading with the "LIST: object not found" entry.
If I remove the filename with parenthesis, then the ILIST file continues to load until another filename with parenthesis is found.
Sadly I have too many filenames with parentesis (RedPill, EaglePlayer, DeliTracker2, Remus) - How can we fix that issue (even using the older dependency)?
Huh, this seems to be an issue with the list command from 3.2. It works fine on 3.1.
A parenthesis somehow changes the path.
Sadly using the older dependency wouldn't help in this case.
I need to take a closer look at what is happening.
In the worst case I need to add another tool to create the lists.


Edit: I actually had an error in my test script. I'm not able to reproduce this error.
Maybe there's a misunderstanding here. Can you post a file name that causes the error please?

Edit2: OK, what I noticed with a file name (123) and its icon. It doesn't gets actually archived, but even that doesn't cause any errors for me. I'm not surprised that it won't get added since () are used to create a group. In this case it would look for 123.info which doesn't exist.

Last edited by EctoOne; 04 June 2023 at 03:18.
EctoOne is offline  
Old 04 June 2023, 17:01   #17
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
EctoOne mate I modified the script to only make my SYS:Tools/Remus/Modules/ drawer and it had the list error in ILIST from the start and script failed.
This is some of the filenames of drawers into the /Modules/ drawer (No drawer has .info files) so it's kinda weird the script is breaking imho.



Also I'm running OS3.2.2.1 so I dunno if that can be reproduced in older WB3.1 etc installations (will have to troubleshoot more to see what's the issue).

Edit:
I also had similar issue as I said in my Icons drawer. After using Find to find which drawers has brackets I renamed them (removing the brackets) and script run flawlessly.

Last edited by mfilos; 04 June 2023 at 17:19.
mfilos is offline  
Old 04 June 2023, 18:37   #18
EctoOne
Registered User
 
EctoOne's Avatar
 
Join Date: Jun 2020
Location: Germany
Posts: 370
Yeah, I can reproduce this error with a directory containing brackets.
But there is no error message nor prompt to insert LIST on 3.1.
But I really don't know how to fix this.
I might have an alternative for LIST which seems to work fine with brackets but then LhA still doesn't work with them. At least not with the current options.
This seems to be a problem I can't fix. I could do some more testing with the alternative and might add it but then we might end up with incomplete archives without getting any error message.

Edit: OK, I added an replacement to create the lists. It seems to work without causing errors. Also for the IconSaver script, I added the option to ignore wildcards for LhA, but that doesn't seem to fully work. I've tried all three types of brackets ([{}]), but only files within folders containing {} have been added.
So, for both scripts there is a chance that not everything is saved/restored and the sad thing is that there is no visual indicator if there was an error.

Edit2: These versions have issues with long filenames. They are currently kept here until the latest version is confirmed to work properly.

Edit3: Files removed.

Last edited by EctoOne; 06 June 2023 at 09:23.
EctoOne is offline  
Old 04 June 2023, 23:03   #19
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
New version using the DirII seems to work just fine EctoOne mate! Thanks a lot for the quick reply and solution.
Only issue I had was with 2 files that you can see bellow


Probably has to do with the filename being 34-35 characters? (I have 50 characters in my Workbench Prefs and filename indeed is correct - checking from workbench or DOpus).
mfilos is offline  
Old 04 June 2023, 23:38   #20
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
@mfilos

How come the "Data" and "Boot" icons are ghost icons ?
AMIGASYSTEM is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I save window positions and sizes in Workbench? Foebane support.Apps 6 10 April 2017 15:09
ClassicWB Desktop icon danko project.ClassicWB 3 09 May 2016 13:05
Saving icon positions, WB3.0 EmuChicken support.Apps 11 02 October 2006 17:30
Utility that removes icon text box Bloodwych request.Apps 4 12 June 2004 13:10
Icon utility oldpx request.Apps 17 27 September 2002 23:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09964 seconds with 14 queries