Documentation
¶
Overview ¶
Package hyprsunset is the hyprsunset module's service side: the blue-light filter process and its control socket, the sunrise/sunset schedule (NOAA sunrise equation, no network), the GeoClue location lookup, and the manual-override record that survives restarts (crates/wayle-bar-workspaces/src/modules/hyprsunset).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearOverride ¶
func ClearOverride(dir string)
ClearOverride drops the record (a sunrise/sunset crossing ends it).
func SaveOverride ¶
SaveOverride records a toggle made at now (persist.rs save); write failures are quiet, as the record is a convenience.
func SocketPath ¶
SocketPath is hyprsunset's control socket, $XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.hyprsunset.sock; false without either variable.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter owns the hyprsunset child lys-shell spawned. One per process, like the Rust CHILD static: stopping signals exactly that child instead of every hyprsunset on the system.
func NewFilter ¶
func NewFilter() *Filter
NewFilter returns the driver for the real hyprsunset binary.
type Location ¶
Location is a resolved position in decimal degrees.
func QueryLocation ¶
QueryLocation resolves the position once over GeoClue2 on conn (the system bus in the shell): get a client, set DesktopId and the city accuracy, start it, and take the first LocationUpdated. Any failure (no daemon, no agent, denied, timeout) is an error the caller treats as "use the configured coordinates".
type Override ¶
Override is a manual toggle remembered across restarts: the filter state it chose and, when the auto-schedule ran, the solar phase it was made in (zero Phase for none).
type Phase ¶
type Phase uint8
Phase is whether the sun is up at a place and time.
type State ¶
State is the running filter's live values.
func QueryState ¶
QueryState asks a running hyprsunset for its temperature and gamma (helpers.rs query_state); false when none answers, which is how the module learns the filter is off.