631 Commits

Author SHA1 Message Date
alexandre pasmantier
8d822cd2fc test(e2e): add e2e tests for secondary cli commands (version, init, list-channels, ...) 2025-06-28 16:56:09 +02:00
alexandre pasmantier
bc8d636005 feat(cli): add cli options to override configuration and cable directories
`tv --config-dir=/my/dir --cable-dir=/my/other/dir`
2025-06-28 16:56:09 +02:00
alexandre pasmantier
666254498e test(television): add test to check channel keybindings precedence 2025-06-28 16:56:09 +02:00
alexandre pasmantier
5d730cdf71 fix(channel): only allow reload and cycle_sources in channel mode 2025-06-28 16:56:09 +02:00
alexandre pasmantier
6b38ce2058 feat(cable): migrate the rest of unix channels 2025-06-28 16:56:09 +02:00
alexandre pasmantier
1de28665d9 fix(templates): handle case when template contains brackets that shouldn't be interpreted by the parser 2025-06-28 16:56:09 +02:00
alexandre pasmantier
653c986b7e fix(github): copy github prototypes' content directly
The current implementation downloads the raw prototype files from
github, then deserializes them into `ChannelPrototype` objects and
re-serializes them to the local config.
Because TOML can express same things in multiple ways, it isn't trivial
to have consistent TOML formatting results when re-serializing the
files.
I consider this to be a bug, which is why I'm now directly copying the
downloaded file content to the local config, while keeping a sanity
check by attempting to deserialize it along the way.
2025-06-28 16:56:09 +02:00
alexandre pasmantier
b0c25b19be fix: rollback unwanted modifications on text and env prototypes 2025-06-28 16:56:09 +02:00
alexandre pasmantier
53c36f040c refactor: add reload and cycle source to default keymaps + default keymap changes
toggle remote: Ctrl-r -> Ctrl-t
reload source: Ctrl-r
cycle sources: Ctrl-s
2025-06-28 16:56:09 +02:00
alexandre pasmantier
466a74341d refactor: strip new channels to their bare minimum config 2025-06-28 16:56:09 +02:00
alexandre pasmantier
175015d470 fix: load new channel after zapping with the remote 2025-06-28 16:56:09 +02:00
alexandre pasmantier
c80e9b18cb fix: "toggle source" leftovers 2025-06-28 16:56:09 +02:00
alexandre pasmantier
fe8bdc632b test: add test to check cli overrides 2025-06-28 16:56:09 +02:00
LM
9e306d93bc feat: new channel and added reload and toggle actions (#540)
Add env channel
Add support to toggle between sources and reload them, this enables the
following

```toml
[source]
command = ["fd -t f", "fd -t f -H"]

[keybindings]
toggle_source = "ctrl-t"
reload_source = "ctrl-r"
```

now you can have the same channel with two different representations,
for example with and without hidden files

the change is backwards compatible, if you put a simple string nothing
changes

---------

Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
2025-06-28 16:56:09 +02:00
LM
67195e756c fix(app): channel keybindings are ignored (#538) 2025-06-28 16:56:09 +02:00
LM
415dd38c66 fix(app): honor cli no-help and no-preview (#539)
precedence should be 
cli flags > local config > global config
2025-06-28 16:56:09 +02:00
alexandre pasmantier
3e98475e35 fix(github): improve ux when downloading cable channels 2025-06-28 16:56:09 +02:00
alexandre pasmantier
e76a3df776 refactor(cable)!: cable format redesign 2025-06-28 16:56:09 +02:00
Alex Pasmantier
4d80e95c6b
feat(shell): add support for integration with NuShell (#410)
Fixes #181

---------

Co-authored-by: nick <64329369+nasteffe@users.noreply.github.com>
Co-authored-by: Victor <victor@Users-MBP.lan>
2025-06-23 19:39:28 +02:00
Alex Pasmantier
f6b22051cd
chore(tui-input): add credit and license for television/utils/input.rs (#544)
Fixes #543
2025-06-16 12:59:16 +02:00
Alex Pasmantier
b372fe86ea
refactor(cable): add files and text channels with the new configuration format (#534) 2025-06-10 14:10:22 +02:00
Vitalii Lukyanov
2e99fba9c0
chore(nix): update sha of rust toolchain in flake.nix (#530) 2025-06-06 13:35:28 +02:00
Alex Pasmantier
738fe08fbb
chore(rust): update rust edition to 2024 and version to 1.87 (#528) 2025-06-05 15:01:27 +02: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
Swann Castel
dbff3a330b
fix(alias): move terminal raw mode before loading bat assets #444 (#484) 2025-04-29 21:42:12 +02:00