A Textual widget for a floating, draggable window and included window bar/manager system.
Project description
Textual-Window
Textual-Window is an extension library for Textual.
It provides a Window widget, along with an included WindowBar and WindowSwitcher, that makes it extremely easy to create a desktop GUI-like experience inside of a TUI built with Textual.
Window widgets are floating, draggable, resizable, closable, and many more.
Features
- Close and open windows with the close button or the desktop standard, ctrl-w
- Resize, maximize, and restore windows. Set the window's min and max size through Textual CSS as you normally would, and the window will respect those settings when resizing. Resizing can also be disabled per window.
- Included fully-automatic Window Bar (aka Task Bar). Don't worry about keeping track of the windows. Just compose and go. The library will track them for you.
- Included Window Switcher, to cycle window focus like you'd expect. The most recently focused window is always at the start (left side).
- WindowBar can toggle the dock between top and bottom of the screen in real-time.
- Windows snap to the terminal by default, toggle this on/off in real-time.
- Window Bar has right-click context menus, one for each window, as well as a global context menu with options such as close/open all or snap/unsnap all.
- Windows highlight to show which one is focused. Controls are passed from the highlighted window to its inner scrolling container.
- Set the window's starting location on the screen using plain descriptions (ie. right + bottom), as well as whether to initialize open or closed.
- An optional hamburger menu for custom callbacks - The window has a 'menu_options' argument. Pass in a dictionary of functions (label + callback) and these functions will appear in that window's hamburger menu. (If nothing is passed in, the window is not shown).
- Smooth fade in/out animation adds a convincing touch.
- Create windows in all 3 ways textual supports - context manager, passing in a list of children, and custom Window objects.
- ...and many small QoL things too numerous to list here.
See the documentation for more details.
Demo App
If you have uv or Pipx, you can immediately try the demo app:
uvx textual-window
pipx textual-window
Documentation
Click here for documentation
Questions, issues, suggestions?
Feel free to post an issue.
Video
Coming soon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file textual_window-0.2.0.tar.gz.
File metadata
- Download URL: textual_window-0.2.0.tar.gz
- Upload date:
- Size: 87.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52df3913dde156a0b377d331d5b7f7000e8b4cdd5c302d01f9a16d85de3b98a1
|
|
| MD5 |
b8d36066530e491bc72b2a2033467cf5
|
|
| BLAKE2b-256 |
5c0c24ffb6d7d8db3ffcc8e39c9376f6ab642feefe0baa52f15e674d7c6bf0a7
|
File details
Details for the file textual_window-0.2.0-py3-none-any.whl.
File metadata
- Download URL: textual_window-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
744cd827151ff805cb4c76c5d7c3d144624970289281a1f7ec2269778f40b150
|
|
| MD5 |
b4111239e5154a1ca04ecbf14db7055e
|
|
| BLAKE2b-256 |
29764230d83b44f8c0dd8ea67367325f26e0fe9145b6ca448fe1b4e3df0640c3
|