We have moved to a new Sailfish OS Forum. Please start new discussions there.
12

Allow setting background colour of Fingerterm

asked 2015-07-25 13:39:36 +0200

00prometheus gravatar image

Fingerterm is set to always have a black background, and it seems that changing the background colour can not be done without rebuilding the package from scratch (see: https://together.jolla.com/question/92925/how-to-change-fingerterm-background-color/)

Unfortunately many of the default terminal ANSI colours (for example dark blue, used by 'ls' for directories) get very hard to see on a black background, unless you increase the screen brightness to maximum - but doing so spends the battery much faster! I would like to have the colour settings for fingerterm accessible, preferably in the interface, but at least in an editable text-file (QML or otherwise).

edit retag flag offensive close delete

Comments

1

I also find out how to fit terminal with ambiance and littlebit transparent background

sa1l0 ( 2016-11-04 03:54:16 +0200 )edit

@sa1l0 - I do believe you are no longer a Jolla user (last seen this time last year) but I tried to get transparency and it wasn't happening, so for now, changing to solid colours is what we have.

Spam Hunter ( 2017-11-21 14:35:53 +0200 )edit

3 Answers

Sort by » oldest newest most voted
4

answered 2017-11-21 13:25:39 +0200

Spam Hunter gravatar image

updated 2017-11-21 14:38:06 +0200

NOT a complete answer, yet......and no need to rebuild the entire package (which I could not get SDK to perform).

Slowly, slowly, inching further into the request and the code, which with 3 minutes of guess work and some f**king around with one particular line of code, I have the following;

image description image description

image description image description

image description image description

File edited for effect;

/usr/share/fingerterm/Main.qml

Line: 90; (original code)

color: bellTimer.running ? "#ffffff" : bgcolor

Changed to (as example);

color: bellTimer.running ? "black" : "purple"

The 'black' is the flashing part of the visible bell warning and the purple is the main background color - so in this case when deleting something back to the start of the line, the colours black and purple will flash. Then, you can use setterm commands to set text colour, as explained by @lakutalo

And here's a really pointless but fun solution for those who don't know which colour to choose for the background;

Add this line to Line: 93; (this is a resource hog because it is animated, you have been warned!)

    SequentialAnimation on color {
        id: bgcolor
        loops: Animation.Infinite
        ColorAnimation { from: "#9400D3"; to: "#4B0082"; duration: 5000 }//Violet>Indigo
        ColorAnimation { from: "#4B0082"; to: "#0000FF"; duration: 5000 }//Indigo>Blue
        ColorAnimation { from: "#0000FF"; to: "#00FF00"; duration: 5000 }//Blue>Green
        ColorAnimation { from: "#00FF00"; to: "#FFFF00"; duration: 5000 }//Green>Yellow
        ColorAnimation { from: "#FFFF00"; to: "#FF7F00"; duration: 5000 }//Yellow>Orange
        ColorAnimation { from: "#FF7F00"; to: "#FF0000"; duration: 5000 }//Orange>Red
        ColorAnimation { from: "#FF0000"; to: "#9400D3"; duration: 5000 }//Red>Violet
    }

This is about as far as I can go with my limited knowledge, the rest is up to you guys, so, get editing! ;)

Regards,

edit flag offensive delete publish link more

Comments

I like your colours! You should put into a disclaimer the necessity of mental fitness for using your disco mode. ;)

lakutalo ( 2017-11-21 14:16:53 +0200 )edit

Nice idea @lakutalo - Strobe mode (intense black and white flashing) for the 'light sensitive' among us ;)

Spam Hunter ( 2017-11-21 14:20:54 +0200 )edit

You could also name it Epileptic Fit Countdown.

lakutalo ( 2017-11-21 14:24:08 +0200 )edit

Nice hack!

marsch ( 2017-11-22 05:22:11 +0200 )edit
2

answered 2017-11-20 16:21:03 +0200

marsch gravatar image

It would really be appreciated if you fix this finally. Thank you.

edit flag offensive delete publish link more

Comments

@marsch

Contact the original author of the application, as FingerTerm is not a Jolla/Sailfish app. The authors details are found on the About page in the application.

Spam Hunter ( 2017-11-20 16:34:22 +0200 )edit
0

answered 2017-11-20 17:20:56 +0200

lakutalo gravatar image

updated 2017-11-21 08:43:35 +0200

To set colours of input and output text, type e.g.
setterm --foreground black --background white

Allowed colours are: black | blue | green | cyan | red | magenta | yellow | white | default

It really works (as of 2.1.3.7), but yet I have not found a way to change the entire background. So this is merely one step into that direction.

edit flag offensive delete publish link more

Comments

foreground with an 'E', not forgound ;)

Spam Hunter ( 2017-11-20 18:29:54 +0200 )edit

You could knock me down with an F. But it wouldn't have worked without an E.

lakutalo ( 2017-11-20 21:35:54 +0200 )edit

setterm sends terminal escape codes -- piping its output to od -a shows what is sent.

.

printf '\033[43m' outputs the same as setterm --background yellow when TERM=xterm

.

the escape codes to change window background are '\033' ']11;' '<color>' '\007' -- this is not supported buy fingerterm (at least colors did not change -- those codes may have been parsed though).

.

Look xterm control sequences for more information of those.

too ( 2017-11-20 22:33:52 +0200 )edit

Still it only sets the background color of the text and not the entire terminal.

marsch ( 2017-11-21 02:39:32 +0200 )edit

the escape sequence ESC [ 4 3 m sets background color of the text to yellow (e.g. for highlighting purposes), not the background color of the whole terminal. the setterm --background may be considered confusing...

too ( 2017-11-21 10:38:13 +0200 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2015-07-25 13:39:36 +0200

Seen: 609 times

Last updated: Nov 21 '17