GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Set File & Folder Colors/Labels via Context Menu

[See Also: Color Folder Icons]

Sometimes it's useful to assign different colors and text styles to files and folders so that they stand out from normal items. This post explains how to create a right-click context menu to do just that.

The result will look something like this:

Note that Directory Opus 12 and above come with the context menus built-in (if you are using the default configuration), while Directory Opus 10 and above comes with something similar as part of the default toolbars:

If you are using a recent version of Opus and happy with what you already have, then you don't need to change anything at all.

Before we begin, note that you can add, remove and modify the available colors and text styles via Settings > Preferences / Favorites and Recent / File and Folder Labels. There you can also see and manage all of your labelled items from a central place.

Here's how to create a context menu that allows you to right-click things to set their colors (in case your config dates back to an old version that didn't have this built in):

  • Go to Settings -> File Types and edit the All Files and Folders type near the top.

  • Go to the Context Menu tab, click New and set the Type drop-down to Sub-menu. Name the menu Set Label (or whatever you want) and click OK.

  • Click New again and this time set the Type drop-down to Run an Opus function. Enter Properties SETLABEL as the function and click OK.

  • You can move the two new items around in the menu as you like. Just make sure the sub-menu stays directly above the Properties SETLABEL command, so they are indented like in the screenshot below.

  • If there are any other items below the command then they will initially be indented and inside of the sub-menu as well. To move them out of the sub-menu, right-click the first item after the command and select Decrease Indent to end the sub-menu.

You should end up with something like this:

Thanks very much, leo, this is very handy!

If I could get this to show in context menu (still trying umpteenth time) would this display a color for the whole folder (or file) line or would it be possible to just colorize the folder?

Opus 10 beta~

When the 10 manual is complete perhaps more clarification but not clear to me at this time.

thanks,

rose

Rose when you say the folder, I assume you mean the folder icon? If so you can have it either way. Below is a screen shot showing you two folders, the 228-s-12th-st folder line is all blue, while only the folder icon is green on the 220-s-11th-st folder.

Below is how I have my folder context menu set up. To do the same just go to Settings/File Types and choose the All Folders file type. Edit that, and click the Context Menu tab to configure it.

Of course you need to have your folder colors defined in preferences first.


This is setup in the default Opus 10 toolbars, FWIW. It's in the menu attached to the Properties button on the right off the 3rd toolbar.

@ John, thanks so much for the images, really helps. Something I'm not seeing because I've tried creating a folder colorize option but dead end after I create addition to the context menu...the option is to associate an app with the context menu addition and that leaves me nowhere. I wind up having an undefined context menu addition which naturally never even shows up on the context menu. I might have screwed things up even more by adding Properties SETLABLE with each color. Read that on another thread. But yes, being able to colorize the folder is what I am wanting.

@ Leo...would you, could you, be so kind as to attach an image as I'm not seeing what you are saying.

thanks so much,

rose


@ John, how did you create Set folder color <sub> reset color etc? That's were it loops for me with only option that I can see on edit is to pick an app.

@ Leo

THANK YOU THANK YOU THANK YOU

fantastic...I've been reading, rereading, clicking, reclicking. This works great. Now I'm off to customize my colors and have a ball :thumbsup:

imagine hugs

to you too John for so kindly offering help.

:grin: :grin: :grin:

:smiley: So simple, so wonderful!

The thing that is so great about it is using any third party app for color coding folders, ie Rainbow Folders which works very well, when the window is in thumbnail mode the colored folder is tiny generic folder while all the regular folders have that luscious look of 7 folders. I wanted to colorize the folders and have them look just like 7 folders in all their beauty.

I am still blown away. I love looking at beauty :smiley:

So, how do you changing "just" the color of a file/folder wordings ? When I set the color, both the icon and the wordings got changed. Someone has shown a screenshot that it can be done, but how ?

There are separate options for the icon and label colours in Preferences.

Leo, thanks for the quick response. Can I get more specific detail ? So, I need to create a seperate set color icon or something ? I find this option Preferences -> Display -> Colors and Fonts -> Other Colors -> File Display Icon, but I have no idea how to set a specific file/folder icon to different color with this. That is the only place I find that has the word icon inside Preferences. I am using DOpus v10.2.0.0

It's in the File and Folder Labels part of Preferences, the one shown in the most recent screenshot in this thread.

Got it, I see how it works now. Thanks.

Thought I'd share another approach.

I have 9 colors programmed. When I want to color a file or folder, I click the file or folder, then I hit Ctrl + Alt + any number from 1 to 9. Each codes a color. Often I'll keep Ctrl + Alt pressed down and cycle from 1 to 9 to immediately see the different colors.
Ctrl + Alt + 0 clears the color.

This is programmed in a "Folder Colors" submenu, which I'm attaching here. (The submeni is also part of the toolbars on my tutorial.) You could drag that submenu into the Folder Options menu for instance. Its real use is less as a menu than as a placeholder for keyboard shortcuts.

If you already have shortcuts assigned to Ctrl + Alt + numbers, you'll have to turn them off.

The Folder Colors submenu refers to certain folder colors that need to be programmed. If you're happy to replace your existing colors, you can just paste
/dopusdata/ConfigFiles
in the file address bar, and edit colorgroups.oxc in a text editor.
There, either substitute the whole text with these definitions:

<?xml version="1.0" encoding="UTF-8"?> <colorgroups> <groups donedef="1"> <group bg="none" fg="#ff0000" flags="0" icon="#ff0000" id="{2F499E2B-8B6E-4B80-8E3B-C73E032E801F}" name="Red" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#0000ff" flags="0" icon="#0000ff" id="{A3B60A15-3008-40C5-B96B-615CF0005B25}" name="Blue" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#411260" flags="0" icon="#411260" id="{53B6C3BF-C513-4E2D-BE6C-71F6C7177492}" name="Purple" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#573b1b" flags="0" icon="#573b1b" id="{3CFFC979-584F-4306-8F72-CA7037D9476F}" name="Brown" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#144c29" flags="0" icon="#144c29" id="{753DFAF6-636E-48E8-9114-1E5185B7561F}" name="Green" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#323232" flags="0" icon="#323232" id="{07DE67A2-3D0D-4C0E-B0B3-06E5CF535C64}" name="Charcoal" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#8a8a8a" flags="0" icon="#8a8a8a" id="{BEEBDFC3-0080-49AD-B829-A2A54AF8502E}" name="Grey" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#053505" flags="0" icon="#053505" id="{B0EBF69A-A51B-477B-96A8-41DF2F9CF1B0}" name="Grass" sel_bg="none" sel_fg="none" /> <group bg="none" fg="#ef7200" flags="0" icon="#ef7200" id="{D2F87201-11C7-4EC2-8486-05723DADAB10}" name="Orange" sel_bg="none" sel_fg="none" /> </groups> </colorgroups>

Or, so as not to overwrite your own definitions (for instance a bold or underline style you might have defined), work the relevant definitions from the code above into your original file, avoiding name redundancies.

Wishing you a COLORRFUL day!

:smiley:
Label Color.dcf (2.78 KB)

Hi,

I use Opus 10.5 & i can't follow your intructions to add the label color in the right clic.

Can anyone help me?

File Type context menu editing requires Opus Pro and isn't in Opus Light, but you can use the Set Label menu that's inside the Properties button on the default toolbars (shown near the top of the first post), or create a similar menu, or set of buttons (one for each label), on a custom toolbar.