fmt_duration
def fmt_duration(
seconds
):Format a duration in seconds as whole minutes and seconds.
Format a duration in seconds as whole minutes and seconds.
Create and populate the foreground-application summary table.
Add the session summary fields to the report window.
Replace title-table rows with title durations for the selected app.
Create the table used to show titles for the selected application.
Open a report as a child of the application’s Tk root.
Report-data shape: this module treats report_data[“events”] as a list of app-summary dictionaries. The project context describes a preferred future structure where “events” is a dictionary containing “top_apps”, “titles_by_app”, and “timeline”. Confirm the reporter’s current return shape before documenting that structure more specifically.
Title-data availability: update_titles assumes every app event has a “top_titles” key, including any idle event. Confirm whether idle rows include that key or whether they should be excluded from title-detail display.
Configuration default timing: is_show_titles = cf.SHOW_WINDOW_TITLES is evaluated when the function is defined, rather than when it is called. That is valid for a static configuration setting, but it will not reflect changes to cf.SHOW_WINDOW_TITLES made later in the same process.