## 📺 PR Description
Rework the help panel to show live keybinding source information
(global, channel) instead of hard-coded entries
Before
<img width="511" height="934" alt="image"
src="https://github.com/user-attachments/assets/bea29e07-ec4a-443d-a468-be1e9f28a705"
/>
After
<img width="690" height="1355" alt="image"
src="https://github.com/user-attachments/assets/a930382b-e814-482a-a729-54ef2dc286c4"
/>
## Env
### Command
```bash
RUST_LOG=debug cargo run -q -- --cable-dir ./cable/unix --config-file ./.config/config.toml --show-help-panel --keybindings "f10 = \"toggle_help\"; f9 = \"toggle_status_bar\""
```
### Config file
```toml
[metadata]
name = "files"
description = "A channel to select files and directories"
requirements = ["fd", "bat"]
[source]
command = ["fd -t f", "fd -t f -H"]
[preview]
command = "bat -n --color=always '{}'"
env = { BAT_THEME = "ansi" }
[keybindings]
shortcut = "f1"
f9 = "toggle_preview"
f8 = "quit"
esc = false
```
## Checklist
<!-- a quick pass through the following items to make sure you haven't
forgotten anything -->
- [x] my commits **and PR title** follow the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format
- [x] if this is a new feature, I have added tests to consolidate the
feature and prevent regressions
- [ ] if this is a bug fix, I have added a test that reproduces the bug
(if applicable)
- [x] I have added a reasonable amount of documentation to the code
where appropriate
## 📺 PR Description
**IMPORTANT** Due to the nature of the changes this is a backwards
incompatible change
This PR reworks the already existing Action -> Bindings system in to a
more scalable system using
- Keys -> Actions
- Events -> Actions
With the new system a key or event can execute one or more actions
sequentially, for example
```toml
[keybindings]
# Zen Mode
"f1" = ["toggle_preview", "toggle_status_bar"]
```
Exposes input edit actions that we previously hard-coded
## Checklist
<!-- a quick pass through the following items to make sure you haven't
forgotten anything -->
- [x] my commits **and PR title** follow the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format
- [x] if this is a new feature, I have added tests to consolidate the
feature and prevent regressions
- [ ] if this is a bug fix, I have added a test that reproduces the bug
(if applicable)
- [x] I have added a reasonable amount of documentation to the code
where appropriate
## 📺 PR Description
update all file based tests to follow a naming convention in a dedicated
testing folder to prevent clashes. Make sure all needed files are in
place before running the test
## Checklist
<!-- a quick pass through the following items to make sure you haven't
forgotten anything -->
- [x] my commits **and PR title** follow the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format
- [ ] if this is a new feature, I have added tests to consolidate the
feature and prevent regressions
- [ ] if this is a bug fix, I have added a test that reproduces the bug
(if applicable)
- [x] I have added a reasonable amount of documentation to the code
where appropriate
## 📺 PR Description
Fixes#631
Added constraints to make either mitigate or remove "flakiness" for some
tests
## Checklist
<!-- a quick pass through the following items to make sure you haven't
forgotten anything -->
- [x] my commits **and PR title** follow the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format
- [ ] if this is a new feature, I have added tests to consolidate the
feature and prevent regressions
- [ ] if this is a bug fix, I have added a test that reproduces the bug
(if applicable)
- [ ] I have added a reasonable amount of documentation to the code
where appropriate
Fixes#560
### Add theme color overrides in configuration file
Link to #560
### Problem
Currently, customizing television's appearance to match personal style
requires users to rebuild from source code to modify theme colors. This
creates a significant barrier for users who want to personalize their
experience without dealing with compilation and development setup.
Users who want to adjust colors for better readability, match their
terminal theme, or create custom color schemes must either:
- Modify theme files in the source code
- Rebuild the entire application
- Maintain separate theme files
This workflow is not user-friendly and prevents quick experimentation
with different color combinations.
### Solution
Added theme color overrides directly in the configuration file, allowing
users to customize any theme color without rebuilding from source. The
themes/*.toml files now serve as defaults, while the configuration file
provides overrides that take precedence.
### Key features:
- No rebuild required: Customize colors instantly through config
- Easy testing: Try different color combinations without compilation
- Theme flexibility: Mix and match colors from different themes
- Backward compatible: Existing configs continue to work unchanged
- User-friendly: Simple TOML syntax for color customization
### Usage Example
Find your config file location:
```
Default locations:
# Unix: ~/.config/television/config.toml
# Windows: %APPDATA%\television\config.toml
```
Add theme overrides to your config:
```
[ui]
theme = "catppuccin" # or any other theme
[ui.theme_overrides]
background = "#000000" # Pure black background for maximum contrast
text_fg = "#00ff00" # Bright green for main text (high visibility)
selection_bg = "#ff00ff" # Bright magenta for selected items (eye-catching)
selection_fg = "#ffffff" # Pure white text on selected items (high contrast)
match_fg = "#ffff00" # Bright yellow for search matches (stands out)
border_fg = "#00ffff" # Bright cyan for borders (neon effect)
result_name_fg = "#ff8800" # Bright orange for file names (warm highlight)
result_value_fg = "#ff0080" # Bright pink for values (vibrant accent)
```
Test your changes:
```
# Run with your config
./target/release/tv --config-file ~/.config/television/config.toml
```
<img width="1420" alt="Screenshot 2025-07-08 at 08 14 42"
src="https://github.com/user-attachments/assets/90563f86-74aa-460a-a7c2-82080be3dc0b"
/>
---------
Co-authored-by: Mohamed-Amine Bousahih <mohamed-aminebousahih@pc-66.home>
Co-authored-by: Mohamed-Amine Bousahih <mohamed-aminebousahih@mohamedminesair.home>
the issue was related to the starting row. And this is the same reason
we cannot test --inline, in the test env there's no way to calculate the
amount of empty lines (or I don't see it). But at least --height and
--width are testable
---------
Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
This PR solves part of
https://github.com/alexpasmantier/television/issues/246, since hosting
our own apt repo is just the first step.
Right now it's a draft, because I put the CD code inside of the
[.github/workflows/static.yml](98a3d7b854/.github/workflows/static.yml)
file and this, most-likely, doesn't belong there. Where exactly to put
it will need to be discussed, but the requirements are:
- to start executing this code after we generate the `.deb` binary
- and to deploy the static GH pages content after we've executed this
code
I've deployed a test version of the `.deb` package to my GH pages and
you can actually already install `television` via `apt` like this:
```sh
# download the repository public key and put it in the trusted directory
curl -sS https://kapobajza.github.io/television/apt/repository-key.asc | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/television.gpg
# put the repository download link inside the apt sources list
echo "deb https://kapobajza.github.io/television/apt stable main" | sudo tee /etc/apt/sources.list.d/television.list
sudo apt update
# install the package 🚀
sudo apt install television
```
---------
Co-authored-by: Kapobajza <kapobajza@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alex Pasmantier <47638216+alexpasmantier@users.noreply.github.com>
Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
This PR adds support for customizing
* input_header
* preview_header
* preview_footer
all the items are of type MultiTemplate, this gives some flexibility
when showing the selected value, let's say on the preview header, if
it's long or you want only a section
---------
Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
BREAKING CHANGE: the format of the cable channel files and more
specifically the preview specification is updated to be a single table
named `preview` (with keys `command`, `delimiter`, and `offset`) instead
of three flat fields.
```toml
preview_command = "echo 3"
preview_delimiter = " "
preview_offset = "{1}"
```
becomes:
```toml
preview.command = "echo 3"
preview.delimiter = " "
preview.offset = "{1}"
```
This drops the `TelevisionChannel` enum which served as a unified
interface for builtin and cable channels as well as all related macros
and the `television-derive` package.
This simplifies the code quite a lot and will improve overall
maintainability.
BREAKING CHANGE: No more builtin previews which means channels currently using `:files:` and other builtins will now need to rely on external tools (examples to come).
This refactors `television/channels/cable.rs` into two additional
submodules:
- `television/channels/cable/preview.rs`
- `television/channels/cable/prototypes.rs`
- tv's default channel (when lauching `tv`) is now configurable via the
`default_channel` configuration option
- add `RUST_BACKTRACE=1` and `--nocapture` to ci testing for better
debugging
- remove all builtin channels and associated glue code as well as the
`ToCliChannel` and `ToUnitChannel` derive macros
- recode all builtin channels using shell commands (along with `fd`,
`bat`, and `rg`)
- add support for interactive shell commands inside cable channels
- drop the `send_to_channel` feature until further notice (will be
reimplemented later on in a more generic and customizable way)
fixes#368
@alexpasmantier I tried to parse down the exact flag to the find method,
but I can't find an elegant way to do so because the channel creates its
own configurations for the matcher inside of the `new` method. I started
adding the exact flag to the new function of each of the channels but it
just does not seem right to do so. Do you have an idea on how to improve
the change? I would think of passing the config struct to the new
function and exposing the config of the channel for channel transitions,
but I'm not sure... 🤔
I have done it here for the stdin channel just to show you how it would
look like and it works fine😄! Looking forward to hearing your thoughts
on that 👍
ref issue: #368
---------
Co-authored-by: Alexandre Pasmantier <alex.pasmant@gmail.com>
This will disable the help panel and associated toggling actions
entirely. This is useful when the help panel is not needed or
when the user wants `tv` to run with a minimal interface (e.g. when
using it as a file picker for a script or embedding it in a larger
application).
This will disable the remote control panel and associated actions
entirely. This is useful when the remote control is not needed or when
the user wants `tv` to run in single-channel mode (e.g. when using it as
a file picker for a script or embedding it in a larger application).
BREAKING CHANGE: the CLI `passthrough_keybindings` are no longer
available. This feature wasn't used anywhere to my knowledge (github
search) and was adding unnecessary complexity to the code.