6 Commits

Author SHA1 Message Date
923faa67ec patch bump 2026-02-20 16:18:43 +00:00
76483a24b9 improve the hovering and focus effects for the buttons. 2026-02-20 16:18:29 +00:00
b3a3a4759a add --version and --help to additional flags 2026-02-20 15:41:58 +00:00
fc6c2e99a5 add Special Thanks
patch bump
2026-02-20 15:39:48 +00:00
97458682ea move guard clause out of context block 2026-02-20 15:36:20 +00:00
3181377c18 typo 2026-02-20 15:28:05 +00:00
4 changed files with 84 additions and 10 deletions

View File

@@ -42,8 +42,10 @@ q3rcon-tui --host=localhost --port=28960 --password=rconpassword
Additional flags:
- `--raw`: Boolean flag, if set the RichLog will print raw responses withouth rendering tables.
- `--raw`: Boolean flag, if set the RichLog will print raw responses without rendering tables.
- `--append`: Boolean flag, if set the RichLog output with append each response continuously.
- `--version`: Print the version of the TUI.
- `--help`: Print the help message.
#### Environment Variables
@@ -61,6 +63,11 @@ Q3RCON_TUI_RAW=false
Q3RCON_TUI_APPEND=false
```
## Special Thanks
- [lapetus-11](https://github.com/Iapetus-11) for writing the [aio-q3-rcon](https://github.com/Iapetus-11/aio-q3-rcon) package.
- The developers at [Textualize](https://github.com/Textualize) for writing the [textual](https://github.com/Textualize/textual) package.
## License
`q3rcon-tui` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2026-present onyx-and-iris <code@onyxandiris.online>
#
# SPDX-License-Identifier: MIT
__version__ = '0.4.0'
__version__ = '0.4.2'

View File

@@ -44,35 +44,63 @@
Button {
width: 100%;
height: 3;
height: 4;
margin: 0 1;
background: #5e81ac;
color: #eceff4;
border: none;
text-style: bold;
border: solid #5e81ac;
}
Button:hover {
background: #81a1c1;
color: #2e3440;
text-style: bold;
border: solid #81a1c1;
}
Button:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
border: solid #88c0d0;
}
Button.success {
background: #a3be8c;
border: solid #a3be8c;
}
Button.success:hover {
background: #8fbcbb;
color: #2e3440;
text-style: bold;
border: solid #8fbcbb;
}
Button.success:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
}
Button.warning {
background: #ebcb8b;
color: #2e3440;
border: solid #ebcb8b;
}
Button.warning:hover {
background: #d08770;
color: #eceff4;
text-style: bold;
border: solid #d08770;
}
Button.warning:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
}
Button.error {
@@ -81,6 +109,14 @@ Button.error {
Button.error:hover {
background: #d08770;
color: #eceff4;
text-style: bold;
}
Button.error:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
}
#quit {
@@ -90,25 +126,55 @@ Button.error:hover {
#quit:hover {
background: #d08770;
border: solid #ebcb8b;
color: #eceff4;
text-style: bold;
border: none;
}
#quit:focus {
background: #d08770;
color: #eceff4;
text-style: bold;
border: none;
}
#send {
background: #a3be8c;
border: solid #a3be8c;
}
#send:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
border: solid #88c0d0;
}
#config {
background: #ebcb8b;
color: #2e3440;
border: solid #ebcb8b;
}
#config:hover {
background: #d08770;
color: #eceff4;
text-style: bold;
border: solid #d08770;
}
#config:focus {
background: #88c0d0;
color: #2e3440;
text-style: bold;
border: solid #88c0d0;
}
#send:hover {
background: #8fbcbb;
color: #2e3440;
text-style: bold;
border: solid #8fbcbb;
}
/* Configuration Dialog Styles */

View File

@@ -51,14 +51,15 @@ class RconApp(App):
if not settings.append:
self.query_one('#response', RichLog).clear()
try:
async with Client(
settings.host, settings.port, settings.password
) as client:
cmd = self.query_one('#command', Input).value.strip()
if not cmd:
self.app.bell()
return
try:
async with Client(
settings.host, settings.port, settings.password
) as client:
response = await client.send_command(cmd)
self.query_one('#response', RichLog).write(
self.writable.parse(cmd, response)