රෑ වැඩ මුරය සඳහා Redshift

දැන් ගොඩක් මෙහෙයුම් පද්ධතිවල රාත්‍රී කාලයට පරිගණක, දුරකථන හෝ ටැබ් තිරයේ ආලෝකය ඇහැට සුවදායක විදිහට වෙනස් කිරීමේ පහසුකම් තියෙනවා. ගනූ/ලිනක්ස් භාවිත කරන අයටත් Gnome වැඩතල පරිසරය තුළ නම් පෙරනිමියෙන් ම night light නමින් හැඳින්වෙන සැකසුමක් තියෙනවා. ඒත් මම ගොඩක් වෙලාවට භාවිත කරන්න කැමති LXDE ඩෙස්ක්ටොප් පරිසරය සඳහා මෙවැනි දෙයක් පෙරනිමියෙන් ලැබෙන්නෙ නෑ. ඒ නිසා මේ ගැන හොයලා දැනගෙන ක්‍රියාත්මක කළ විසඳුම තමයි මේ. Redshift කියන මෘදුකාංගය ස්ථාපනය කරගෙන ඒක නිසි පරිදි ක්‍රියාත්මක කරගත්තොත් LXDE තුළත් වඩා සහනදායී 'රාත්‍රී ආලෝකයක්' ලබාගන්න පුළුවන්.

Redshift කරන්නේ සූර්යයාගේ පිහිටීම අනුව වර්ණ උෂ්ණත්වය සකස් කිරීම යි. එමඟින් දිවා හා රාත්‍රී කාලවල පරිගණක තිරය සඳහා එකිනෙකට වෙනස් වර්ණ උෂ්ණත්වයක් නියම කරනවා. උදේ පාන්දරටත් හැන්දෑවටත් ක්‍රමයෙන් මේ උෂ්ණත්වය මාරු වෙනවා. මේ නිසා එක මොහොතින් ඇස්වලට අමාරුවක් දැනෙන විදිහට වෙනස් වෙන්නෙ නැහැ.

මුලින් ම redshift සහ redshift-gtk කියන මෘදුකාංග දෙක ස්ථාපනය කරගන්න. එක්කෝ ටර්මිනලයෙන්:

sudo apt-get install redshift redshift-gtk

නැත්නම් ඔබේ මෙහෙයුම් පද්ධතියෙන් ලැබෙන පැකේජ් මැනේජරයෙන් මේක කරගන්න පුළුවනි.

Redshift මෘදුකාංගය වේලාව පිළිබඳ අදහස ලබාගන්නා ක්‍රම කීපයක් තියෙනවා. එකක් geoclue2 මෘදුකාංගය ඔස්සේ අන්තර්ජාලය හරහා. ඒත් මේ ක්‍රමයට මම කැමති නැහැ. මොකද ඒකෙන් අපි ඉන්නා ස්ථානය වෙනස් පාර්ශ්වයන්ට, සර්වරවලට දැනුම් දෙන නිසා. මේක අතින් (manually) සකස් කරන්න පුළුවනි. ඒ සඳහා සැකසුම් ගොනුවක් (configuration file එකක්) ~/.config/redshift.conf කියන ස්ථානයේ තැන්පත් කරන්න. පහතින් දැක්වෙන්නේ මගේ සැකසුම් ගොනුව. මේක හදාගත්තේ මෙන්න මේ පිටුවේ තියෙන ගොනුව මට ගැලපෙන විදිහට වෙනස් කරගෙන. බලන්න එතන location-provider යටතේ manual හැටියට සඳහන් වෙනවා. ඊට පස්සේ මගේ වේලා කලාපයට ගැලපෙන විදිහට අක්ෂාංශ හා දේශාංශ ඇතුළත් කර තියෙනවා lat=6.927079 සහ lon=79.861244 වශයෙන්. මේ අනුව දිවා සහ රාත්‍රී කාල තීන්දු කරගන්න Redshift සමත් වෙනවා. ඒ වගේ ම temp-day=5700 සහ temp-night=3500 වශයෙන් දිවා සහ රාත්‍රී කාල සඳහා වර්ණ උෂ්ණත්වය නියම කරලයි තියෙන්නේ. ඒක ඇත්තට ම මෘදුකාංගයේ මුලින් තිබුණු අගය ම තමයි. කෙනෙකුට අවශ්‍ය නම් වෙනස් කරගන්න පුළුවන්. ඉතින් ඔච්චරයි.

; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500

; 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=6.927079
lon=79.861244

; 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.
[dummy]
screen=0