GithubHelp home page GithubHelp logo

ltguillaume / redshift-tray Goto Github PK

View Code? Open in Web Editor NEW
60.0 7.0 1.0 1.2 MB

A no-frills GUI for the excellent Redshift, with some optional OS hotkeys

Home Page: https://codeberg.org/ltguillaume/redshift-tray

License: GNU General Public License v3.0

AutoHotkey 100.00%
redshift windows autohotkey autohotkey-script color-temperature screen-brightness wrapper hotkeys

redshift-tray's Introduction

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

redshift-tray's People

Contributors

ltguillaume 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mepherion

redshift-tray's Issues

Turning off location completely

I appreciate that this is a marginal user case, but I really just want to turn Redshift on and off as I please, with no automated times. Also, even though apps can locate me from my IP, I'd rather they don't.

Any handy configuration setting to kill the autolocation function?

Feature suggestion: Custom on/off time

If you I wish to add something new to the next versions, you may want to add this feature.

This is the SunsetScreen program author's explanation:

Programs such as F.lux partially solve the problem, but in the winter, I found the sunsets came too early. This caused F.lux to darken the screen early too. Just because it's dark outside early, that does not mean the human body clock revolves around the winter's schedule. Many, perhaps most people find considerable benefit to extra light during the day during the darker seasons, and if this extends to your laptop, tablet or computer screen, then we should allow that!

Morning larks, night owls and even those who work night shifts will benefit from using SunsetScreen because their sleep cycles are hours apart from each other. SunsetScreen can be tailored so you can set the sunset and sunrise times appropriately to match your sleep rhythm.

We should also be able to define the colour of the filter by hue, saturation or brightness if need be. This way, we can match the colour more precisely to the illumination by the light bulbs we have in our houses. Although dimming the amount of blue light is most important, the overall brightness may also be dimmed too if you so wish.

Run using preinstalled Autohotkey

When I try to execute the tray exe file, the F-Secure throws a false positive alarm. Therefore I try to run the AHK file directly. When I do that, the AHK throws on line 135. I guess the A_ScriptFullPath does not exist.

What is the procedure to execute the *.ahk file directly?

Thanks ;)

EDIT:

I solved it by copying redshift.exe to the same folder and compiling ahk to exe file.

Disable gamma change

Hi,

Can you provide a way to disable gamma change? It messes up my color calibration.

Redshift Tray 1.7.0

I had Redshift Tray version 1.7.0 (from 2018-08-12) and by chance I discovered that there was a newer 1.7.0 version (from 2018-08-13), hashes:

  • Redshift Tray 1.7.0 (from 2018-08-12)
Name: redshift-tray_1.7.0.zip
File Size: 579356 Byte(s) (565.78 KB)
Modified Date: 2018-08-12 19:13
MD5: c853e79d96c7440743a02a00ff5d6827
SHA1: 54cf4837d5c7252b951feb8e37e10173a5691907
SHA256: 585955a0b1c24f120f2b734700cf861247c06c19a92dbc90342d5783a533ab67
SHA384: 65079d31e7189dd007240dbac9ab1fbfceeebc6a8f084c03bb4e57cadcc551c883df1e9cd626a9563ce4f0152be3fe8a
SHA512: 7a5afd9da0acc1e81104ce6caebffb0bfc284b11922aa75c0a5538f2a043e37e291d608cd4a6ab2d6a6bd243566c43df0789e13d5d7b3ad58f54f82ff7b0f08e
  • Redshift Tray 1.7.0 (from 2018-08-13)
Name: redshift-tray_1.7.0.zip
File Size: 514175 Byte(s) (502.12 KB)
Modified Date: 2018-08-13 13:02
MD5: 782d34f73a5192c4bc516821b7ffe671
SHA1: cf4752f6ebb8f86f026446a6628fe46d996c1d11
SHA256: 1a2d389c563bf155b74e8f017fcc1fe6cbe525256bfc117dc1652d0522d02141
SHA384: f69420908fca2ba773e9e4ca2df992064631764f9cae5fd39708430cb599af0c584f0576f8880ddc48afba09505e01e0
SHA512: b7b42d61d22b1391e295bed68c156860918fd095fede14061a92877d367ad038302d87787809441da4caa545bc6d5e75e8c5c01afd5953846ef901811780ce1d

The different file is redshift.exe.

In my opinion replacing once uploaded versions without raising the version number is a bad practice- the users cannot be sure whether they are using the latest version.

"More settings" doesn't work since last update

After update yesterday I get an error message "Failed attempt to launch program or document" rstray.ini every time I try to open "more settings".

Can you give me a default rstray.ini and tell me where to put it?

(I have installed rstray using chocolatey)

Feature request: disable all hotkeys

Hi,

It would be really nice to be able to disable hotkeys completely (not just advanced hotkeys) because some shortcuts conflict with software that we use.

Flashing when changing brightness

When adjusting brightness, the screen flashes in its default brightness and color temperature, especially noticeable in the late hours?
Is there any fix planned for that, because it hurts the retinas quite a a bit?

I'm using the Windows 10 version 2.2.0.

Unable to figure out way to set different brightness at night time.

Dear dev,
I apologize in advance if so nincompoop to ignore something very obvious. But plz Help me with this am new to git things and communicating on github.
modules installed : redshift and redshift tray (rstray) using Chocolatey package manager on Windows 10 Latest build.
I tried to look for reducing brightness along with temperatures only at night time failed to find anything relevant that i can use with rstay ini file. I found some -b tag but didnt know how to incorporate it with rstray.ini
Kindly let me know how can I reduce brightness only at night any input will be much appreciated.
Thank you for carrying forward the legacy of Redshift. Just to let you know disabling some of the telemetry things in windows 10 sadly disables that night light thingy. and with current build redshift + rstray working great.
Warm regards.
Anon

advices

1.Think completely and work and that thinking should be done at once,do like this when writing also ,as little thinking causes mistakes.

2.think of each bit of how it can be improved but don't add useless and unnecessary features

3.Increase patience

4.do important work first

5.If u can't reproduce a bug normally then test thoroughly and try to reproduce for 2,3 times.

6.As far as possible try to reproduce bugs in win10 64bit as most of the users in the world use win10

  1. don't use win11 for reproducing bugs as it's new and buggy,it takes many years by microsoft to fix basic issues.(read twice)

Make this read by all of your developers or else mistakes will happen.If they completely think and work then bugs will be properly fixed.

Screen temperature resets when Windows turns off displays due to Power Saving options

Experienced this last night on my Windows 10 64-bit LTSC machine. I have my Power Options set to turn off my two displays after 10 minutes of inactivity. Upon waking, the screen temperature seems to reset back to its default temperature as if redshift malfunctioned. I have to disable and re-enable redshift to fix the temperature.

I actually experienced this using the redshift CLI before discovering this tool. Wondering if perhaps there is an option I am overlooking. Either way, kudos to you and this brilliant utility.

Hide tray icon

Can you please add a possibility to hide tray icon of the program?

Allow to choose nighttemp and daytemp times artificially

I see this option:

If you want total control over the times at which Redshift will be enabled and disabled, just set nighttime=1800 and daytime=0600, where the values depict 24h military time. Then, set customtimes=1.

I would like to achieve something similar, but instead of "disabled" and "enabled" I want to control when nighttemp and daytemp are applied.

I don't want it to be controlled by latitude and longitude.

How can I achieve it?

[request] Provide a custom build

Hi,
The computer i use at work has an antivirus with a "password protection", so there is no way to disable.
Is it possible to provide a build without AutoHotkey script ?

Thanks.

Pause when fullscreen

Would be nice to have a possibility to pause the redshift when user open any full-screen window.

Not sure if it's possible, but FYI this feature exist in LightBulb.

Malware detected

Hello,
i have received a message from a chocolatey user about a malware detection from Windows defender, can you tell me more about it?
Thank you

Hi latest update v1.9.9 gives a Windows Defender warning:
Trojan:Win32/Zpevdo.B
file: C:\WINDOWS\System32\Tasks\Redshift Tray->(UTF-16LE)
regkey: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks{A1341D6B-CE51-451B-B970-C4CB9CA6736F}
regkey: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Redshift Tray
taskscheduler: C:\WINDOWS\System32\Tasks\Redshift Tray

Disable on fullscreen Bug

There is a bug when disableonfullscreen=1. Steps to reproduce it:

  • Mouse click on desktop wallpaper.
  • Wow! Redshift-Tray is disabled.

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.