Redshift 调节色温
前记
最近看电脑时间越来越长,电脑的光太刺眼了,眼睛很不舒服,所以搜了下 Linux 下可以使用的色温软件,找到了这两款软件:
- F.lux:It makes the color of your computer’s display adapt to the time of day, warm at night and like sunlight during the day.(官网 | Github)
- Redshift:It adjusts the color temperature of your screen according to your surroundings.(官网 | Github)
它们都支持 Windows 和 Linux。
以前在 Windows 用过 F.lux,所以这次先试了它。可能是白天测试的原因,没有色温变化,而我想要白天夜晚都可以控制色温的,所以放弃了 F.lux。
Redshift 在简单的安装后就能使用了,挺方便的,所以设置为了开机自启,以下是安装过程和设置过程:
Debian 安装
1 | sudo apt-get install redshift |
配置
切换到 ~/.config
目录下,并新建文件 redshift.conf
,配置内容如下:
1 | [redshift] |
开机自启
切换到 /etc/systemd/user
目录下,新建文件 redshift.service
,配置内容如下:
1 | [Unit] |
对于新创建的 unit 文件或修改了的 unit 文件,要通知 systemd 重载此配置文件:
1 | systemctl daemon-reload |
然后以用户级别启动开机自启服务:
1 | systemctl --user enable redshift.service |
开启/停止/重启
像其他用户服务一样使用:
开启:systemctl --user start redshift.service
停止:systemctl --user stop redshift.service
重启:systemctl --user restart redshift.service
Arch 安装
Arch 就更简单了,直接 sudo pacman -S redshift
即可,而且有图形化界面,除了上面的配置外其他的直接通过按钮即可开启。