Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-08-07 19:43:13

kap4lin
Member
Registered: 2020-08-07
Posts: 2

xfce4-terminal persist bg/text color on new window/tab

System: xcfe4-terminal 0.8.9.2 (Xfce 4.14) on RHEL8.

I start a terminal with following:

xfce4-terminal --disable-server --color-text=#000000 --color-bg=#ffffff

Then I want to persist the color choice when right-click > Open Terminal or Open Tab. But the new window/tab reverts back to the color in the settings.

Is it possible?

Offline

#2 2020-08-12 16:19:55

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: xfce4-terminal persist bg/text color on new window/tab

Hello and welcome.

I understand that you don't want to set --color-text=#000000 --color-bg=#ffffff as permanent, am I right?

I tried the command with the --tab option added, but only made it work when I removed the --disable-server option, so:

xfce4-terminal --tab --color-text=#000000 --color-bg=#ffffff

Opens a new tab with the desired colors.

Then I added an alias to my .bashrc (others use a separate .bash_aliases file):

# Opens an xfce4-terminal tab with black on white colors
alias t='xfce4-terminal --tab --color-text=#000000 --color-bg=#ffffff'

And now if I want to open a custom colored tab I just enter 't'...

I know it's a hack but see if it works for you!

Offline

#3 2020-08-13 21:34:03

kap4lin
Member
Registered: 2020-08-07
Posts: 2

Re: xfce4-terminal persist bg/text color on new window/tab

Thanks alcornoqui.

I understand that's a hack, and I can set multiple aliases, t1, t2, t3, etc. with respective text/bg colors. Is there a way to know the text/bg colors of the current terminal, so that I can do with one alias (or a small script)?

Last edited by kap4lin (2020-08-13 21:35:40)

Offline

#4 2020-08-14 11:42:34

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: xfce4-terminal persist bg/text color on new window/tab

This is the location of the configuration file that includes the preferences which control the look and feel of xfce4-terminal:

${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc

Usually at /home/username/.config/

It contains a ColorPalette field, this is mine:

ColorPalette=#000000;#cc0000;#4e9a06;#c4a000;#3465a4;#75507b;#06989a;#d3d7cf;#555753;#ef2929;#8ae234;#fce94f;#739fcf;#ad7fa8;#34e2e2;#eeeeec

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 8 queries executed - Memory usage: 518.79 KiB (Peak: 519.41 KiB) ]