一开始想在Ubuntu下安装在Windows下使用的f.lux,但是折腾了很久f.lux也没能正常运作。于是打开另一台Ubuntu电脑,将上面使用的Redshift软件搬了过来。

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.

1.安装

一行命令即可,sudo apt-get install redshift-gtk

注意:没有必要像某些文章提到的安装redshift-gtk redshift python-appindicator三个包。

2.配置

安装完成后,启动程序会发现屏幕并没有什么变化,这是因为现在的配置文件是空的。

输入命令sudo gedit ~/.config/redshift.conf,打开其配置文件,复制如下内容:

; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5000
temp-night=4500 ; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1 ; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6 ; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual ; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr ; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=33.98
lon=109.99 ; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the
; second screen. If this option is not specified, Redshift will try
; to adjust _all_ screens.
; [randr]
; screen=1

按照自己所在的地区进行配置,上文给出的经纬度位于中国西安。具体配置参考上文英文提示。

参考资料

https://github.com/jonls/redshift

最新文章

  1. CSS大杂烩(1)
  2. java类 对象 和构造方法
  3. js 的 深拷贝 和 浅拷贝
  4. DECODE函数
  5. 使用MySQL数据库
  6. 打车APP可能的盈利模式
  7. sql - 查询所有表中包含指定值
  8. 字典树-百度之星-Xor Sum
  9. WPF基础
  10. 一组开源 HTML5 Apps
  11. BZOJ 1260: [CQOI2007]涂色paint( 区间dp )
  12. spring配置文件详解【总结】
  13. [bzoj1041][HAOI2008]圆上的整点
  14. Winform 界面执行耗时操作--UI卡顿假死问题
  15. 浅析Android设备中grep命令处理流程
  16. 洛谷 P1739 表达式括号匹配
  17. [UE4]Native Widget Host
  18. 关于python项目路径导入自己写的库出错的一点思考
  19. Oracle Grid control 11g及Active DataGuard 11g安装部署
  20. Calendar 对象的使用实例

热门文章

  1. 9、numpy——数组操作
  2. CodeForces 295B Greg and Graph (floyd+离线)
  3. C#面试 笔试题 六
  4. elasticsearch 基础 —— Mapping参数boost、coerce、copy_to、doc_values、dynamic、
  5. es5和es6中的this指向问题
  6. Java-java.lang.NoClassDefFoundError:brave.Span.Kind
  7. VMware 设置桥接方式 本机使用WLAN
  8. ansible笔记(二)--配置文件详解
  9. SpringBoot---概述
  10. Kafka初识