SCT (Set Color Temperature)

Miscellaneous tools
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

SCT (Set Color Temperature)

#1 Post by labbe5 »

https://github.com/faf0/sct

Sct (set color temperature) is a UNIX tool which allows you to set the color temperature of your screen. It is simpler than Redshift and f.lux.

It is available from standard repositories (Stretch has sct in repo).

It is a very light app, which works the most easy way :
sct + color value between 1000 and 10 000 Kelvin.

To have sct set to 3500, a very warm screen color, just do :
sct 3500 in terminal.

For blueish screen color, do :
sct 8000

Default screen color is 6500K .

Users of redshift (or sct) use it in the evening, because a warmer screen color temperature matches the warmer color temperature occuring in the evening.

By night time, if you keep your screen color temperature to 6500K (default), you risk alter your sleep pattern, and fall asleep much later or not at all. The blue light at night may have the same effect as a cup of coffee.

Similar apps are available for Androïd, iPhone, etc.
For further reading : http://www.linux-magazine.com/Online/Fe ... Eye-Strain

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#2 Post by Keef »

Compiled it in Quirky Xerus64 - only 11k stripped. It alters the screen colour then quits. Just run it again with a different value to change colour. Good find labbe5.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

Compiled in Slacko 570, it runs out to 8.5 kb stripped. I've been using Redshift GUI for quite a while now, having previously used f.Lux under Windoze. To my way of thinking, Redshift is easier to use than f.Lux.

This little utility works instantly.....nice one! The only snag is that you can't set it to transition gradually; I have Redshift set to transition very slowly (around 3K/sec).....so slowly, in fact, that it completes the full cycle from 6500K to around 3600K without me even noticing it.

Just load your Pup's devx, open a terminal in the directory where you have 'sct-master', and paste in the command given in the Read-Me. The sct binary should appear within a few seconds. Simple.....even for a cloth-head like me! Then move the sct binary into /usr/bin.....and run the 'sct xxxx' command in the terminal.

Very useful, indeed. It has Mike's 'seal of approval'! :lol:


Mike. :wink:

mmz
Posts: 4
Joined: Fri 06 Oct 2017, 11:04

#4 Post by mmz »

Tried to compile after I've loaded lupu_devx_528-4.sfs via SFS_load (i'm on a full installation of lucid puppy 528), but I receive only so much errors

Code: Select all

sh-4.1# cc -std=c99 -O2 -I /usr/X11R6/include -o sct sct.c -L /usr/X11R6/lib -lm -lX11 -lXrandr
sct.c:7: error: expected identifier or ‘(’ before ‘<’ token
sct.c:30: error: stray ‘\302’ in program
sct.c:30: error: stray ‘\267’ in program
sct.c:30: error: stray ‘\302’ in program
sct.c:30: error: stray ‘\267’ in program
sct.c:151:8: warning: missing terminating ' character
sct.c:151: error: missing terminating ' character
sct.c:324:48: error: invalid suffix "fd13e4a63241a6cb6c8a58cf6c4ddd" on integer constant
sct.c:411: error: expected identifier or ‘(’ before ‘<’ token
sct.c:534: error: stray ‘#’ in program
sct.c:534: error: expected identifier or ‘(’ before ‘<’ token
sct.c:534: error: expected identifier or ‘(’ before ‘<’ token
sct.c:538: error: stray ‘#’ in program
sct.c:538: error: expected identifier or ‘(’ before ‘<’ token
sct.c:538: error: expected identifier or ‘(’ before ‘<’ token
sct.c:542: error: stray ‘#’ in program
sct.c:542: error: expected identifier or ‘(’ before ‘<’ token
sct.c:542: error: expected identifier or ‘(’ before ‘<’ token
sct.c:551: error: stray ‘#’ in program
sct.c:551: error: expected identifier or ‘(’ before ‘<’ token
sct.c:551: error: expected identifier or ‘(’ before ‘<’ token
sct.c:555: error: stray ‘#’ in program
sct.c:555: error: expected identifier or ‘(’ before ‘<’ token
sct.c:555: error: expected identifier or ‘(’ before ‘<’ token
sct.c:559: error: stray ‘#’ in program
sct.c:559: error: expected identifier or ‘(’ before ‘<’ token
sct.c:559: error: expected identifier or ‘(’ before ‘<’ token
sct.c:563: error: stray ‘#’ in program
sct.c:563: error: expected identifier or ‘(’ before ‘<’ token
sct.c:563: error: expected identifier or ‘(’ before ‘<’ token
sct.c:576: warning: data definition has no type or storage class
sct.c:576: warning: type defaults to ‘int’ in declaration of ‘whitepoints’
sct.c:576: error: expected expression before ‘<’ token
sct.c:660: error: expected identifier or ‘(’ before ‘<’ token
sct.c:702: error: stray ‘#’ in program
sct.c:799: error: expected identifier or ‘(’ before ‘<’ token
sct.c:832: error: stray ‘\’ in program
sct.c:904: error: expected identifier or ‘(’ before ‘<’ token
sct.c:939:10: warning: missing terminating ' character
sct.c:939: error: missing terminating ' character
sct.c:957: error: expected identifier or ‘(’ before numeric constant
sct.c:987:12: warning: missing terminating ' character
sct.c:987: error: missing terminating ' character
sh-4.1# 
What I'm doing wrong?

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#5 Post by greengeek »

Mike Walsh wrote:Compiled in Slacko 570, it runs out to 8.5 kb stripped.
Hi Mike - be a good lad and share the goodies around please :) :)
(you know I love slacko 5.6 ....)
cheers!

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#6 Post by Keef »

mmz

I've just compiled it successfully in lupu. Are sure the source file hasn't got corrupted? Those errors look like something has got messed up in stc.c.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

greengeek wrote:
Mike Walsh wrote:Compiled in Slacko 570, it runs out to 8.5 kb stripped.
Hi Mike - be a good lad and share the goodies around please :) :)
(you know I love slacko 5.6 ....)
cheers!
Ooh, you lazy bugger..! :lol: Next thing I know, you'll be wanting to come over there and wipe your.....never mind; TMI, I think... A-hem!

GG, just for you; here's the one I compiled for Slacko 5.6 the other day. Untar it, and stick it in /usr/bin. Labbe5's post at the top explains usage. And just so's you can see how truly easy this one really was, here's a vid I made of the compile process.....from start to finish (using RecordMyDesktop.....of course!)

https://youtu.be/X_a6MKDr8XQ

Enjoy.....


Mike. :wink:
Attachments
SCT-binary.tar.gz
SCT binary, compiled in Slacko 5.6
(4.21 KiB) Downloaded 256 times
Last edited by Mike Walsh on Sat 07 Oct 2017, 11:05, edited 1 time in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#8 Post by greengeek »

Mike Walsh wrote:Ooh, you lazy bugger..! :lol:
Oops, sorry - and thanks for both the bin (works perfectly) and video (most helpful!)
Many thanks from the Antipodes!
:)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

greengeek wrote:
Mike Walsh wrote:Ooh, you lazy bugger..! :lol:
Oops, sorry - and thanks for both the bin (works perfectly) and video (most helpful!)
Many thanks from the Antipodes!
:)
You're very welcome! I did the vid 'cos I was trying to show the colour change at the end, where I entered the temp values into the terminal.....but it doesn't translate to the video, I'm afraid.

I've come to the conclusion that I definitely prefer 'RecordMyDesktop' to 'SimpleScreenRecorder' for stuff like this; whatever the reason, it seems to be far less resource-intensive. Okay, so SSR is not a problem for the big Compaq's dual-core Athlon64.....but on ye anciente Dell (P4-based), it struggles. :roll:

RMD, on t'other hand, struts along quite happily (at around 40-45% CPU usage)..... :D


Mike. :wink:

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#10 Post by Moat »

Mike Walsh wrote:Enjoy.....
Hey, thanks for offering this tiny-yet-I-now-cannot-do-without compiled utility, Mike (and labbe5 for bringing it up)... working excellent on lazy bugger me's X-Tahr 2.0. Great lil' app - so many of these newer LED-backlit displays are too darned "cold"/blue-ish OOTB, and this is a perfect solution to help even things out. Very, very nice... 8)! So tiny, it should really be a default Puppy inclusion...

Bob

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#11 Post by spiritwild »

I played with it. set it to 2000 and thought I heard demonic voices.

Works well though, thanks for the find :)

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#12 Post by belham2 »

Hi guys,

Seriously, can someone please explain the attraction of this SCT? It's a pain in the you know compared to redshiftgui. And redshiftgui is quite small, barely noticeable, while this thing is absolutely small, but is noticeable in the aggravation department.

1) Look at the pic below, nowhere with SCT do I get fine, granular INSTANT ALWAYS AVAILABLE control of brightness, along with screen color warmth settings.

2) redshiftgui (which is now included by all current builders I know of, from rerwin up to micko/phil/peebee include redshiftgui) sits in the notification tray waiting for any mouse click action you might want on it. SCT, I've got to get off the mouse, contort my body, and go type crap into a terminal. This is backwards progression, is it not?.

3) I run redshiftgui in 32 and 64 builds all the way from lucid up to any pup and/or ddog, but I tried to give this SCT a go for a week after compiling in various pups of mine. Conclusion: I'd rather go to the dentist than to endure this piece of anachronistic code garbage.

I'm trying hard, but I just don't see what you guys see in it. I can only come to conclusion, outside of Mike, you all have never taken the time to run redshiftgui (notice the 'gui' part, totally different from normal redshift terminal headache, like SCT).

I know we love choices in our lives, lol, but come on, this little thing is a major TURKEY! Get off your butts and install redshiftgui (I and others have even put up 32 to 64 bit builds in the redshift thread on murga---but, like I mentioned, from Rerwin on down, it is defacto in PPM).

Redshiftgui vs SCT is like riding a fully functioning bicycle vs being impaled on a steel rod rammed up your-you-know-what turning on square rims :lol:
Attachments
Screenshot.png
(104.58 KiB) Downloaded 371 times

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

@belham2:-

Hey..! It's all about choice, man. Nobody's holding a gun to your head; nobody's forcing you to use it.....it's simply available for anyone who wishes to avail themselves of it. :)

I mean, it's quite possible some of our number are absolute 'philistines', y'know? (Either that, or they might wish to take minimalism to extremes.....no way to tell!) :lol:

It's always been my personal policy to make the widest possible choice of apps available for anyone who might wish to try 'em out. Like the Omron blood pressure monitor analysis software I posted about a few months ago. Sure, it's probably of no interest to 95% of folks, I grant you that.....but if only a few people find it useful, I feel I've achieved something.

I'm like you; ever since discovering Redshift, I, too, have preferred it to f.Lux. I happen to think it looks better, and is just neater to use. But I can see situations where SCT would be preferred; some folks just like very, very tiny apps.

(*shrug*)


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#14 Post by greengeek »

belham2 wrote:Hi guys,

Seriously, can someone please explain the attraction of this SCT? :
Hi B2 - can you show how to write a script which uses redshiftgui to alter the screen warmth at a specific time of day? (ie: not using it's inbuilt automatic functionality).

Sometimes people want a function that is more basic than has been programmed by the writer of a gui utility. More is not always better.

The only time I want a red shift in my LCD screen is if I boot my laptop between 4am and 6am (which tends to happen during full moon or if I have too much coffee...). Any other days I don't want a red shift at all...

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

Moat wrote:
Mike Walsh wrote:Enjoy.....
Hey, thanks for offering this tiny-yet-I-now-cannot-do-without compiled utility, Mike (and labbe5 for bringing it up)... working excellent on lazy bugger me's X-Tahr 2.0. Great lil' app - so many of these newer LED-backlit displays are too darned "cold"/blue-ish OOTB, and this is a perfect solution to help even things out. Very, very nice... 8)! So tiny, it should really be a default Puppy inclusion...

Bob
I agree with ya, Bob. I think it could be incorporated into every Pup very easily; as you say, it's absolutely minute.....and extremely easy to compile.

If an idiot like me can manage it, well...... :lol:


Mike. :wink:

Post Reply