Different coloring for different dirs

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
serg981
Posts: 2
Joined: Sat 23 Mar, 2024 09:41

Different coloring for different dirs

Post by serg981 »

Hi,

Is it possible to customize the color of FAR panel for a certain dirs ?
For example if I enter c:\windows I want to change panel color from blue to red.
Also often I work with many FAR windows open, when I shift with alt-tab it would be easier if I could customize colors.

Thank you for attention!
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Different coloring for different dirs

Post by HaRT »

There are no easy-to-use out-of-the-box features for this, but read on.

You cannot have different colors of left and right panel in FAR. You can change the color preference of both panels though by a Lua script that runs in response to a certain condition (it's a separate big topic, you'd need to do some research, maybe even involving an online translator from Russian).

As for many concurrent FAR windows, you can run them with distinct profiles having different panel color preference. But I suspect it will be hard to keep other settings in sync (including for plug-ins), not to say about histories.

Also, if you run FAR via ConEmu, you can customize the background to an extent, but I don't know any more on this, and this Forum is not the right place to discuss ConEmu.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
zg
zero-gravity
Posts: 6033
Joined: Tue 15 Mar, 2005 17:36
Location: riga
Been thanked: 185 times
Contact:

Different coloring for different dirs

Post by zg »

far.AdvControl(ACTL_SETARRAYCOLOR,…)
Event{group="FolderChanged";…}
serg981
Posts: 2
Joined: Sat 23 Mar, 2024 09:41

Different coloring for different dirs

Post by serg981 »

Thank you for replies,
Maybe there is a way to change color of the current FAR process by calling some plugin menu?
User avatar
buniak_a_h
Posts: 4256
Joined: Sat 20 Apr, 2013 00:17
Location: Санкт-Петробад
Has thanked: 222 times
Been thanked: 644 times
Contact:

Different coloring for different dirs

Post by buniak_a_h »

There is a script that allows you to color any item on the panel. The rules of coloring are set by regexp. You can set coloring rules for any folder
Sorry for my English
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Different coloring for different dirs

Post by HaRT »

buniak_a_h wrote: Sat 30 Mar, 2024 19:58 There is a script that allows you to color any item on the panel. The rules of coloring are set by regexp. You can set coloring rules for any folder
Does the script allow to color the panel background itself, per directory or at least per FAR instance?
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
buniak_a_h
Posts: 4256
Joined: Sat 20 Apr, 2013 00:17
Location: Санкт-Петробад
Has thanked: 222 times
Been thanked: 644 times
Contact:

Different coloring for different dirs

Post by buniak_a_h »

HaRT, answer here. Sorry…
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Different coloring for different dirs

Post by HaRT »

buniak_a_h wrote: Sun 31 Mar, 2024 01:08Sorry
My question was intended to demonstrate that the said script is not appropriate for the task at hand.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
John Doe
Бюрократ
Posts: 13842
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 73 times
Been thanked: 428 times
Contact:

Different coloring for different dirs

Post by John Doe »

serg981 wrote: Sat 30 Mar, 2024 11:38 Maybe there is a way to change color of the current FAR process by calling some plugin menu?
For inspiration run this in command line:

Code: Select all

lua:actl.SetArrayColor(nil, {StartIndex=far.Colors.COL_PANELTEXT, Flags=far.Flags.FSETCLR_REDRAW, 0x30})
https://t.me/FarManager — Telegram чат
User avatar
HaRT
Moderator
Posts: 10850
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times

Different coloring for different dirs

Post by HaRT »

John Doe wrote: Mon 01 Apr, 2024 03:23 actl.SetArrayColor
I'd like to add that this requires FAR b6279 or newer.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
buniak_a_h
Posts: 4256
Joined: Sat 20 Apr, 2013 00:17
Location: Санкт-Петробад
Has thanked: 222 times
Been thanked: 644 times
Contact:

Different coloring for different dirs

Post by buniak_a_h »

serg981, The following script solves your problem.
An example of the work:
image.png
Script and module here:
Panels.ColorFolder.7z
(2.64 KiB) Downloaded 13 times
Cfg file (setting the coloring color) is located in the colorized folder and it has the following structure:

(UTF-8 coding)
Post Reply

Return to “Support and Troubleshooting”