tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.2k stars 228 forks source link

RedShift isn't working for somereason #908

Closed RobCod closed 1 year ago

RobCod commented 1 year ago

Bug Report

I have redshift plugged into my iw3/config as I show below, but the temperature stays 4500K I even manually put in my geo location and it stays 4500K.

redshift.location="ipinfo"

redshift.location="manual" redshift.lat="50" redshift.lon="-114" \

Affected module: redshift Version used: latest-git

I have redshift plugged into my iw3/config as I show above, but the temperature stays 4500K I even manually put in my geo location and it stays 4500K.

How to reproduce

put the above in your bar and it might go to 5000K momentarily, but then it will drop to a very blue color. if you type in a terminal redshift -l 50:-100 it will turn red, but not with the bar version and when you do it in the console it doesn't change the bars number at all.

tobi-wan-kenobi commented 1 year ago

Could you please try to run bumblebee-status in debug mode on the CLI (just "bumblebee-status -d -f -m redshift -p " and paste the contents of the logfile here?

Also, please make sure that there is no ~/.config/redshift.conf (afaik, the settings there take precedence). And also, please check that there is no redshift process running already that might interfere.

RobCod commented 1 year ago

There is no ~/.config/redshift.conf.

When I run "./.config/i3/bumblebee-status/./bumblebee-status -d -f /home/robcod/log.txt -m redshift -p redshift.location="ipinfo"" in the terminal gives me.

./bumblebee-status -d -f /home/robcod/log.txt -m redshift -p redshift.location="ipinfo"
{"version": 1, "click_events": true}
[
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "e35e5f56-d433-4d1f-9617-d707b9db1bd8", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "ddf5dfc1-2383-49b8-a858-35514c1bc1fa", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "e35e5f56-d433-4d1f-9617-d707b9db1bd8", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " day 6500K ", "color": "#aabbcc", "name": "redshift", "instance": "ddf5dfc1-2383-49b8-a858-35514c1bc1fa", "_raw": "6500K", "_suffix": " ", "_prefix": " day ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "e35e5f56-d433-4d1f-9617-d707b9db1bd8", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " day 6500K ", "color": "#aabbcc", "name": "redshift", "instance": "ddf5dfc1-2383-49b8-a858-35514c1bc1fa", "_raw": "6500K", "_suffix": " ", "_prefix": " day ", "align": null}],
^CTraceback (most recent call last):
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 146, in <module>
    main()
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 138, in main
    output.wait(config.interval())
  File "/home/robcod/.config/i3/bumblebee-status/bumblebee_status/core/output.py", line 275, in wait
    time.sleep(interval)
KeyboardInterrupt

When I run

./bumblebee-status -d -f /home/robcod/log.txt -m redshift -p redshift.lat="50" redshift.lon="-114"
{"version": 1, "click_events": true}
[
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
^CTraceback (most recent call last):
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 146, in <module>
    main()
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 138, in main
    output.wait(config.interval())
  File "/home/robcod/.config/i3/bumblebee-status/bumblebee_status/core/output.py", line 275, in wait
    time.sleep(interval)
KeyboardInterrupt
tobi-wan-kenobi commented 1 year ago

After the "-p", can you please try to add your redshift parameters like in the original post?

RobCod commented 1 year ago

After the "-p", can you please try to add your redshift parameters like in the original post?

Like this?

./bumblebee-status -d -f /home/robcod/log.txt -m redshift -p redshift.lat="50" redshift.lon="-114"
{"version": 1, "click_events": true}
[
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " debug ", "color": "#aabbcc", "name": "debug", "instance": "c57949a4-380f-4d62-a610-00320ef9a35b", "_raw": "debug", "_suffix": " ", "_prefix": " ", "align": null}, {"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "9bd7701d-0d83-4500-b311-ad9a0fbba131", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
^CTraceback (most recent call last):
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 146, in <module>
    main()
  File "/home/robcod/.config/i3/bumblebee-status/./bumblebee-status", line 138, in main
    output.wait(config.interval())
  File "/home/robcod/.config/i3/bumblebee-status/bumblebee_status/core/output.py", line 275, in wait
    time.sleep(interval)
KeyboardInterrupt
tobi-wan-kenobi commented 1 year ago

@RobCod Yes exactly. Sorry, I was on mobile before and didn't see that you already posted this.

This is the output for me:

$ ./bumblebee-status -m redshift -p redshift.location="manual" redshift.lat="50" redshift.lon="-114"
{"version": 1, "click_events": true}
[
[{"full_text": " n/a ", "color": "#aabbcc", "name": "redshift", "instance": "e14d4a56-c90d-4e5e-aea5-f09e622c9475", "_raw": "n/a", "_suffix": " ", "_prefix": " ", "align": null}],
[{"full_text": " night 3000K ", "color": "#aabbcc", "name": "redshift", "instance": "e14d4a56-c90d-4e5e-aea5-f09e622c9475", "_raw": "3000K", "_suffix": " ", "_prefix": " night ", "align": null}],
[{"full_text": " night 3000K ", "color": "#aabbcc", "name": "redshift", "instance": "e14d4a56-c90d-4e5e-aea5-f09e622c9475", "_raw": "3000K", "_suffix": " ", "_prefix": " night ", "align": null}],
[{"full_text": " night 3000K ", "color": "#aabbcc", "name": "redshift", "instance": "e14d4a56-c90d-4e5e-aea5-f09e622c9475", "_raw": "3000K", "_suffix": " ", "_prefix": " night ", "align": null}],

Oh - I remember (sorry, it has been a while since I wrote that particular widget): The module redshift operates in "read mode" only - i.e. it does not change the settings, it just displays whatever the current redshift value is (or, if you enter manual parameters, whichever red value this setting would give you). I did this because most people use redshift either in some kind of daemon mode (started by their window manager), or via something like redshift-gtk.

So if you have redshift running, this module would just give you the current value, but not change anything.

Hope this makes sense and explains the behaviour!

If you want to, I think I could add a parameter that changes the behaviour to actually also start redshift.

RobCod commented 1 year ago

Ahhh okay, I thought it actually pushed the settings to Redshift. I noticed last night that it set it to 4300k (14% nighttime) last night at like 11pm ish so I think it might be working in that regard, but maybe adding a max out option for people that want a lower temperature depth would be good.

Do you know of any place I can read into more on pushing that to a daemon to control it from the bar?

If you want to, I think I could add a parameter that changes the behaviour to actually also start redshift.

If its not too much extra work, that would probably be a good feature, I thought thats how it worked by how the documentation explained it haha

tobi-wan-kenobi commented 1 year ago

I will have a look. I think they way I always used it was to have a redshift.conf that contains min/max values and an entry in my i3 config to spawn redshift at startup.

tobi-wan-kenobi commented 1 year ago

@RobCod If you add "redshift.adjust=true" to your parameters, bumblebee-status should now update the color temperature every time the module is updated (by default, once every 10s).

Hope it works for you & fixes your problem!