mirror of
https://github.com/onyx-and-iris/vban-tui.git
synced 2026-03-23 18:29:17 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c87fbb1ca9 | |||
| b83b35035a | |||
| c4c8e64e83 | |||
| 240c9071ef | |||
| ae39a318d9 | |||
| eaf15584a2 |
@ -1,7 +1,14 @@
|
|||||||
repos:
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.3.0
|
||||||
|
hooks:
|
||||||
|
- id: check-yaml
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||||
# uv version.
|
# uv version.
|
||||||
rev: 0.10.7
|
rev: 0.10.7
|
||||||
hooks:
|
hooks:
|
||||||
# Update the uv lockfile
|
# Update the uv lockfile
|
||||||
- id: uv-lock
|
- id: uv-lock
|
||||||
|
|||||||
21
README.md
21
README.md
@ -33,6 +33,11 @@ The TUI should now be discoverable as `vban-tui`
|
|||||||
vban-tui --host=localhost --port=6980 --streamname=Command1
|
vban-tui --host=localhost --port=6980 --streamname=Command1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Additional Flags:
|
||||||
|
|
||||||
|
- --rich_log/--no-rich_log: Use this to [disable the RichLog window](./img/tui-no_log.png).
|
||||||
|
- This is useful if you're sending commands to Voicemeeter because you won't receive any responses anyway.
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
example .envrc:
|
example .envrc:
|
||||||
@ -53,12 +58,28 @@ The TUI should load with the request input focused. Simply type in your request
|
|||||||
|
|
||||||
If you enter the request `clear` the output log will be cleared.
|
If you enter the request `clear` the output log will be cleared.
|
||||||
|
|
||||||
|
Press `Ctrl+q` to exit from the TUI.
|
||||||
|
|
||||||
### Command History
|
### Command History
|
||||||
|
|
||||||
Press *up/down* while focused on the request input to scroll through the command history.
|
Press *up/down* while focused on the request input to scroll through the command history.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
This TUI supports the following:
|
||||||
|
|
||||||
|
- Sending requests for Voicemeeter
|
||||||
|
- Sending requests and receiving responses for Matrix
|
||||||
|
|
||||||
|
If you need to send requests and receive responses for Voicemeeter check out [vban-cli][vban-cli]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
`vban-tui` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
`vban-tui` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
||||||
|
|
||||||
|
|
||||||
|
[vban-cli]: https://github.com/onyx-and-iris/vban-cli
|
||||||
BIN
img/tui-no_log.png
Executable file
BIN
img/tui-no_log.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "vban-tui"
|
name = "vban-tui"
|
||||||
version = "0.1.0"
|
version = "0.2.1"
|
||||||
description = "A Textual-based TUI for VBAN Text"
|
description = "A Textual-based TUI for VBAN Text"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class Settings(BaseSettings):
|
|||||||
host: Annotated[str, AfterValidator(is_valid_host)] = 'localhost'
|
host: Annotated[str, AfterValidator(is_valid_host)] = 'localhost'
|
||||||
port: Annotated[int, AfterValidator(is_valid_port)] = 6980
|
port: Annotated[int, AfterValidator(is_valid_port)] = 6980
|
||||||
streamname: Annotated[str, AfterValidator(is_valid_streamname)] = 'Command1'
|
streamname: Annotated[str, AfterValidator(is_valid_streamname)] = 'Command1'
|
||||||
|
rich_log: bool = True
|
||||||
|
|
||||||
model_config = SettingsConfigDict(
|
model_config = SettingsConfigDict(
|
||||||
env_file=(
|
env_file=(
|
||||||
|
|||||||
@ -11,11 +11,15 @@ from .settings import Settings
|
|||||||
class VbanTui(App):
|
class VbanTui(App):
|
||||||
"""A Textual App to display VBAN data."""
|
"""A Textual App to display VBAN data."""
|
||||||
|
|
||||||
CSS_PATH = 'tui.tcss'
|
def _select_css(self):
|
||||||
|
if hasattr(self, '_settings') and not self._settings.rich_log:
|
||||||
|
return 'tui_no_log.tcss'
|
||||||
|
return 'tui.tcss'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
|
||||||
self._settings = Settings()
|
self._settings = Settings()
|
||||||
|
self.CSS_PATH = self._select_css()
|
||||||
|
super().__init__()
|
||||||
self._command_history = CommandHistory()
|
self._command_history = CommandHistory()
|
||||||
self._history_index = None
|
self._history_index = None
|
||||||
|
|
||||||
|
|||||||
85
src/vban_tui/tui_no_log.tcss
Normal file
85
src/vban_tui/tui_no_log.tcss
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#main-grid {
|
||||||
|
height: 20;
|
||||||
|
margin: 1 2;
|
||||||
|
background: #232a38;
|
||||||
|
color: #f5e0dc;
|
||||||
|
border: heavy #a5b6d7;
|
||||||
|
border-title-color: #b7bdfc;
|
||||||
|
border-title-style: bold;
|
||||||
|
padding: 1 1;
|
||||||
|
grid-size: 3 2;
|
||||||
|
grid-gutter: 1 1;
|
||||||
|
grid-rows: 1fr 1fr;
|
||||||
|
grid-columns: 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
#host-labelinput {
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
content-align: left middle;
|
||||||
|
text-align: left;
|
||||||
|
background: #3a415a;
|
||||||
|
border: solid #a5b6d7;
|
||||||
|
border-title-color: #b7bdfc;
|
||||||
|
padding: 0 1 0 1;
|
||||||
|
margin: 0 1 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#host-label {
|
||||||
|
padding: 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#port-labelinput {
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
content-align: left middle;
|
||||||
|
text-align: left;
|
||||||
|
background: #3a415a;
|
||||||
|
border: solid #a5b6d7;
|
||||||
|
border-title-color: #b7bdfc;
|
||||||
|
padding: 0 1 0 1;
|
||||||
|
margin: 0 1 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#port-label {
|
||||||
|
padding: 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#streamname-labelinput {
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
content-align: left middle;
|
||||||
|
text-align: left;
|
||||||
|
background: #3a415a;
|
||||||
|
border: solid #a5b6d7;
|
||||||
|
border-title-color: #c6a0f6;
|
||||||
|
padding: 0 1 0 1;
|
||||||
|
margin: 0 1 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#streamname-label {
|
||||||
|
padding: 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#request-labelinput {
|
||||||
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
|
content-align: left middle;
|
||||||
|
text-align: left;
|
||||||
|
background: #3a415a;
|
||||||
|
border: solid #a5b6d7;
|
||||||
|
border-title-color: #b7bdfc;
|
||||||
|
padding: 0 1 0 1;
|
||||||
|
margin: 0 1 0 1;
|
||||||
|
column-span: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#request-label {
|
||||||
|
padding: 0 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#request-input {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
2
uv.lock
generated
2
uv.lock
generated
@ -362,7 +362,7 @@ requires-dist = [{ name = "tomli", marker = "python_full_version < '3.11'", spec
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vban-tui"
|
name = "vban-tui"
|
||||||
version = "0.1.0"
|
version = "0.2.1"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "pydantic-settings" },
|
{ name = "pydantic-settings" },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user