462 Commits

Author SHA1 Message Date
Alex Pasmantier
028aa1f277
Merge 624c485d68f9bee39d8a34940e87acbae2800c11 into aac7e4dc4570d5e0caf305b738009f2b077da7be 2025-05-27 15:56:14 -04:00
alexandre pasmantier
aac7e4dc45 docs: update terminal emulators compatibility list 2025-05-26 23:35:50 +02:00
LM
0f4d87915b
feat(shell): improve zsh completion system (#525)
this pr adds the possibility of starting television from a different
directory and it gives the option of complete a partial match. For
example

```fish
cd ~/.config/<ctrl-t>    # opens television at '~/.config/' with an empty search bar
cd ~/.config/fi<ctrl-t>    # opens television at '~/.config/' with 'fi' in the search bar
```

solves (for zsh shell)
https://github.com/alexpasmantier/television/issues/438
2025-05-26 21:25:06 +02:00
Alex Pasmantier
dfbdd65107
fix(config): use the config default_channel field as a fallback when no channel is specified (#524)
Fixes #520 

fyi @lalvarezt
2025-05-26 21:16:06 +02:00
Alex Pasmantier
7bbf538898
docs(utils): add documentation for string formatting logic (#517) 2025-05-20 23:24:16 +02:00
Alex Pasmantier
6b3c4ee773
fix(cable): don't panic when unable to format user template with entry (#516) 2025-05-20 22:59:41 +02:00
Alexandre Pasmantier
9127e419fb docs: add index.md 2025-05-17 13:37:15 +02:00
Alex Pasmantier
11c2ef4eef chore: create github action workflow for pages 2025-05-17 12:13:02 +02:00
Alex Pasmantier
3b3a0ec1ff
feat(windows): add text channel with preview offset for windows (#514)
![image](https://github.com/user-attachments/assets/9f8935db-82fe-4235-8584-ab8b0508b20f)
2025-05-16 12:23:09 +02:00
github-actions[bot]
d106adafc0
chore(changelog): update changelog (auto) (#513)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-05-16 01:52:19 +02:00
Alex Pasmantier
ca09c503ca
refactor!(cable): update cable channel preview configuration format + add custom preview offsets (#511)
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}"
```
2025-05-16 01:07:12 +02:00
kapobajza
39dd9efd5d
fix(shell): Paste not working in zsh shell integration (#512)
Fixes https://github.com/alexpasmantier/television/issues/393
2025-05-15 15:08:20 +02:00
Alexandre Pasmantier
0f6b29ba81
chore: add sponsorhips button to the repo 2025-05-14 23:01:25 +02:00
Alexandre Pasmantier
1741a15e52
fix(preview): add a post-processing step to clean out ansi text from non-displayable characters (#509) 2025-05-14 22:57:43 +02:00
Alexandre Pasmantier
cfe49ce81c
feat(remote): redirect Action::Quit to Action::ToggleRemoteControl when in remote mode (#508)
Fixes #505
2025-05-14 21:31:10 +02:00
Alexandre Pasmantier
fc2f8b9473
perf(previews): avoid unnecessary preview content copy (#507) 2025-05-14 21:25:25 +02:00
Alexandre Pasmantier
67c067ff40
refactor(previewer): a much more efficient preview system for tv (#506)
Broke away the previewer logic into its own tokio task communicating
with the main thread over two mpsc channels.

Most of the previewer code is now much simpler and less verbose. 

This brings quite a nice bump to performance and overall UI
responsiveness and also makes the previewer consume less cpu resources.
2025-05-14 20:22:53 +02:00
Alexandre Pasmantier
1a5fa5dd4c
refactor(channels): some renaming and refactoring the channels module (#503) 2025-05-11 17:00:31 +02:00
nkxxll
cd33151bac
fix(layout): double check whether preview is enabled (#499) 2025-05-08 22:03:47 +02:00
Alexandre Pasmantier
2b2654b6aa
refactor: drop TelevisionChannel enum and all associated macros (#498)
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.
2025-05-06 11:18:32 +02:00
Alexandre Pasmantier
58d73dbeba
refactor!(previews): drop builtin previewers and all related code and dependencies (#495)
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).
2025-05-06 00:07:50 +02:00
Swann Castel
1086899ba7
feat(ui): add a UI portrait mode #489 (#496)
#489, This PR adds support for television orientation,
input_bar_position is preserved and activating/deactivating the preview
works for both :

1. Landscape (default orientation)

a. input_bar_position = "top"


![image](https://github.com/user-attachments/assets/08f334c0-0780-46ee-aa80-0ccdd1a473eb)

![image](https://github.com/user-attachments/assets/9df6faf5-2211-4fa0-8f08-28688c48e8ee)

b. input_bar_position = "bottom"


![image](https://github.com/user-attachments/assets/223c9814-d1c6-4ed1-b407-b5ba67ebaa06)

![image](https://github.com/user-attachments/assets/9be95c92-f10b-4dec-b423-c7de1f8534d1)

2. Portrait (new orientation)

a. input_bar_position = "top"


![image](https://github.com/user-attachments/assets/71d07092-a175-4978-9ee6-c8978eb83cde)

![image](https://github.com/user-attachments/assets/64d891f4-7acc-456b-a01d-14cab54bff15)

b. input_bar_position = "bottom"


![image](https://github.com/user-attachments/assets/b2c527eb-2c47-404e-8f6d-685b54be71af)

![image](https://github.com/user-attachments/assets/39c9bcaa-cbd5-4d4b-81d8-1e7cfb5bfa10)
2025-05-05 22:37:15 +02:00
LM
be8008e97d
feat(shell): improve fish completion system (#494)
this pr adds the possibility of starting television from a different
directory and it gives the option of complete a partial match. For
example

```fish
cd ~/.config/<ctrl-t>    # opens television at '~/.config/' with an empty search bar
cd ~/.config/fi<ctrl-t>    # opens television at '~/.config/' with 'fi' in the search bar
```

solves (for fish shell)
https://github.com/alexpasmantier/television/issues/438
2025-05-02 15:45:01 +02:00
Alexandre Pasmantier
cc27b5ec6b refactor: drop dependency to the ignore crate (#493) 2025-05-01 23:05:56 +02:00
Alexandre Pasmantier
f887a2390e
feat(cli): add a --ui-scale [0,100] cli parameter (#492) 2025-05-01 20:46:05 +02:00
github-actions[bot]
64c599ef10
chore(changelog): update changelog (auto) (#491)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-05-01 17:43:30 +02:00
Alexandre Pasmantier
b9f42e8c29
refactor(preview): simplify channel previews code and remove intermediate PreviewKind struct (#490) 2025-05-01 17:42:01 +02:00
Alexandre Pasmantier
624c485d68 fix(shell): add match arm for Nushell's binary name 2025-04-29 21:49:46 +02:00
nick
feafd9b7aa fix(shell): update nushell completion script (#488)
I've updated the completion.nu script to use nushell syntax. I tested
this with a custom cable channel and placed the keybinding logic
directly within completion.nu. Next steps will mean figuring out how to
move that logic into, I think, shell.rs.

Co-authored-by: Victor <victor@Users-MBP.lan>
2025-04-29 21:49:46 +02:00
Alexandre Pasmantier
7a3546fff7 feat(shell): add support for integration with NuShell 2025-04-29 21:49:46 +02:00
Swann Castel
dbff3a330b
fix(alias): move terminal raw mode before loading bat assets #444 (#484) 2025-04-29 21:42:12 +02:00
Alexandre Pasmantier
e2f52b835d
refactor(cable): improve naming and documentation for prototypes.rs (#487) 2025-04-29 18:31:57 +02:00
Alexandre Pasmantier
4385317e06
refactor(cable): split cable related code into separate submodules (#486)
This refactors `television/channels/cable.rs` into two additional
submodules:
- `television/channels/cable/preview.rs`
- `television/channels/cable/prototypes.rs`
2025-04-29 18:07:42 +02:00
Alexandre Pasmantier
0514a914b6
fix(alias): rename the aliases channel to alias (#485) 2025-04-29 17:41:57 +02:00
Alexandre Pasmantier
d3bb3b0a56
docs: cleanup old todo list (#483) 2025-04-28 00:10:58 +02:00
Alexandre Pasmantier
c2f4cc258f
refactor: tv no longer needs to write the default cable channel recipes to the user's configuration directory (#482)
The cable channel prototypes are now compiled into the binary itself,
and users can override them with a custom cable file.
2025-04-28 00:04:38 +02:00
Alexandre Pasmantier
67677fb917
refactor!: all channels are now cable channels (#479)
- 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)
2025-04-27 23:50:14 +02:00
nkxxll
1f0c178a2d
fix(results): remove keymap hint if help is disabled (#480)
fixes #471
2025-04-26 00:09:49 +00:00
github-actions[bot]
a602dda347
chore(changelog): update changelog (auto) (#478)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-22 01:26:31 +02:00
Alexandre Pasmantier
f28c18ed64 chore: release version 0.11.9 0.11.9 2025-04-22 01:22:23 +02:00
nkxxll
bbbdcb0271
feat(cli): add substring matching with --exact flag (#477)
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>
2025-04-22 00:37:07 +02:00
Alexandre Pasmantier
ce02824f3c
perf(stdin): avoid unnecessary allocations when streaming from stdin (#475) 2025-04-20 23:11:02 +02:00
github-actions[bot]
433d7fa270
chore(changelog): update changelog (auto) (#474)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-20 19:58:50 +00:00
Alex Pasmantier
b4438ab835 chore: bump to 0.11.8 0.11.8 2025-04-20 21:44:41 +02:00
nkxxll
0bd4d4274e
feat(cli): add custom header for input field (#472)
#362 

Add a custom header and the cli flag for the input field.

Maybe I should replace channel name with header name in the draw method
instead of checking in the draw loop whether the header is there or
not...

Co-authored-by: Alexandre Pasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-20 19:20:14 +00:00
Alexandre Pasmantier
a938c1c469
perf(ui): add frame rate throttling to avoid consuming unnecessary CPU resources (#473)
This adds quite a nice bump to overall UI reactiveness.
2025-04-20 18:51:27 +02:00
Alexandre Pasmantier
2be2ae7cde
fix(unicode): add support for more unicode characters (#470) 2025-04-18 12:11:13 +00:00
Alexandre Pasmantier
315a9f71fa
test(benches): refactor benches into a simpler and more scalable structure (#467) 2025-04-14 17:41:16 +00:00
github-actions[bot]
ec8a7dbfc3
chore(changelog): update changelog (auto) (#465)
This PR was created by a GitHub Action to update the changelog.

Co-authored-by: alexpasmantier <47638216+alexpasmantier@users.noreply.github.com>
2025-04-12 21:18:55 +00:00
Alex Pasmantier
169358442b chore: bump to 0.11.7 0.11.7 2025-04-12 23:15:18 +02:00