Comments (8)
I think that is reasonable. I'm wondering if it should also cache the last location returned by Geoclue and use that if Geoclue becomes unavailable. Then the question is, should the cache or the manual setting be preferred?
from redshift.
๐ for the geoclue caching.
I'd say the cached value as you can still temporary force the manual value to be used by disabling the geoclue method.
from redshift.
I agree with Physks, but definitely print a warning.
from redshift.
More information on Launchpad: https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/868904
from redshift.
Complementing the great ideas already suggested, I'd propose the following scheme:
- Don't exit if no network connection is available. Just keep trying to query GeoClue and, meanwhile, use cached coordinates.
- Cache the last used coordinates, no matter if they came from GeoClue or were specified manually.
This way:
- Users that don't expect to have an Internet connection can set the coordinates manually (once) and have them cached.
- Users that don't have a connection at startup (but usually do afterwards) can have cached coordinates used at startup, but updated when possible.
from redshift.
@igorrs, that solution won't work if it fails the first time you try starting the program (happened to me).
It was kind of confusing for me when redshift-gtk wouldn't start, and I had to guess that manually providing lat+long would magically make the program work. Imagine some total n00b trying to run it, and have it just silently fail. They will (rightly) conclude that the program is broken.
I say that if a location is not available, for whatever reason, the program should gracefully fallback to using the local time for setting the redshift. Red between 21:00 and 06:00 would be fine, I think.
from redshift.
It was kind of confusing for me when redshift-gtk wouldn't start, and I had to guess that manually providing lat+long would magically make the program work. Imagine some total n00b trying to run it, and have it just silently fail. They will (rightly) conclude that the program is broken.
What you could do in this case is start the daemon but just let the screen untouched until you can get a location (probably showing a warning to the user). Not starting the daemon at all doesn't make all that sense :)
from redshift.
I say that if a location is not available, for whatever reason, the program should gracefully fallback to using the local time for setting the redshift. Red between 21:00 and 06:00 would be fine, I think.
You could probably get a bit smarter and adjust that given the date and timezone...
from redshift.
Related Issues (20)
- redshift-gtk doesn't read conf files at log-in HOT 1
- Redshift -O Temperature not changing after OS update HOT 1
- Use the astral python package for more accurate calcuations of sunrise, noon, sunset, and dusk times for a given latitude and longitudeย HOT 1
- Random Flickering on Manjaro Cinnamon Edition
- Black body colors table?
- Not working on Pop OS
- symbolic link problem with configuration file HOT 2
- erroneous documentation about configuration file HOT 6
- Starting nvidia-settings kills redshift
- "Unable to set gamma ramps. Temperature adjustment failed." in win10 HOT 1
- Color adjustments are applied to cursor twice HOT 4
- It is too easy to end up with multiple, and indeed conflicting, instances. (A documentation problem?)
- errror in kali linux when use "redshift -b 0.6:0.5" HOT 1
- Authorization required, but no authorization protocol specified | OpenSUSE Tumbleweed HOT 1
- Toggle day and night modes in redshift HOT 4
- Screen 1 could not be found. Failed to start adjustment method randr. HOT 1
- Error!!!, no more methods to try
- [bug] Could not connect to wayland display, exiting. Failed to start adjustment method wayland. HOT 1
- disable on screensaver start
- Is it working ? I can't tell.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redshift.