redshift icon indicating copy to clipboard operation
redshift copied to clipboard

Option to toggle Redshift on/off with reading-mode button keypress

Open da2x opened this issue 10 years ago • 10 comments

My Lenovo Yoga 3 Pro has a special key intended to toggle redshifting/reading mode on and off. Works out of the box on Windows, but not in Linux. Redshift should have an option to respond to this or another configurable key to toggle on/off. The key identifies as 0xbf/e03f.

da2x avatar Apr 06 '15 20:04 da2x

I think this might be appropriate as a feature in redshift-gtk. Is there a unified way of registering for these keyboard events through Gtk or does it depend on the desktop environment?

jonls avatar Apr 25 '15 15:04 jonls

pkill -USR1 '^redshift$' toggles redshift on and off. You should be able to set up xbindkeys to run that command when the key is pressed.

maandree avatar Apr 25 '15 15:04 maandree

The pkill command above didn't work for me. I ended up assigning two different keyword shortcuts (Using All Settings --> Keyboard --> Shorcuts on Ubuntu 16):

  • normal mode: xrandr --output LVDS1 --brightness 1
  • reading mode: redshift -O 3500

I'm a linux noob though - maybe there's an easier way.

josephrocca avatar Mar 03 '18 02:03 josephrocca

I'd also be interested in this. Specifically some sort of command line argument to toggle between day and night. Something like redshift -T.

Implemented like this, you could bind a key to execute that command in various environments, such as i3wm.

patrickmcnamara avatar Jun 14 '18 22:06 patrickmcnamara

Yep, this would be really good. Sometimes I'm watching a film, when a darker scene comes up. I can't make out what's going on so turn off redshift for the scene. Pausing the film, then using the mouse to activate the menu and click the button distracts from the plot/action/suspense somewhat.

A keyboard shortcut would be ideal in this situation.

Cheers!

robinpaulson avatar Sep 30 '20 21:09 robinpaulson

Hello! Is there a way to know the current redshift status? I want to teach my WM to turn it off automatically when I use specific applications and turn it on back when I close/hide them.

$ redshift -V
redshift 1.12
$ cat /etc/issue
Debian GNU/Linux bullseye/sid \n \l

Thank you in advance!

liuch avatar Mar 23 '21 02:03 liuch

(pgrep redshift && pkill redshift ) || redshift &. Just bind this to keys or create an alias.

RavikanthDodda avatar May 01 '22 08:05 RavikanthDodda

Hello! Is there a way to know the current redshift status? I want to teach my WM to turn it off automatically when I use specific applications and turn it on back when I close/hide them.

I would also be interested in such a feature. I need a command-line tool to get the state of Redshift (if it's toggled on or off).

MoonSweep avatar Sep 10 '22 14:09 MoonSweep

pkill -USR1 '^redshift$' toggles redshift on and off. You should be able to set up xbindkeys to run that command when the key is pressed.

Works for me in Zorin 16.2 (debian based distro). Thank you very much!

N00BM4573R avatar Jul 20 '23 12:07 N00BM4573R

pkill -USR1 '^redshift$'

Had no idea redshift process responded to signals. Didn't see that in redshift manpage. The pkill suggested above works great! I assigned the Pause key to it.

dougmccasland avatar Aug 31 '23 02:08 dougmccasland