Post Reply 

A Neat Trick

Aug 10, 2013, 01:32 (This post was last modified: Aug 10, 2013 04:21 by Wendy Black.)
Post: #1
A Neat Trick
This might not be for everyone, but personally I don't like going down through 3 layers of sub-menus to find something I use a lot. I know that once I use it, the item is placed on a "recently used" list. But that only lasts for your session.

Instead I copy the scripts I commonly use to my own custom menu. Here is an example of how that is done... at least in Linux. Sorry Windows but I am sure there is a way there too.

Go into the /usr/share/gimp/<your version>/scripts and look for a favorite like add-bevel or lava. Copy this to your $HOME/.gimp-2.6/scripts/
note: the folder will be named for your version.

So I copied lava.scm into here. Opened it with Kate (text editor) and changed the last line to read;

Code:
(script-fu-menu-register "script-fu-lava"
                         "<Image>/Custom")

When you run GIMP again you will have a drop down for Custom and under that Lava...

No more Filters --> Render --> blah blah blah

I am not a code monkey so don't hitting me with the frying pan. If you believe I am wrong about this, I most likely am. So please take it up with the manager. He is the guy wearing the pink tie and astronaut suit.

----Edit: Update----

I am told that the Windows user should look for the original scripts to found in Program Files/Gimp-2.0/share/2.0/scripts or something like that. Then the altered file should be stored in the user's hidden Application Data/.gimp etc...

[Image: mhrd.png]
Kubuntu 12.04 - Guild Wars - Retired Paranormal Researcher
Visit this user's website Find all posts by this user
Quote this message in a reply
Aug 10, 2013, 10:28 (This post was last modified: Aug 10, 2013 10:50 by rich2005.)
Post: #2
RE: A Neat Trick
That reminded me of Onkel Hatti's script manager

http://www.gimpchat.com/viewtopic.php?f=4&t=6028

It is a java app so easier in linux but not impossible in windows.

It does work, you can load script, drag to some other menu location and it edits the scm accordingly.

screenshot. http://i.imgur.com/jAIDt0Y.jpg

Makes a bit more sense when the scripts are outside of the ~/.gimp-2.8 directory structure, the example was using a 'legacy' GURM folder, that I keep 'just-in-case' I re-enable my GURM plugin.

edit: a bit of playing around with it and while 'hidden' files do not show in the built in browser it does permit drag-and-drop from your regular file manager. Which might save a lot of typing in the java dialog.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Aug 10, 2013, 11:07
Post: #3
RE: A Neat Trick
@Kevin: Sorry, I tried it like that in Linux and my menu items just disappeared completely. It could be a difference in version or OS, don't know which, I am not programmer. I do not alter the scripts from my root, I just copied them to my $HOME where they tell you to place the custom scripts.

However, I just tried out the lava and if I have a copy in both directories they both work the same way. I experimented on the given values just now in lava;
Code:
;SF-TOGGLE     _"Keep selection" TRUE
;SF-TOGGLE     _"Separate layer" TRUE
SF-TOGGLE     _"Keep selection" FALSE
SF-TOGGLE     _"Separate layer" FALSE

It seems to pull from my $HOME since these values were unchecked in both my custom menu and the original. I am glad that you found they work for windows in that fashion. That should save a little bit of space on the hard disk. I wish I could reprogram some scripts then I would be a happy camper.

@ofnuts: Oh believe me, I have done that, but there are just so many key combos and you start stepping on another apps toes. Big Grin

@rich2005: I don't even pretend to understand that application. Looks about as complicated as the Script-fu console. I think the manager would understand it better. Unfortunately he blasted off this morning has work to do.

[Image: mhrd.png]
Kubuntu 12.04 - Guild Wars - Retired Paranormal Researcher
Visit this user's website Find all posts by this user
Quote this message in a reply
Aug 10, 2013, 12:02
Post: #4
RE: A Neat Trick
@ Wendy Black
Quote:.. I don't even pretend to understand that application. Looks about as complicated as the Script-fu console. I think the manager would understand it better. Unfortunately he blasted off this morning has work to do...

Surprise him with some new knowledge.

A very quick demo of the application in action. Do not blink.

http://youtu.be/pNjm5EAwV6c not quite 3 minutes.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Aug 10, 2013, 22:39
Post: #5
RE: A Neat Trick
Ok thanks Rich2005, nice video too.

My hubby showed me that program basically changed the script-fu, which is something I know how to do with a text editor. But he had to run it from terminal like this;

java -jar jgimpos-2.0.1.jar

I was able to drag and drop from my /usr/share/gimp/2.0/scripts they showed up in the menu. However if you try to change them you should get an error message (permission denied) because of the root user protection. Root user access is something I never mess around using unless I am updating or installing. So I will stick with the Kate editor. Big Grin

Meanwhile the hubby said he didn't see any potential harm from the copy of root user files to local home. Here he can explain this part better than I.

Quote:Looking over the Gimp program I am seeing that it loads the scripts into memory at the start up. My wife has shown me the concerns expressed by the online community. While I have no knowledge of the program itself, I do know a great deal about programming languages and have written code.

It looks to me as if the program loads the scripts into RAM or RAM disk memory for quick access. If duplicate files are found in the hidden user folders, those trump the ones read in earlier from the program library. The effect is duplicated pointers in the menus that point to the same subroutine.

I tested this on an old Windows XP machine sitting in my LAN room and it works out pretty much the same. Didn't crash or anything kind of funny placing menus on the GUI like "Here" and "Anywhere". At the end of the day, it is at personal decision the readers of this community will have to make at there own discretion.

My advice is, if you break, it you buy it.

Heart I love my home IT support. Blush

[Image: mhrd.png]
Kubuntu 12.04 - Guild Wars - Retired Paranormal Researcher
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS