Redshift Gui Light Alternative (portable)

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

Redshift Gui Light Alternative (portable)

#1 Post by fredx181 »

*** Redshift Gui Light Alternative (portable) ***
==============================
EDIT 2018-10-09, updated to v2, needed a fix, see info here:
http://murga-linux.com/puppy/viewtopic. ... 94#1006894
Attachments below replaced with the new version
==============================
EDIT 2018-11-09, updated to v3, bug fix and other changes, see info here:
http://murga-linux.com/puppy/viewtopic. ... 48#1009548
Attachments below replaced with the new version
==============================
Inspired by Mike Walsh's "Brightness & colour temperature control for desktop PCs", here's a more extended version that supports redshift's automatic day and night colour transition (if in "Auto mode")
If Auto mode is not selected, then it works just the same as Mike's version (e.g. ScreenControl_redshift-v1.4)

Similar apps already existing, e.g:
https://sourceforge.net/projects/redshiftgui/
Or (more simple, python based):
https://github.com/mlsteele/redshift-gui

This portable version uses yad (notification icon and sliders to adjust the values) and the redshift command line utility.

Both (yad and redshift) I compiled on Debian Wheezy, tested (and works) on Puppy Lucid, Raring, Slacko, Tahr, Stretch (and should work also on later Puppy versions)
EDIT: Also on Debiandog, Xenialdog, Bionicdog
Also separate "wary" version attached, works on Wary or other older puppies with minimal Xorg version.

From the Help (right-click on the icon):
*** Redshift Manual mode and Auto mode ***

- Manual: First time run, the Manual mode is enabled.
Left click the icon and adjust color temp. and brightness.

- Auto: Right-click the icon and select 'Redshift Auto mode'.
The timezone and time must be correctly set to make this work well.
First time run, it will get your geo location (the coordinates: latitude, longitude)
A network connection is required for that.
The file $HOME/.rshift/geo-info contains this info.
Remove it if you travel to another country or city.
(then it will be re-configured again)
Left click on the icon to adjust day and night color temp.
To get back to Manual Mode, click 'Redshift Auto mode' again.
Portable: includes yad (v 0.38 ) and redshift (v 1.11) (self-extractable script) so NOT needed to have yad and redshift installed.
EDIT: With v3 it also includes "box_splash" for the auto-mode info dialog
Required is "curl" for getting geo location (but should be installed by default in most systems)

Extract 32 or 64 bit attached tar.gz and just click on e.g. rshift-portable-32 and the icon should appear in the system-tray.
To have it loaded at boot/logon, place it in ~/Startup

Any suggestions for improvement are welcome !

EDIT: screenshot attached replaced according to new v3

Fred
Attachments
redshift-auto-mode.png
Redshift auto-mode
(204.46 KiB) Downloaded 833 times
rshift-portable-32-v3.tar.gz
Redshift portable 32-bit, extract and run rshift-portable-32
(199.47 KiB) Downloaded 471 times
rshift-portable-64-v3.tar.gz
Redshift portable 64-bit, extract and run rshift-portable-64
(201.91 KiB) Downloaded 524 times
rshift-portable-wary-v3.tar.gz
Redshift portable Wary, extract and run rshift-portable-wary
(242.84 KiB) Downloaded 468 times
Last edited by fredx181 on Mon 10 Dec 2018, 17:12, edited 6 times in total.

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

#2 Post by Mike Walsh »

Ha-haa! Nice one, Fred.

I'll take a look at this, and see what it's like. Will this run in any Pup (well, any 5-series onwards, that is)?

I'm only asking because, despite running many much newer Pups, I find I'm spending quite a lot of time with Racy 5.5. On the big old Compaq desktop, she runs like the hounds of hell are after her.....and she still does everything I want her to.

I take it the 'Wary' version ought to work with Racy, it supposedly being 'Wary on steroids'.....

I'm just trying out your 'gtk-youtube-cde' thingy. Works nicely, once you figure out its quirks..... :lol:

(Now if only somebody could figure out a way to get FF-Quantum to run in Racy, I'd be a very happy bunny......)

Keep 'em coming, mate!


Mike. :wink:

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

#3 Post by Mike Walsh »

Fred, it works a treat. This is very much appreciated; I like the way you can run it either as 'manual' or 'auto', depending on how you want it to perform. Excellent work, mate.

Cheers!


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#4 Post by fredx181 »

Mike Walsh wrote:Fred, it works a treat. This is very much appreciated; I like the way you can run it either as 'manual' or 'auto', depending on how you want it to perform. Excellent work, mate.

Cheers!


Mike. :wink:
Thanks Mike
Will this run in any Pup (well, any 5-series onwards, that is)?
Don't know if it will run in any Pup, but was pleasantly surprised that it works on Lupu (with normal version, not "Wary" version), so anyway it should work on any newer version than Lupu, I think.
On which Puppy you tested ?

Fred

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

#5 Post by Mike Walsh »

Hi, Fred.

Well, so far Racy 5.5 ('Wary' version, obviously), and as of 5 mins ago, Slacko 570 (standard 32-bit version). Both working nicely ATM.

A question, if I may? How would I change the details for my exact location? In /root/.rshift/geo-info, I suppose... The auto-locate is picking up on Huntingdon.....which is around 60 miles away from me, to the west-south-west.

Just the location, and the lat/long?

EDIT:- Answered my own question. Edited ~/.rshift/geo-info, to change lat/long and city name, using the same details I've used in RedShiftGUI for the last 2-3 years.

(I have the lat/long to 7 decimal places, courtesy of a couple of astronomical/meteorological sites I occasionally visit. This only wants 4, so I rounded 'em up. Seems quite happy with that.)

There ya go. Nice one! I'll try the 64-bit version out in Xenial64 or Bionic64 before beddy-byes tonight.


Mike. :wink:

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

#6 Post by Mike Walsh »

Hi again, Fred.

Just 'installed' it to Bionicpup64. Smooth as so much oiled silk. Once again; a lovely piece of work.....and a credit to our little community. :D

Cheers.


Mike. :wink:

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#7 Post by Terry H »

Also running on bionicpup64. Set it up as auto mode, which found my coordinates and timezone and set it to night mode. Very nice. Thanks Fred

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#8 Post by dancytron »

Works great.

Just out of curiosity, how are you getting our location? IP number compared with ???

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#9 Post by fredx181 »

dancytron wrote:Works great.

Just out of curiosity, how are you getting our location? IP number compared with ???
With curl :

Code: Select all

curl -s --get http://geoip.nekudo.com/api
And then extract e.g. latitude and longitude with grep.
Mike Walsh wrote:The auto-locate is picking up on Huntingdon.....which is around 60 miles away from me, to the west-south-west.


That's not good, a few miles away would be ok, but 60 is too much.
Is the IP address correct in ~/.rshift/geo_info ?
Perhaps the url to get the info from should be changed , do you get the correct geo info when you do this in terminal ?:

Code: Select all

curl ipinfo.io
Fred

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

#10 Post by belham2 »

fredx181 wrote:new redshift gui lite

Fred

Thank you, Fred, got installed across all my DDogs, and all other pups too. Everything just works. Only weird thing is I can't get it and/or any redshift to work in Barry's latest Quirky 8.7 release (strange in how they worked in everything before Quirky 8.7). I might give up and try compiling it in Barry's, I guess.

Hope you're doing well and in good health. Crossing fingers we get a nice October.....temps have started to drop....noooooooooooo :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#11 Post by fredx181 »

belham2 wrote:
fredx181 wrote:new redshift gui lite

Fred

Thank you, Fred, got installed across all my DDogs, and all other pups too. Everything just works. Only weird thing is I can't get it and/or any redshift to work in Barry's latest Quirky 8.7 release (strange in how they worked in everything before Quirky 8.7). I might give up and try compiling it in Barry's, I guess.

Hope you're doing well and in good health. Crossing fingers we get a nice October.....temps have started to drop....noooooooooooo :wink:
Hey Belham, thanks for testing.

Strange that it doesn't work in Barry's latest Quirky, not even the redshift command line utility, as I understand.
Please report about any progress you made.

Yes, the weather, one of the things it's legitimated to complain about, we just try to accept :)

Fred

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

#12 Post by Mike Walsh »

Hi, Fred.

Hm. Curiouser & curiouser. Initially, I was getting Huntingdon (around 60 miles away, to the WSW). Now, I'm getting Halstead in Essex.....nearer 90 to the SSE!

We've always had very vague IP auto-location here. Neither Google nor DuckDuckgo can get any closer than around 40-50 miles away.....and other geo-location services are just as vague. But, as I said, courtesy of a couple of astronomical/meteorological sites I occasionally visit, I know my longitude & latitude to 7 decimal places. So I just edited the ~/.rshift/geo-info file to reflect that. No complaints or refusal to function; it's quite happy.

Still doesn't answer why 'curl ipinfo.io' isn't working better than that, though.....does it?


Mike. :wink:

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#13 Post by dancytron »

fredx181 wrote:
dancytron wrote:Works great.

Just out of curiosity, how are you getting our location? IP number compared with ???
With curl :

Code: Select all

curl -s --get http://geoip.nekudo.com/api
And then extract e.g. latitude and longitude with grep.
Mike Walsh wrote:The auto-locate is picking up on Huntingdon.....which is around 60 miles away from me, to the west-south-west.


That's not good, a few miles away would be ok, but 60 is too much.
Is the IP address correct in ~/.rshift/geo_info ?
Perhaps the url to get the info from should be changed , do you get the correct geo info when you do this in terminal ?:

Code: Select all

curl ipinfo.io
Fred
It is working fine. I was just curious how it worked. Thanks.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#14 Post by fredx181 »

Mike Walsh wrote:Hi, Fred.

Hm. Curiouser & curiouser. Initially, I was getting Huntingdon (around 60 miles away, to the WSW). Now, I'm getting Halstead in Essex.....nearer 90 to the SSE!

We've always had very vague IP auto-location here. Neither Google nor DuckDuckgo can get any closer than around 40-50 miles away.....and other geo-location services are just as vague. But, as I said, courtesy of a couple of astronomical/meteorological sites I occasionally visit, I know my longitude & latitude to 7 decimal places. So I just edited the ~/.rshift/geo-info file to reflect that. No complaints or refusal to function; it's quite happy.

Mike. :wink:
And now I'm curiouser and curiouser, you live in a cave maybe ? Or on top of a mountain? :lol: :lol:
No.. seriously,
Still doesn't answer why 'curl ipinfo.io' isn't working better than that, though.....does it?
Not sure what you're saying, did you see the output of 'curl ipinfo.io', was it different ?

Fred

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

#15 Post by Mike Walsh »

@ Fred:-
fredx181 wrote:And now I'm curiouser and curiouser, you live in a cave maybe ? Or on top of a mountain? :lol: :lol:
Hah!

No, the output of 'curl ipinfo.io' was the same in the terminal as in the rshift light .pet. To clarify the issue, the first Pup I installed this in came up with Huntingdon, which is around 60 miles to the SSW of us. In the next and every subsequent Pup, that then changed to 'Halstead', 90 miles or so to the ESE of us.....in south-eastern Essex!

------------------------------------------

King's Lynn is located at the base of the 'Wash' area at the top north-western corner of East Anglia, in the angle where it borders on Lincolnshire. It's situated at the mouth of the Great Ouse river, which is one of the major outlets for the huge drainage network your countrymen 'constructed' for us back in the 15th & 16th century....in particular the Dutch engineer Sir Cornelius Vermuyden.

The 'Fens' now comprise around 50% of the 'Grade 1' arable land in the whole of the UK, and have often been referred to as the 'breadbasket of England', due in no small part to the rich peat soil content of the reclaimed land. Modern intensive farming methods supply nearly three-quarters of the British Isles with fresh fruit & veg on a daily basis.


Image


As far as communications and radio/TV reception are concerned, it may as well be in the Australian outback. It's all due to the somewhat unusual make-up of the terrain, which is basically sandstone, below the peat topsoil layer....albeit with a metallic/magnetic component to it. Plays havoc with airborne carrier waves of any sort; radio and TV reception for the area have at times been 'enhanced' with repeater stations (which don't live up to their promises).....and the magnetic component to the terrain, because of its extensive nature, has over the centuries played merry hell with the compasses used by shipping in the area (not to mention the numerous sandbanks and shoals in the Wash itself). All-in-all, a perfect recipe for mayhem in this modern electronic age, concocted by Mother Nature herself....! :roll:

Although we're on landline Ethernet, because of the afore-mentioned 'problems', most of the area is lagging well behind the rest of the country in Broadband speed thresholds, due to the 'interference shielding' they have to build in to the landline installations, in order to ensure they function as they're supposed to. Even local satellite dish installations need to have a special 'lining' on the back of the dish itself, to dissipate magnetic interference from the ground. I think we're the only area in the UK that has an unusual problem of this nature. And national IPs, of course, just want to wash their hands of the problem (though they're quick enough to take your money for a service which is often patchy at best). Which means our local telecoms people often have to source access to the national network as & how best they can.

Hence the geo-locations often being so far away..! :roll:

It's almost akin to having a built-in VPN..... :lol:


Mike. :wink:
Last edited by Mike Walsh on Fri 12 Oct 2018, 21:39, edited 2 times in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#16 Post by fredx181 »

Thanks for the explanation Mike ! Oh, that good old Cornelius :)

Fred

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

#17 Post by Mike Walsh »

@ Fred:-

Just to put the 'lie' to all this, guess what?

I've just 'installed' it into Raring.....and the geo-locate has actually found me, correctly, in King's Lynn, at the first attempt. Co-ordinates are fractionally out, perhaps, but they're close enough to do the job without needing to edit ~/.rshift/geo-info.

See what I mean about unpredictable? :lol: Anyroad, I don't think there's very much wrong with that particular piece of it.....

Here's one you can use to pinpoint exact GPS co-ordinates to 6 decimal places:-

http://www.whatsmygps.com/

Very simple to use, too. Zoom in to the location of your choice, right-click on it (to place a 'marker').....and the exact co-ordinates come up in the field to the left. Easy-peasy.

-----------------------------------

I'm trying really hard to think of any suggestions for 'improvements'.....but I honestly feel you've covered all the bases! This is very sweet; a blend of the manually-operated Bright/Tint control I thought of, and a GTK/YAD-based home-brew 'front-end' for the CLI version of Redshift itself......using, moreover, auto-locate. Which is an improvement on basic Redshift itself...

And this seems more reliable than Redshift's own GUI. On occasion, I've clicked the icon to bring the GUI up.....and it's suddenly expanded to more than 5 times the dimensions of my screen..! Lots of Alt-dragging , with the four-way arrow, to find any of the actual controls.....

Weird.


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#18 Post by fredx181 »

Weird indeed Mike !

I can think of only two reasons:
- England has been moved 60 miles to the south-west since yesterday.
- One of your ministers read your post and finally decided to take the necessary steps for solving this.
:roll: :lol:
Here's one you can use to pinpoint exact GPS co-ordinates to 6 decimal places:-

http://www.whatsmygps.com/
Nice, thanks, well for me the auto-locate is not exact, just around a mile away, which is ok of course.
And this seems more reliable than Redshift's own GUI. On occasion, I've clicked the icon to bring the GUI up.....and it's suddenly expanded to more than 5 times the dimensions of my screen..! Lots of Alt-dragging , with the four-way arrow, to find any of the actual controls.....
Yes, I also had that a couple of times, really annoying.

P.S. I tested now on Racy 5.5 with the "normal" rshift-portable-32 and works fine, so no need for the special Wary version.

Fred

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

#19 Post by Mike Walsh »

Hi, Fred.

Well, all three versions are mirrored here:-

https://drive.google.com/drive/folders/ ... sp=sharing

I'll make sure the community doesn't lose access to these, at any rate!


Mike. :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#20 Post by fredx181 »

*** Updated to v2 ***

See first post for new attachments.
Unfortunately the provider to get the geo location from (used in the older version) requires a API key now.
(EDIT: Well, at least for me, could also be that there's a limitation on the number of times you use it)
EDIT: No, I see now that it's discontinued:
https://github.com/nekudocom/shiny_geoi ... .md#readme
So "auto-locate" didn't work anymore.
Changed in v2 now to "ipinfo.io"
Running for the first time will remove the older geo-info (if exists) (and will be re-configured again when selecting "Auto mode")

Fred

Post Reply