Command Line¶
ionwl¶
This runs the compositor. It is configured through the Python config file (see Configuration), so the command line stays minimal.
IonWL - a tiling Wayland compositor configured in Python.
IonWL is configured through the Python config file at
~/.config/ionwl/ion_init.py; the command line takes only the options below.
Usage: ionwl [OPTIONS]
Options:
--config-dir <PATH> Use PATH as the config directory
--help Print this help message
Environment variables:
RUST_LOG Log filter, e.g. ionwl=debug (default: ionwl=info)
NO_COLOR Disable colored log output
IONWL_BACKEND Force the backend: winit or udev
(default: auto-detect from WAYLAND_DISPLAY / DISPLAY)
IONWL_TIMING Enable operator-duration timing probes
IONWL_NO_RENDER_THREAD Use the inline render path instead of per-output
render threads (DRM/KMS backend)
ionwl-cmd¶
This communicates with the running compositor over its IPC socket.
The primary way to perform tasks is by executing Python.
ionwl-cmd - send commands to a running IonWL compositor over its IPC socket.
Check status or execute Python inside the compositor - useful for scripts and
for keybindings bound to external tools.
Usage: ionwl-cmd <command> [args...] [--import=mod1:mod2]
Commands:
ping Check the compositor is running.
Exit code is 0 on success, otherwise 1.
python-eval <expression> [-- arg ...] Evaluate a Python expression, print result
python-exec <code> [-- arg ...] Execute Python code
python-file <path> [-- arg ...] Execute a Python file
Options:
--import=mod1:mod2 Import modules before running python-* commands
(python-eval/exec default to --import=ion;
pass --import= with no modules to suppress the default)
--no-output-redirect Don't redirect Python stdout/stderr back to the client
(by default, print() output is captured and returned)
Arguments after -- are exposed as ion.app.ipc_args to the Python code.
Environment:
The compositor is located via XDG_RUNTIME_DIR and WAYLAND_DISPLAY; run
ionwl-cmd from the same environment as the compositor.
Examples:
ionwl-cmd ping
ionwl-cmd python-eval '1 + 1'
ionwl-cmd python-eval 'int(ion.app.ipc_args[0]) + 1' -- 41
ionwl-cmd python-exec 'print("hello")'
ionwl-cmd python-exec 'ion.wm.window_close()'
ionwl-cmd python-exec 'ion.ops.compositor_reload().call(ion.types.EventCommand())'
ionwl-cmd python-file ~/scripts/setup.py
ionwl-cmd python-file script.py -- /tmp/data.json