#daemon #screen #unix #night #command

bin+lib hinoirisetr

A daemon to dim the screen at night

3 releases (breaking)

Uses new Rust 2024

new 0.3.0 Apr 29, 2025
0.2.0 Apr 27, 2025
0.1.0 Apr 27, 2025

#1130 in Command line utilities

Download history 99/week @ 2025-04-22

99 downloads per month

MIT license

39KB
881 lines

日の入りsetr

a little daemon to control screen temperature and gamma using hyprsunset

has a unix socket (/tmp/hinoirisetr.sock) that accepts four commands

  • status - prints the current status
  • status_notify - sends the current status via a notification
  • enable - toggles the filter on
  • disable - toggles the filter off
  • toggle - toggles the filter
  • reload - reloads the config

TODO

  • добавить логгинг нормальный
  • избавиться от env_logger и написать свой собственный
  • сделать файл конфига а не блять компайлтайм конфиг(suckless🤢🤢🤮)
  • сделать свой парсер для конфига после serde
  • заебашить автоматический хотрелоад конфига
  • вместо юзания notify-rust напрямую пользоваться libnotify.so и грузить её через dlopen(чтоб бинарник был маленький ваще)
  • переползти с chrono на time потому что мне похуй не нужна суперточность(а мб и на std::time)
  • fix status command crash

Notify: Replaced tokio::sync::Notify with smol::channel::unbounded. The Sender is used to signal, and Receiver is polled in the main loop. UnixListener: Switched to smol::net::UnixListener. Signal Handling: Used signal-hook with smol::spawn for async signal processing. Timers: Replaced tokio::time::sleep with smol::Timer. Main Loop: Used smol::future::or to combine timer and notification events, replacing tokio::select!. Executor: Switched from #tokio::main to smol::block_on.

Dependencies

~3–12MB
~115K SLoC