Metadata-Version: 2.4
Name: i3-orphan
Version: 0.1.0
Summary: Detect and remove orphan tabbed/stacked containers in i3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: i3ipc

# i3-orphan

Detect and reparent orphan tabbed/stacked containers in i3.

An orphan container is a tabbed or stacked container with only one child window.

AI-generated and unreviewed.

## Installation

```bash
pipx install i3-orphan
```

## Usage

```bash
# Check if focused window's parent is an orphan
i3-orphan is

# List all orphan containers
i3-orphan list

# Reparent focused window to grandparent (removes orphan)
i3-orphan reparent

# Reparent all orphans recursively
i3-orphan reparent-all
```

## Examples

```bash
# Check and reparent if orphan
if i3-orphan is; then
    i3-orphan reparent
fi

# Clean up all orphans in your workspace
i3-orphan reparent-all
```

## How it works

This tool uses i3ipc directly:
- `i3-orphan is` checks if `focused.parent` is tabbed/stacked with only 1 child
- `i3-orphan reparent` moves focused to its grandparent using marks
- `i3-orphan reparent-all` recursively processes all orphans until none remain
