├── .editorconfig ├── redshift-tray ├── redshift-tray.ico ├── Resources │ ├── AboutIcon.png │ ├── TrayIconAuto.ico │ └── TrayIconOff.ico ├── packages.config ├── App.xaml ├── App.xaml.cs ├── DebugConsole.xaml ├── Settings.cs ├── About.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Settings.settings │ ├── Resources.Designer.cs │ ├── Resources.resx │ └── Settings.Designer.cs ├── DebugConsole.xaml.cs ├── App.config ├── About.xaml ├── TrayIcon.cs ├── Main.cs ├── Common.cs ├── redshift-tray.csproj ├── SettingsWindow.xaml ├── redshift.cs └── SettingsWindow.xaml.cs ├── extend_windows_temperature_range.reg ├── .gitignore ├── redshift-tray.Test ├── CommonTests.cs ├── Properties │ └── AssemblyInfo.cs └── redshift-tray.Test.csproj ├── readme.md ├── LICENSE.txt └── redshift-tray.sln /.editorconfig: -------------------------------------------------------------------------------- 1 | # 2 space indentation 2 | [*.cs] 3 | indent_style = space 4 | indent_size = 2 -------------------------------------------------------------------------------- /redshift-tray/redshift-tray.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepochal/redshift-tray/HEAD/redshift-tray/redshift-tray.ico -------------------------------------------------------------------------------- /redshift-tray/Resources/AboutIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepochal/redshift-tray/HEAD/redshift-tray/Resources/AboutIcon.png -------------------------------------------------------------------------------- /redshift-tray/Resources/TrayIconAuto.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepochal/redshift-tray/HEAD/redshift-tray/Resources/TrayIconAuto.ico -------------------------------------------------------------------------------- /redshift-tray/Resources/TrayIconOff.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepochal/redshift-tray/HEAD/redshift-tray/Resources/TrayIconOff.ico -------------------------------------------------------------------------------- /extend_windows_temperature_range.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | 3 | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ICM] 4 | "GdiIcmGammaRange"=dword:00000100 -------------------------------------------------------------------------------- /redshift-tray/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore thumbnails created by windows 2 | Thumbs.db 3 | #Ignore files build by Visual Studio 4 | *.obj 5 | *.exe 6 | *.pdb 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *_i.c 12 | *_p.c 13 | *.ncb 14 | *.suo 15 | *.tlb 16 | *.tlh 17 | *.bak 18 | *.cache 19 | *.ilk 20 | *.log 21 | [Bb]in 22 | [Dd]ebug*/ 23 | *.lib 24 | *.sbr 25 | obj/ 26 | [Rr]elease*/ 27 | _ReSharper*/ 28 | [Tt]est[Rr]esult* 29 | /packages 30 | -------------------------------------------------------------------------------- /redshift-tray/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /redshift-tray.Test/CommonTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace redshift_tray.Test 5 | { 6 | [TestClass] 7 | public class CommonTests 8 | { 9 | [TestMethod] 10 | public void LocationCanBeParsed() 11 | { 12 | AutoLocation autoLocation = Common.ParseLocation("50.8476", "4.3428"); 13 | Assert.AreEqual(50.8476M, autoLocation.Latitude); 14 | Assert.AreEqual(4.3428M, autoLocation.Longitude); 15 | } 16 | 17 | [TestMethod] 18 | public void LocationCanBeDetermined() 19 | { 20 | AutoLocation autoLocation = Common.DetectLocation(); 21 | Assert.IsTrue(autoLocation.Success); 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Redshift Tray 2 | ============= 3 | Redshift Tray is a convenient tool for configuring and using [Redshift](http://jonls.dk/redshift/) on Windows. It completely works in the background and is controllable through a tray icon. 4 | 5 | --- 6 | 7 | **How to install and configure** 8 | 9 | 1. Download the [latest version](https://github.com/Nepochal/redshift-tray/releases) from the release page 10 | 2. Unzip the file 11 | 3. Download [Redshift](https://github.com/jonls/redshift/releases) 12 | 4. Start the program and fill in the redshift.exe in the settings dialog 13 | 14 | --- 15 | 16 | **How to build** 17 | 18 | Use Microsoft Visual Studio 2013 or above to load the project. You should be able to compile the sources without additional dependencies. -------------------------------------------------------------------------------- /redshift-tray/App.xaml.cs: -------------------------------------------------------------------------------- 1 | /* This file is part of redshift-tray. 2 | Copyright (c) Michael Scholz 3 | */ 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Windows; 7 | 8 | namespace redshift_tray 9 | { 10 | public partial class App : Application 11 | { 12 | 13 | void Main(object sender, StartupEventArgs e) 14 | { 15 | if(Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Count() > 1) 16 | { 17 | Application.Current.Shutdown(0); 18 | } 19 | else 20 | { 21 | bool dummyMethod = e.Args.Any(arg => (arg.ToLower() == "/dummy")); 22 | Main main = new Main(dummyMethod); 23 | 24 | if(!main.Initialize()) 25 | { 26 | Application.Current.Shutdown(-1); 27 | } 28 | } 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /redshift-tray/DebugConsole.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 |