[FEATURE] Automated Day/Night Hyprsunset Scheduling via systemd user timers

オープン
#1,828 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@mylinuxforwork がすでに取り組んでいます。

2026年9月8日 から。

評価

この issue はまだ評価されていません。

説明

enhancement
Is your feature request related to a problem? Please describe.

Currently, ML4W provides ml4w-toggle-hyprsunset to switch the blue-light filter on and off manually via keybinding (SUPER + SHIFT + H).
While this works, users have to remember to press the shortcut every single evening. If the PC is booted after 20:00 or woken up from suspend, the screen remains at full cold brightness. A modern desktop night-light should ideally be fully automated based on the time of day (like Night Light on Android, iOS, Windows, or macOS) without requiring manual intervention every evening.

Describe the solution you'd like

A native, zero-overhead day/night scheduler using systemd user timers:

  1. Native systemd Timers (0% CPU Overhead):
    • Daily timer at 20:00 to enable the filter.
    • Daily timer at 07:00 to disable the filter.
    • Persistent=true ensures missed triggers (e.g. while suspended or powered off) execute immediately upon resume.
  2. Boot / Login Session Sync:
    • A lightweight init script run on Hyprland startup checks the current hour. If the PC boots at 22:00, it immediately applies the warm filter without waiting for the next timer.
  3. Consistent Manual Toggle:
    • The manual shortcut toggles the hyprsunset.service via systemctl --user, keeping the timer states and manual overrides completely in sync.
  4. Dynamic Temperature:
    • Automatically reads the desired Kelvin value from ~/.config/ml4w/settings/hyprsunset-temp (default: 4500K).
Describe alternatives you've considered
  1. Background loop in Bash (while true; sleep 60): Wastes CPU cycles, adds unnecessary background processes, and can easily desync during system suspend.
  2. GLSL Fragment Shaders (like PR #1819): Great for grayscale or color inversion, but for blue-light filtering, hyprsunset with hardware gamma LUTs is superior (keeps screenshots un-tinted, supports arbitrary Kelvin values, 0% GPU overhead).
  3. External daemons (wlsunset, gammastep): Unnecessary since hyprsunset is already the official tool and part of ML4W.
Additional context

I have already tested this entire architecture thoroughly in daily use with zero issues.
I've attached the complete, ready-to-use package (including all 5 systemd unit files, helper scripts, automated install script, and documentation) as a ZIP file so you can easily review and test it whenever you have time.

ml4w-hyprsunset-scheduler.zip

Support or Contribution
主要言語
QML
スター
5.1k
フォーク
386
平均マージ
16時間 45分
マージ済み PR(30日)
14

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mylinuxforwork/dotfiles のほかの issue

mylinuxforwork/dotfiles の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。