Skip to main content

Crate scxtui

Crate scxtui 

Source

Re-exportsΒ§

pub(crate) use std::path::Path; πŸ”’
pub(crate) use Context; πŸ”’
pub(crate) use Result; πŸ”’
pub(crate) use bail; πŸ”’

ModulesΒ§

app πŸ”’
Application state and event loop.
backend πŸ”’
Scheduler-management backend.
cli πŸ”’
scxtui --cli: scxctl’s command set over the scx.service backend.
kernel πŸ”’
The kernel’s own view of sched_ext, read straight from sysfs.
logs πŸ”’
Journal access for the log view.
profiles πŸ”’
Scheduler profiles (β€œmodes”): named flag sets per scheduler, applied by writing them to SCX_FLAGS next to SCX_SCHEDULER.
ui πŸ”’
Rendering. Almost a pure function of the App state β€” the one exception is the log view writing its viewport height and clamped scroll offset back into the app, so paging and bounds always match the actual terminal size.

StructsΒ§

App πŸ”’
Export πŸ”’
--export-profiles and its options.
Profiles πŸ”’
The loaded profile set: file contents over built-in defaults.
ServiceBackend πŸ”’

EnumsΒ§

ExportFormat πŸ”’
Output format of --export-profiles.
Invocation πŸ”’
What the command line asked for besides the TUI.

ConstantsΒ§

USAGE πŸ”’

TraitsΒ§

SchedulerBackend πŸ”’
Common interface of the scheduler-management backend.

FunctionsΒ§

export_profiles πŸ”’
--export-profiles: the resolved table, as JSON or TOML, to a file or stdout. --builtin needs neither a profiles file nor systemd, so it works on a machine without scx.service; the full export also covers the installed schedulers, which takes the backend.
main πŸ”’
parse_args πŸ”’
The informational flags end the process here; everything else is handed back for dispatch after the backend is up.
parse_export πŸ”’
The options after --export-profiles. The target is the first argument that is not an option, so --export-profiles --builtin writes to stdout and --export-profiles out.toml --format toml to the file; - is stdout explicitly.
replace_file πŸ”’
Replaces path with text the way the environment file is rewritten: through a scratch file in the same directory and a rename, so that a failure midway leaves the file as it was, and with an existing file’s identity (the file behind a symlink, owner, POSIX access ACL, mode) carried over. A new file is created as File::create would create it, under the umask, which is what the caller’s plain write used to do. For the profile export, whose target is often the live profiles file.