Files
pi3-smart-workspace/pyproject.toml
T
Asger WeirsøeandClaude fa1de7fe16 Add init --sync and --prune for incremental monitor setup
`init` planned every file on every run and refused if any of them
existed, so attaching a new monitor could not be configured without
--force — which reallocated global workspace numbers by i3's current
output order and renumbered the monitors already in use.

- allocate_global_starts() keeps the block each known output already
  holds and gives new outputs the lowest free block; blocks of inactive
  outputs stay reserved.
- read_allocations()/parse_allocation() read those blocks back out of
  the generated files (inverse of render_workspaces_for_output).
- --sync writes only the missing files, --prune drops configs for
  outputs that are gone and frees their numbers.
- Files without the auto-generated header are never written or
  deleted, --force included.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 12:58:05 +02:00

58 lines
1.4 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pi3-smart-workspace"
version = "0.3.0"
description = "Switch i3 workspaces based on which output your mouse cursor is on."
readme = "README.md"
requires-python = ">=3.14"
license = "Apache-2.0"
authors = [
{ name = "Asger Geel Weirsøe", email = "asger@weircon.dk" },
]
keywords = ["i3", "i3wm", "workspace", "multi-monitor", "x11"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: X11 Applications",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Desktop Environment :: Window Managers",
]
dependencies = [
"i3ipc>=2.2.1",
"pynput>=1.7.6",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"build>=1.2",
"twine>=5.0",
]
[project.scripts]
pi3-smart-workspace = "pi3.smart_workspace:main"
[project.urls]
Homepage = "https://gitea.weircon.dk/agw/pi3-smart-workspace"
Issues = "https://gitea.weircon.dk/agw/pi3-smart-workspace/issues"
[tool.hatch.build.targets.wheel]
packages = ["pi3"]
[tool.hatch.build.targets.sdist]
include = [
"/pi3",
"/tests",
"/README.md",
"/LICENSE",
]
[tool.pytest.ini_options]
testpaths = ["tests"]