Skip to content

ltguillaume/redshift-tray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redshift Tray

by ltGuillaume: Codeberg | GitHub | Buy me a beer 🍺

Overview

Redshift Tray is a no-frills GUI for the excellent screen temperature adjustment tool Redshift by Jon Lund Steffensen. Redshift Tray allows you to:

  • Control Redshift based on location or custom night/day times
  • Quickly enable/disable Redshift: double-click the tray icon
  • Force a full nighttime temperature adjustment, no matter what the actual time is
  • Pause the temperature adjustment for x minutes
  • Adjust the screen brightness and forced temperature via hotkeys
  • Optionally update your current coordinates every time you enable Redshift (e.g. when traveling)
  • Use a fantastic set of extra hotkeys that have got nothing to do with Redshift
  • Make use of Remote Desktop: Redshift hotkeys will stay active locally, while Redshift Tray can also run on the remote system for its optional hotkeys

It also includes a set of extra hotkeys. Admittedly, these are entirely based on my personal preferences, but since this program is put together in AutoHotkey, it's easy to add your own hotkeys and remove the ones you think are rubbish.

List of hotkeys

Hotkeys  
Alt Home Reset Redshift (press again to reset brightness)
Alt Pause Pause Redshift for the set amount of minutes
Alt End Disable Redshift
Alt PgUp Increase brightness
Alt PgDn Decrease brightness
RAlt Home Force night temperature (press again to reset brightness)
RAlt End End forced temperature
RAlt PgUp Increase forced temperature
RAlt PgDn Decrease forced temperature
Extra Hotkeys  
LCtrl LWin Type to run
RWin
RCtrl RAlt
RCtrl Menu
LCtrl LWin x2 Windows Run dialog
RWin x2
RCtrl RAlt x2
RCtrl Menu x2
RAlt 9 Toggle window on top click-through
RAlt 0 Toggle window always on top
RAlt - Decrease window opacity
RAlt = Increase window opacity
RAlt . Switch between open items (Alt Tab)
RAlt , Switch between open items (Shift Alt Tab)
RAlt x2 Close current tab/window
Menu + Arrows Aero Snap
Menu Pause Suspend computer
Menu Home Restart computer
Menu End Hibernate computer
Menu P Presentation display mode
Menu , MM: Previous
Menu . MM: Next
Menu / MM: Stop
Menu Shift MM: Play/Pause
Menu M MM: Mute
RCtrl Up MM: Volume up
RCtrl Down MM: Volume down
Wheel on taskbar MM: Volume up/down
Double-click on taskbar Show desktop
Middle-click on taskbar Open Task Manager
Ctrl click on taskbar Toggle autohide taskbar
Remote Desktop mode  
RCtrl x2 Switch between RDP host/client

Getting started

  1. Download Redshift Tray from the releases page and extract it to a folder for which your user account has writing permissions. Alternatively, you can install it with Chocolatey or with Scoop (scoop bucket add extras, then scoop add redshift-tray).
  2. Run rstray.exe and you'll see a handsome icon pop up in the notification area next to your clock. Now right-click it and choose Settings. You can quickly switch some features on/off, or choose More Settings. The text file rstray.ini that shows up in your editor contains all the settings for Redshift Tray.
    • For accurate coordinates, you can set them yourself, otherwise it uses your IP and the ipapi service (one time only). Use a search engine, Maps, Wikipedia, or whatever and jot down your coordinates behind latitude and longitude. Use periods (.) for decimal symbols.
    • During the day, the color temperature should match the light from outside, typically around 5500K-6500K. The light has a higher temperature on an overcast day. Redshift assumes that your screen will produce light at a color of 6500K when no color correction is applied by the program. Thus, 6500K is the neutral temperature. The daytemp setting helps you set this value (e.g. daytemp=6500).
    • At night, the color temperature should be set to match the lamps in your room. This is typically a low temperature at around 3000K-4000K. The nighttemp setting helps you out here (e.g. nighttemp=3500).
    • Redshift Tray can check if the active window is in full-screen mode and automatically switch to a different color temperature (useful for image viewers and video players). Set the fullscreentemp to your preferred value and enable this feature with fullscreenmode=1. If you wish to exclude some full-screen windows from full-screen mode (such as browsers), you can specify a list of their WinTitles in fullscreenignore. For example, fullscreenignore=ahk_class MozillaWindowClass|ahk_class Chrome_WidgetWin_1 will exclude Firefox and Chrome/Chromium windows from full-screen mode.
    • You can temporarily disable Redshift's color adjustment for a few (or a whole lotta) minutes. Set the amount of those hella blue minutes with the pauseminutes setting.
    • If you want total control over the times at which Redshift will be setting the color temperature, adjust nighttime=1800 and daytime=0600, where the values depict 24h military time. Then, set customtimes=1. At night, the nighttemp value will be applied, while during the day, the daytemp will be set.
    • In some cases (especially when switching to and from external screens), Redshift might crash. If the mode is Enabled, Redshift Tray can periodically check whether the process redshift.exe should be restarted. For example, you can define keepaliveseconds=5 to check for the Redshift process every 5 seconds. A value of 0 will turn it off.
    • If you get annoyed by the fact that your mouse cursor does not assume the same color temperature, set colorizecursor=1 and Redshift Tray will write MouseTrails=-1 to HKCU\Control Panel\Mouse in your registry to fix this. You'll need to save and exit the config file, then restart Windows or log off to get this working.
    • The setting hotkeys=1 will enable the set of hotkeys, while (big surprise) hotkeys=0 disables them. Similarly, you can control the extra set of hotkeys with the entry extrahotkeys.
    • Among these hotkeys is RAlt x2, for which you can specify a set of WinTitles to use Ctrl+W instead of Alt+F4. For example, specify ctrlwforralt=ahk_class TTOTAL_CMD|ahk_exe gajim.exe to use Ctrl+W for the Total Commander main window (which has tabs) and Gajim messenger windows.
    • With keepbrightness=1 you can apply the brightness setting even when you disable the gamma adjustment (when paused or disabled). This could help if your monitor starts humming or flickering with a low backlight brightness. You will lose some "color space", though.
    • If you have loaded an ICC profile or have done a custom display calibration (Control Panel > Color Management > Advanced), Redshift might interfere with this. As such, you can set keepcalibration=1 to have Redshift Tray keep that into account. This will, however, require Redshift Tray to run as administrator (it will take care of that for you).
    • If you loathe the fading transition upon start-up, just set nofading=1.
    • If you're a Remote Desktop addict like me, be sure to set remotedesktop=1. This way, you can run this gem in both environments, switch between local and remote sessions by double-tapping RCtrl, and change the local Redshift settings while in a remote screen.
    • I often continue a session remotely via a laptop without numeric keypad. Once I return to the system and log on locally, I want the NumLock state to be enabled again. rdpnumlock=1 will take care of this.
    • If you want to be able to use the hotkeys when a program that runs as administrator is focused, set runasadmin=1 so that Redshift Tray will try to run as administrator, too.
    • If you don't want Redshift to be enabled on start-up (because you just want to use the fancy hotkeys, for example), set startdisabled=1.
    • Traveling with your laptop? You can set traveling=1 after which the coordinates will be updated every time Redshift is enabled. It'll keep its mouth shut if there's no Internet connection, though. Be aware that each time this will trigger a query to the ipapi service (specifically to the URL https://ipapi.co/latlong). Since the location is based on your IP, don't use this when a VPN is active.
  3. Now save the settings file and close it. Redshift Tray will restart with the settings you've defined.
  4. If you'd like Redshift Tray to automatically run at startup, right-click the tray icon again and click Autorun under Settings, so that this option is checked. This setting creates a scheduled task so that Redshift Tray will start when the current user is logging on. It will try to run as administrator if you have enabled keepcalibration or runasadmin.
  5. If Redshift fails to adjust the color temperature, or the brightness level gets stuck at a certain percentage, import unlock-gammarange.reg into the registry and restart Windows.

You. Are. Done!

Credits