631 Commits

Author SHA1 Message Date
Aiden Scandella
83f29f7418
feat(zsh): add tv cli options/arguments/subcommands autocompletion (#665)
## 📺 PR Description

update `init` shell generation to include autocompleting options for
`tv` itself.

<img width="817" height="497" alt="image"
src="https://github.com/user-attachments/assets/e65bc0aa-410e-43ef-86a5-2d6e01c6c1df"
/>

<img width="837" height="186" alt="image"
src="https://github.com/user-attachments/assets/6d9665f6-0664-4e6e-bce3-e6a970c79524"
/>

I've only tested this on macOS (arm64) with `zsh` and `bash` so far:

<img width="893" height="349" alt="image"
src="https://github.com/user-attachments/assets/dd66ecec-fee3-4713-a68c-f69e961a4ba6"
/>



## 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)
- [ ] I have added a reasonable amount of documentation to the code
where appropriate

---------

Co-authored-by: Alex Pasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-07-25 22:34:06 +02:00
alexandre pasmantier
c93ddeeadb feat(cli): registering transparent selection keys for tv
Fixes #468
2025-07-25 18:12:31 +02:00
alexandre pasmantier
94e1061b67 fix(ui): adapt input bar height to borders and padding settings 2025-07-25 16:10:08 +02:00
LM
c8df96270a
refactor(help): more informative help panel (#668)
## 📺 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
2025-07-25 13:16:12 +02:00
Alex Pasmantier
72c34731ec test(pty): longer delay when checking pty exit code 2025-07-25 01:43:29 +02:00
Alex Pasmantier
a019f18229 perf(channel): avoid unnecessary allocations 2025-07-25 01:31:40 +02:00
raylu
a0e3063702
feat(config): border styles and padding are now configurable (#642)
## 📺 PR Description

this allows changing (or removing) the border styles

tv 0.12.3:
<img width="773" height="407" alt="image"
src="https://github.com/user-attachments/assets/8b74fc2f-7abc-4bb8-b645-c6243f40230c"
/>

this PR with
```toml
[ui.input_bar]
border_type = 'none'
[ui.results_panel]
border_type = 'none'
[ui.preview_panel]
border_type = 'plain'
```
<img width="778" height="407" alt="image"
src="https://github.com/user-attachments/assets/481fd0fa-a90a-4be8-bbe8-6e0ee5b002e3"
/>

see #638

## Checklist

- [ ] 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

---------

Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
2025-07-25 00:08:03 +02:00
LM
39610e145d feat(config): a more expressive bindings system (#666)
## 📺 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
2025-07-23 21:17:42 +02:00
Alex Pasmantier
be6cdf8a3a
feat(preview): previews can now be cached on a per-channel basis (#667)
Fixes #660

## 📺 PR Description

**This PR adds a cache mechanism for previews that can be set on a
per-channel basis.**

**Typical use case**: your preview is making an expensive call (e.g. API
call, heavily computational, etc.)

This introduces a new `cache` option inside each channel's preview
specification:
```toml
[metadata]
name = "test"

[source]
command = "echo 'test1\\ntest2\\ntest3\\ntest4\\ntest5'"

[preview]
command = "sleep 1 && echo 'Previewing {}'"
cached = true
```

## Checklist

- [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
2025-07-23 00:20:52 +02:00
kapobajza
a61f26197e
fix(website): Fixed broken links on home page (#662)
## 📺 PR Description

<!-- summary of the change + which issue is fixed if applicable. -->
Currently the links on the docs homepage are broken, because when we run
the website locally it uses [just a slash as the `prefix`/`baseUrl`, but
when run as a production build it uses `/television` as the
`baseUrl`](1d6b996c83/website/docusaurus.config.ts (L21)).
So I added a hook that will take the `baseUrl` and append it to the link
you provide. This hook should be used for any relative link that we add
to the app in React (`.tsx`) files.

## 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
2025-07-22 17:17:39 +02:00
alexandre pasmantier
1d6b996c83 docs: update contributing docs and website 2025-07-20 00:40:21 +02:00
Alex Pasmantier
c8da07f3ed
fix(fish): more robust string escaping (#656)
fixes #653 

>
28f58e0641/television/utils/shell/completion.fish (L112)
> 
> This line should be
> 
> ```
> commandline -t -- (string escape -- "$dir$i")' '
> ```
> 
> This is a bug in the fish completion. Bash seems to be fine.
> 
> Testing with:
> 
> ```
> ❯ fish --version
> fish, version 4.0.2
> 
> ❯ mkdir -p "a/with whitespace"
> 
> ❯ cd a<ctrl-t>
> ```
> 
> Result:
> 
> ```
> ❯ cd a/'with whitespace/'
> ```
> 
> Expected result:
> 
> ```
> ❯ cd 'a/with whitespace/'
> ```
> 
> The fix on top gets this result.
2025-07-19 23:05:31 +02:00
Alex Pasmantier
098f3f4fe4
feat: ansi-styled results with --ansi or corresponding channel option (#655)
# Examples:
## ripgrep
```toml
[metadata]
name = "text"
description = "A channel to find and select text from files"
requirements = ["rg", "bat"]

[source]
command = "rg . --no-heading --line-number --colors 'match:fg:white' --colors 'path:fg:blue' --color=always"
ansi = true
output = "{strip_ansi|split:\\::..2}"

[preview]
command = "bat -n --color=always '{strip_ansi|split:\\::0}'"
env = { BAT_THEME = "ansi" }
offset = '{strip_ansi|split:\::1}'

[ui]
preview_panel = { header = '{strip_ansi|split:\::..2}' }
```

<img width="2880" height="1620" alt="Screenshot From 2025-07-19
20-56-53"
src="https://github.com/user-attachments/assets/67055fd1-d03e-4c4b-ad82-dbc3ba8c80d4"
/>

## git-log

```toml
[metadata]
name = "git-log"
description = "A channel to select from git log entries"
requirements = ["git", "delta"]

[source]
command = "git log --graph --pretty=format:'%C(yellow)%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --color=always"
output = "{strip_ansi|split: :1}"
ansi = true

[preview]
command = "git show -p --stat --pretty=fuller --color=always '{strip_ansi|split: :1}' | delta"
```

<img width="2880" height="1620" alt="Screenshot From 2025-07-19
19-17-15"
src="https://github.com/user-attachments/assets/be97ff35-8a35-4d26-ad14-afd5ece3fed6"
/>
2025-07-19 22:52:12 +02:00
Alex Pasmantier
c789802d86
docs: fix discord badge 2025-07-19 21:32:39 +02:00
Alex Flores
e809ccf686
feat(config): add support for custom input prompt in user config (#648) 2025-07-18 17:16:51 +02:00
github-actions[bot]
28f58e0641
chore(changelog): update changelog (auto) (#652)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-07-18 02:37:46 +02:00
alexandre pasmantier
c533c41540 chore: release version 0.12.5 0.12.5 2025-07-18 02:35:03 +02:00
alexandre pasmantier
c4bcba211a docs: fix cable channel docs image links 2025-07-18 02:13:38 +02:00
LM
6b818b927c test: make file based testing more robust with unique identifiers (#649)
## 📺 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
2025-07-18 01:56:21 +02:00
alexandre pasmantier
4d42a731bf chore: some gh actions + justfile improvements 2025-07-18 01:38:40 +02:00
Alex Pasmantier
14b91f5e55
docs: update discord badge 2025-07-18 01:16:52 +02:00
alexandre pasmantier
6a11627546 fix: text channel colon splitting
Fixes #651
2025-07-18 01:09:42 +02:00
MohMine
bc7a38b1a4
feat: add discord server badge in README file (#650) 2025-07-17 17:44:20 +02:00
Leonardo Vencovsky
313c0c3238
feat(cable): Channels for AWS Buckets and Instances (#647)
## 📺 PR Description

Added `aws-buckets` and `aws-instances` channels.

## Checklist

- [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

---------

Co-authored-by: Leonardo Vencovsky <leoven@Leonardos-MacBook-Pro.local>
Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
2025-07-15 22:42:25 +02:00
alexandre pasmantier
07853f0700 fix(history): short-circuit add_entry when history size is zero
Fixes #646
2025-07-15 19:04:40 +02:00
kapobajza
4b84a12320
fix(website): Added gap between home page features on smaller screens (#645) 2025-07-15 18:37:41 +02:00
alexandre pasmantier
37e31b2443 fix: clean exit when fallback channel is not found
Fixes #643
2025-07-15 10:23:47 +02:00
alexandre pasmantier
2ae95cdbb1 test: add missing test target directory to flaky tests 2025-07-14 12:59:21 +02:00
Alex Pasmantier
3e4267dad4
docs: update website features (#640) 2025-07-13 16:43:35 +02:00
github-actions[bot]
3c20d36149
chore(changelog): update changelog (auto) (#639)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-07-13 13:59:23 +02:00
alexandre pasmantier
e87f7d30a8 chore: release version 0.12.4 0.12.4 2025-07-13 13:57:54 +02:00
alexandre pasmantier
99b5c5ce78 feat(cli): add --force option to update-channels 2025-07-13 13:28:01 +02:00
alexandre pasmantier
16d7de7d09 ci: fix cross not available in PATH 2025-07-13 13:01:35 +02:00
alexandre pasmantier
23f38f9bb4 test: fix flaky tests and increase frame stability timeout 2025-07-13 12:35:51 +02:00
alexandre pasmantier
da9484a491 docs: update CONTRIBUTING.md 2025-07-13 01:49:12 +02:00
github-actions[bot]
874e91190d
chore(changelog): update changelog (auto) (#637)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-07-13 01:25:03 +02:00
alexandre pasmantier
d5adad0323 chore: release version 0.12.3 0.12.3 2025-07-13 01:16:08 +02:00
alexandre pasmantier
f0d17b7011 docs: add links to various repo docs 2025-07-13 01:15:25 +02:00
alexandre pasmantier
fb97f011be fix(themes): selection_fg was not applied correctly + code improvements
Fixes #636
2025-07-13 00:21:39 +02:00
alexandre pasmantier
1bbda8e62f docs: add link to shell integration local dev note 2025-07-12 21:41:32 +02:00
Alex Pasmantier
7079d48aa7 fix(nushell): append to existing nu keybindings instead of replacing them (#635)
## 📺 PR Description

Fixes #628

## Checklist

<!-- a quick pass through the following items to make sure you haven't
forgotten anything -->

- [ ] 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
2025-07-12 17:38:35 +02:00
LM
ecf05a0148
test(cli): fix some flaky tests, reinstate exact mode testing (#632)
## 📺 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
2025-07-12 15:27:38 +02:00
Samir
6023d020f1
fix(nix): set meta.mainProgram field (#634)
`meta.mainProgram` must be set otherwise `lib.getExe` assumes that the
package name is `television` and home manager shell integrations are
broken

## 📺 PR Description

<!-- summary of the change + which issue is fixed if applicable. -->

## 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
2025-07-12 14:23:46 +02:00
LM
521c7473b4
fix(channels): make stdin and adhoc channels inherit from global config (#633)
## 📺 PR Description

Fixes #627
stdin and adhoc channels now inherit from global config making them
consistent with the rest

## 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
2025-07-12 13:51:48 +02:00
MohMine
4e90a357e8
feat(themes): allow users to add theme overrides using their config file
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>
2025-07-11 00:06:46 +02:00
alexandre pasmantier
23cf584f67 refactor(bash): improve bash integration script 2025-07-10 23:16:22 +02:00
alexandre pasmantier
229604a765 fix(fish): fix --inline terminal behavior for fish integration
Fixes #624
2025-07-10 22:48:53 +02:00
alexandre pasmantier
781d27cebc fix(ci): cross compilation for aarch64 deb release 2025-07-10 21:35:57 +02:00
alexandre pasmantier
e9ef8d8150 chore: add recipes to allow testing shell integrations locally less of a pain 2025-07-10 21:31:36 +02:00
alexandre pasmantier
83711f6d30 fix(zsh): improve zsh integration inline mode 2025-07-10 21:12:33 +02:00