Skip to content

CLI usage

Miguel López López edited this page Nov 18, 2024 · 2 revisions

This page provides a comprehensive guide to turtile’s Command Line Interface (CLI) commands. The CLI lets you interact with and control turtile by issuing commands through a Unix socket.

exit

Description: Terminates the turtile compositor.

Usage: ttcli exit

window

window list

Description: Lists all active windows with information on their ID, class, title, and associated workspace.

Usage: ttcli window list

Output format:

[
  {
    "id": "window_id",
    "class": "app_id",
    "title": "window_title",
    "workspace": "workspace_name"
  }
]

window switch

Description: Switches focus to the specified window by its ID.

Usage: ttcli window switch <window_id>

Arguments: <window_id> ID of the window to focus.

window cycle

Description: Cycles focus to the next window within the current workspace.

Usage: ttcli window cycle

window kill

Description: Closes a window. Can close a specified window by ID or the currently focused window if no ID is given.

Usage: ttcli window kill [<window_id>]

Arguments: [<window_id>] (optional) ID of the window to close.

window move-to

Description: Moves a window to a specified workspace. Can target a specific window by ID or the currently focused window.

Usage: ttcli window move-to <workspace_name> [<window_id>]

Arguments: <workspace_name> Name of the destination workspace. [<window_id>] (optional) ID of the window to move.

workspace

workspace list

Description: Lists all available workspaces and their status (active/inactive).

Usage: workspace list

Output sample:

[
  {
    "name": "workspace_name",
    "active": true
  }
]

workspace switch

Description: Switches focus to a specified workspace.

Usage: workspace switch <workspace_name>

Arguments: <workspace_name> Name of the workspace to switch to.

window mtoggle

Description: Sets a window as the master in the current workspace. Can target a specific window by ID or otherwise the currently focused window. If no window is specified and the current window is the next window in the stack will be set as the master instead.

Usage: ttcli window mtoggle [<window_id>]

Arguments: [<window_id>] (optional) ID of the window to set as master.