Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Added Gui slider and Mouse scroll events for changing temperature - #674

Open
irfan798 wants to merge 2 commits into
sharpbracket:masterfrom
irfan798:master
Open

irfan798 wants to merge 2 commits into
sharpbracket:masterfrom
irfan798:master

Conversation

@irfan798

@irfan798 irfan798 commented Oct 7, 2018

Copy link
Copy Markdown

Since Redshift wont allow temperature changes while working I added manual mode option which launches redshift with oneshot option
While in manual mode we can change temperature with slider or with mouse scroll event on App Icon

an mode change logic, spawn redshift with oneshot or on automode
Added+ Gui slider for changing temperature manually
Added+ Toggle button for manual mode
Added+ remove watching process when child process exits
Fixed a typo on _child_cb
Added+ Mouse scroll on icon changes temperature if manual mode enabled
@etem

etem commented Feb 21, 2019 •

Copy link
Copy Markdown

That works perfectly. Thank you!

@OndrejMalek

Copy link
Copy Markdown

Nice PR thx
I have found a bug


name: Bug report
about: When Manual mode enabled while opened Info window and scrolling on status icon program freezes


Describe the bug
When Manual mode enabled while opened Info window and scrolling on status icon program freezes

To Reproduce
Steps to reproduce the behavior:

  1. Start redshift from terminal : redshift-gtk
  2. open 'Info' window from status icon
  3. enable 'Manual mode'
  4. change color temperature by slider
  5. change color temperature by scrolling on status icon
  6. program freezes not responding to user actions

Error output/logs/screenshots

(redshift-gtk:18649): Gdk-CRITICAL **: 18:09:31.474: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 327, in temperature_slider_changed_cb
self._controller.do_change_temperature(int(adj.get_value()))
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 313, in do_change_temperature
self._spawn_redshift_oneshot(args)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 147, in _spawn_redshift_oneshot
standard_output=True, standard_error=True)
GLib.Error: g-unix-error-quark: Too many open files (0)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 240, in indicator_scroll_cb
self.handle_scroll('Up')
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 248, in handle_scroll
self._controller.temperature + scroll)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 313, in do_change_temperature
self._spawn_redshift_oneshot(args)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 147, in _spawn_redshift_oneshot
standard_output=True, standard_error=True)
GLib.Error: g-unix-error-quark: Too many open files (0)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 327, in temperature_slider_changed_cb
self._controller.do_change_temperature(int(adj.get_value()))
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 313, in do_change_temperature
self._spawn_redshift_oneshot(args)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 147, in _spawn_redshift_oneshot
standard_output=True, standard_error=True)
GLib.Error: g-unix-error-quark: Too many open files (0)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 240, in indicator_scroll_cb
self.handle_scroll('Up')
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/statusicon.py", line 248, in handle_scroll
self._controller.temperature + scroll)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 313, in do_change_temperature
self._spawn_redshift_oneshot(args)
File "/usr/local/lib/python3.6/site-packages/redshift_gtk/controller.py", line 147, in _spawn_redshift_oneshot
standard_output=True, standard_error=True)
GLib.Error: g-unix-error-quark: Too many open files (0)

........

Software versions (please complete the following information):

  • OS: System: Host: malekon Kernel: 4.15.0-65-generic x86_64 bits: 64 gcc: 7.4.0
    Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu4) dm: lightdm Distro: Linux Mint 19 Tara
  • Redshift version: git@github.com:irfan798/redshift.git - master 2018-10-07 c9fbfed
  • Distribution: Linux Mint 19 Tara
  • Redshift installed from: "built from source"

@irfan798

irfan798 commented Oct 28, 2019 •

Copy link
Copy Markdown
Author

Thank you for the detailed report
I will look into it

@beerbears

Copy link
Copy Markdown

Hello I would like to try this app out. But I am new to linux. Any idea how to give it a shot? I have redshift installed and I am changing temperature via going into start up apps and modifying. I have to log out and log back in for changes to take effect

@OndrejMalek

Copy link
Copy Markdown

@irfan798 Over the time some upgrades of Linux mint made mouse scroll over icon not working
System: Host: malekon Kernel: 5.4.0-56-generic x86_64 bits: 64 compiler: gcc v: 7.5.0
Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Nowdays I do not need this PR because it is solved by cinnamon spice applet called QRedshift

@beerbears What linux distribution are you at? It might be possible it was already solved elsewhere as mentioned above.

@beerbears

Copy link
Copy Markdown

@irfan798 Over the time some upgrades of Linux mint made mouse scroll over icon not working
System: Host: malekon Kernel: 5.4.0-56-generic x86_64 bits: 64 compiler: gcc v: 7.5.0
Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Nowdays I do not need this PR because it is solved by cinnamon spice applet called QRedshift

@beerbears What linux distribution are you at? It might be possible it was already solved elsewhere as mentioned above.

Hello I am on LM20 Ulyana. The magic mouse 2, right and left buttons work but cannot scroll. I read online scroll works by default in newest Ubuntu so wondering if this is a quick fix

@OndrejMalek

OndrejMalek commented Dec 23, 2020 •

Copy link
Copy Markdown

@beerbears As I mentioned above scrolling over redshift icon at bottom panel to change color temperature stopped working. I would recommend you to install applet QRedshift. How it looks is here: https://cinnamon-spices.linuxmint.com/applets/view/313.
Installation steps: Start menu -> Preferences -> Applets -> Download (change tab) -> find QRedshift download by arrow down icon -> got back to manage tab -> select QRedshift -> press + ->icon should appear on bottom panel

@beerbears

beerbears commented Dec 24, 2020 via email

Copy link
Copy Markdown

@beerbears

Copy link
Copy Markdown

@beerbears As I mentioned above scrolling over redshift icon at bottom panel to change color temperature stopped working. I would recommend you to install applet QRedshift. How it looks is here: https://cinnamon-spices.linuxmint.com/applets/view/313.
Installation steps: Start menu -> Preferences -> Applets -> Download (change tab) -> find QRedshift download by arrow down icon -> got back to manage tab -> select QRedshift -> press + ->icon should appear on bottom panel

@OndrejMalek Following you're instructions I was able to get Qredshift applet working. Thank you for the direction! God bless and happy holidays

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants