Coder Social home page Coder Social logo

maandree / blueshift Goto Github PK

View Code? Open in Web Editor NEW
88.0 12.0 9.0 718 KB

An extensible and highly configurable alternative to redshift

Home Page: https://codeberg.org/maandree/blueshift

License: Other

Makefile 4.24% Python 91.87% C 3.89%
blueshift redshift ergonomics colour cct colour-temperature colour-profiles icc darkroom battery

blueshift's People

Contributors

jigpu avatar maandree avatar wolftune avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blueshift's Issues

reading icc profile

Hi, I'm excited to find this app. I run linux on a macbook and use xcalib to calibrate the lcd with the icc profile that came with the machine. Can you help me translate the info in the icc to settings appropriate for blueshift?

thx!

RandR reports incorrect physical dimensions

Why does RandR report smaller monitor dimension than DRM?
My monitors have a visible area of (a very small amount of
millimeters larger than) 400 mm by 300 mm (and a few extra
centimeters in both dimension that are covered by the edges
on the monitor casing.)

RandR reports 364 mm × 291 mm, while DRM accurately reports
400 mm × 300 mm.

Hurd support

It does not appear like GNU Hurd have an API
for modifying the gamma ramps yet.

Mir support

It does not appear that Mir currently have
an API for modifying the gamma ramps.

I have not been able to compile Mir
(which is required for XMir) so I do not
know if XMir supports Blueshift.

How X sets the gamma ramps

X multiplies 1 byte values with 256 rather than 257. This means
that a value encoded FFh gets the output value FF00h rather tan
FFFFh. Why does X do it like this?

Haiku support

Haiku does not have currently have
support for modifying gamma ramps.

Also, last time I check Python 3 was
not available for Haiku.

Frequency shifting

If display servers had an way to intercept selected colours
and manipulate them, we could do things like manipulating
the colours' wavelength/frequency.

If this was implemented, we could also circumvent the
requirement of being able to adjust gamma ramps, however
will less precision.

libgamma_error.LibgammaError: LIBGAMMA_GAMMA_RAMP_WRITE_FAILED

Since updating my system yesterday (including updating xorg-* to 1.20), blueshift does not start for me, but crashes with this output:

$ blueshift -c /usr/share/doc/blueshift/examples/bedtime
Traceback (most recent call last):
  File "/usr/bin/blueshift/__main__.py", line 467, in continuous_run
  File "/usr/bin/blueshift/__main__.py", line 360, in p
  File "/usr/share/doc/blueshift/examples/bedtime", line 287, in periodically
    apply_curves()
  File "/usr/bin/blueshift/monitor.py", line 147, in randr
  File "/usr/bin/blueshift/monitor.py", line 80, in set_gamma
  File "/usr/lib/python3.6/libgamma_method.py", line 1116, in set_gamma
    raise create_error(r)
libgamma_error.LibgammaError: LIBGAMMA_GAMMA_RAMP_WRITE_FAILED

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/blueshift/__main__.py", line 742, in <module>
  File "/usr/bin/blueshift/__main__.py", line 546, in continuous_run
  File "/usr/share/doc/blueshift/examples/bedtime", line 310, in reset
    apply_curves()
  File "/usr/bin/blueshift/monitor.py", line 147, in randr
  File "/usr/bin/blueshift/monitor.py", line 80, in set_gamma
  File "/usr/lib/python3.6/libgamma_method.py", line 1116, in set_gamma
    raise create_error(r)
libgamma_error.LibgammaError: LIBGAMMA_GAMMA_RAMP_WRITE_FAILED
Exception ignored in: <bound method Site.__del__ of <libgamma_method.Site object at 0x7f6e9ad14fd0>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/libgamma_method.py", line 947, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <bound method Partition.__del__ of <libgamma_method.Partition object at 0x7f6e9ac7d3c8>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/libgamma_method.py", line 1000, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <bound method CRTC.__del__ of <libgamma_method.CRTC object at 0x7f6e9ac7d470>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/libgamma_method.py", line 1046, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down

Hello there

I'm a newbie to linux, and I saw that your program has the ''darkroom mode'' option, which I always use when I'm using Windows. I have installed it via yaourt on antergos, but I don't know how to start it up in the terminal, or to say, how to ''open it'' so I can use the options. I saw you have provided information how to set up the darkroom mode, I just don't know with what to begin with.

Thankful for any information.

arch No configuration file found

hello i install blueshift on arch using aur but when i want start i have this error:

No configuration file found

and dont see in description on github that i must create some file?

Wayland support

It does not appear that Wayland currently
have an API for modifying the gamma ramps.

XWayland does however support Blueshift
transparently.

Hardware cursor patch for X

It should not be, and it does not look to be, too difficult
to patch xserver to apply gamma ramps to hardware
cursors.

[regression] -o does not work in ad-hoc mode

$ blueshift -p -o 0 -t 6500
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/blueshift/__main__.py", line 664, in <module>
  File "/usr/bin/blueshift/adhoc.py", line 168, in <module>
  File "/usr/bin/blueshift/adhoc.py", line 132, in apply
  File "/usr/bin/blueshift/adhoc.py", line 102, in <lambda>
  File "/usr/bin/blueshift/monitor.py", line 147, in randr
  File "/usr/bin/blueshift/monitor.py", line 73, in set_gamma
  File "/usr/bin/blueshift/libgammaman.py", line 106, in get_crtc
  File "/usr/lib/python3.4/libgamma_method.py", line 1035, in __init__
    (self._state, n) = libgamma_native_crtc_create(partition._state, crtc)
  File "libgamma_native_facade.pyx", line 1031, in libgamma_native_facade.libgamma_native_crtc_create (obj/libgamma_native_facade.c:3164)
TypeError: an integer is required
Exception ignored in: <bound method CRTC.__del__ of <libgamma_method.CRTC object at 0x7fc4f04caa58>>
Traceback (most recent call last):
  File "/usr/lib/python3.4/libgamma_method.py", line 1047, in __del__
    if not self._state == 0:
AttributeError: 'CRTC' object has no attribute '_state'
Exception ignored in: <bound method Site.__del__ of <libgamma_method.Site object at 0x7fc4f04ca940>>
Traceback (most recent call last):
  File "/usr/lib/python3.4/libgamma_method.py", line 947, in __del__
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2155, in _find_spec
TypeError: 'NoneType' object is not iterable
Exception ignored in: <bound method Partition.__del__ of <libgamma_method.Partition object at 0x7fc4f04cad68>>
Traceback (most recent call last):
  File "/usr/lib/python3.4/libgamma_method.py", line 1000, in __del__
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2155, in _find_spec
TypeError: 'NoneType' object is not iterable

Detect total output brightness

Inspect the output of a monitor to determine the total brightness;
if there is only white on the monitor the total brightness is 1, and
if there is only black on the monitor the total brightness i 0.
This could be used to change the temperature, brightness or backlight
if the brightness suddenly changes significantly. For example, if I am
working in the terminal chances are that it is 90 % black, and if a
switch workspace to my mail there will be 90 % white. This change is
very unpleasent if you are use to a dark or low temperature output.

If this is implemented, it is important to remember that neither linear
RGB and sRGB can be used to calculate perceptual brightness. And
the in sRGB every pixel being at 188 is the same brightness as half
of the pixels being black and half of the pixels being white.

snap support

snap allows applications to run on any snap installed linux distro securely via jailed settings. it is easy to setup your applications as a snap package and it is easy to use for clients. This way anyone who want to try your app won't have doubts about security and this will happen without having to go through whole codebase to be sure. Not only it is more secure also it is way easier for end user to just click install on snapstore instead of compiling, installing, creating autostart etc. also thanks to snap apps will automatically upgrade on background without an effort.

Automatic gamma correction

Allow automatic approximate gamma correction. This can be done by parsing the monitor's EDID. If the monitors gamma is B, then the gamma correction is be around B÷2,2. This can be useful if you are planning to use Blueshift on random machines for which you do not know the calibration parameters; for example if you are in a computer laboratory room.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.