91 Commits

Author SHA1 Message Date
Alex Pasmantier
124c06c403
refactor(config): check for config file existence before processing subcommands (#214) 2025-01-05 00:05:19 +01:00
Alex Pasmantier
657af5e36d
refactor(cable): always create default cable channels in user directory if no cable channels exist (#213)
Fixes #212
2025-01-04 23:57:01 +01:00
Tulip Blossom
741ce30b08
fix: automatically create configuration and data directories if they don't exist (#204)
I've noticed that the latest release (0.85.0) failed to start up if
`$HOME/.config/television` doesnt exist. This should force the directory
creation if the user doesn't have it.

Before:

![image](https://github.com/user-attachments/assets/d54245f7-e9b7-4baf-87d9-75869821e519)

After:

![image](https://github.com/user-attachments/assets/e0af2a16-987f-4943-85e7-59d427f64abb)

---------

Co-authored-by: Alexandre Pasmantier <alex.pasmant@gmail.com>
2025-01-01 12:05:20 +01:00
Alex Pasmantier
343ed3c126
feat(ux): automatically create default user configuration file if nonexistent (#196) 2024-12-31 13:11:22 +01:00
Alex Pasmantier
97343c679d
fix(ux): make DeletePrevWord trigger channel update (#175)
Fixes #170
2024-12-30 00:52:34 +01:00
Alex Pasmantier
e034615594
feat(cable): make preview optional for cable channels (#155) 2024-12-28 18:42:18 +01:00
Alex Pasmantier
309ff537a4
feat(cli): allow passing --input <STRING> to prefill input prompt (#153)
Fixes #152
2024-12-28 17:56:11 +01:00
Alex Pasmantier
c3b8c68d1b
feat(ux): print current query to stdout on Enter if no entry is selected (#151)
Fixes #49
2024-12-28 16:36:30 +01:00
Alex Pasmantier
12fdf94e5d
feat(input): bind ctrl-w to delete previous word (#150)
Fixes #135
2024-12-28 16:25:19 +01:00
Alex Pasmantier
557686e197
feat(config): allow specifying multiple keymaps for the same action + better defaults (#149)
Fixes #135
2024-12-28 15:56:12 +01:00
Alex Pasmantier
499bfdb8e5
refactor(ui): more compact general layout and make preview panel optional (#148)
Fixes #147 

<img width="2552" alt="Screenshot 2024-12-28 at 15 18 42"
src="https://github.com/user-attachments/assets/08e440c2-6878-4a0f-8734-83a8e8b84e5a"
/>
2024-12-28 15:21:17 +01:00
Alex Pasmantier
68d118986c
feat(shell): autocompletion plugin for zsh (#145) 2024-12-25 18:53:50 +01:00
Alex Pasmantier
22f1b4dc33
feat(ui): decouple preview title position from input bar position and make it configurable (#144)
fixes #143 

## example
```toml
[ui]
input_bar_position = "top"
preview_title_position = "top"
```

<img width="2553" alt="Screenshot 2024-12-18 at 22 06 29"
src="https://github.com/user-attachments/assets/6c9ac842-e383-42a8-bdf4-d48c7a826df3"
/>
2024-12-18 22:30:10 +01:00
defigli
882737d147
feat(cli): add argument to start tv in another working directory (#132)
Resolves #111

---------

Co-authored-by: Alexandre Pasmantier <alex.pasmant@gmail.com>
2024-12-15 22:13:11 +01:00
Alexandre Pasmantier
4164e9092b
feat(themes): more builtin UI themes (#125) 2024-12-15 13:26:28 +01:00
Alexandre Pasmantier
a7064c18c8
refactor(config)!: use $HOME/.config/television by default for macOS (#124) 2024-12-15 12:23:31 +01:00
Alexandre Pasmantier
7b114b7cb6
fix(config): better handling of default values (#123) 2024-12-15 01:09:53 +01:00
Alexandre Pasmantier
37b2dda729
refactor(help): enable help bar by default and add help keybinding (#122) 2024-12-15 00:54:14 +01:00
Alexandre Pasmantier
11da96d7fb
feat(themes): add support for global themes background colors (#120) 2024-12-15 00:29:10 +01:00
Alexandre Pasmantier
937d0f0758
feat(cable): support cable channel invocation through the cli (#116) 2024-12-14 17:47:36 +01:00
Alexandre Pasmantier
913aa85af0
feat(themes): add support for ui themes (#114)
fixes #80 

### examples
| gruvbox | solarized |
| :-: | :-: |
| <img width="1792" alt="gruvbox"
src="https://github.com/user-attachments/assets/c0c168a5-5c95-4113-93fd-24b34a9344d8"
/> | ![Screenshot 2024-12-13 at 14 38
57](https://github.com/user-attachments/assets/368e3e37-7fdd-493a-8c0b-47e3731ae67b)
|
2024-12-13 14:54:38 +01:00
Alexandre Pasmantier
54399e3777
refactor(screen): extract UI related code to separate crate (#106)
Co-authored-by: Bertrand Chardon <bertrand.chardon@doctrine.fr>
2024-12-08 13:46:30 +01:00
Bertrand Chardon
4567f26a37
chore: use named constant for colors (#99)
this PR replaces straight colors by named constants, which should
facilitate any subsequent move to refactor the theming capabilities of
`tv`
2024-12-05 22:45:36 +01:00
Alexandre Pasmantier
a5f5d20071
feat(cable): add support for custom channels (#75) 2024-12-05 00:34:09 +01:00
Bertrand Chardon
fee4ed2671
perf: add cache for icon colors (#89) 2024-12-02 16:20:13 +01:00
Bertrand Chardon
b7ddb00c4e
perf: skip ratatui span when match at end of string (#91)
perf: skip ratatui span when match end of string

- for the entry name, we don't create an empty ratatui span when the
  match is right at the end of the entry name
- same for the preview, we don't create a ratatui span anymore when the
  match is at the end of the preview
2024-12-02 16:18:52 +01:00
Bertrand Chardon
4bea114635 perf: remove unnecessary clone() calls (#83)
perf: remove redundant clone() calls
2024-11-27 23:54:08 +01:00
Alexandre Pasmantier
30f1940815
refactor(exit): use std::process::exit explicitly (#84) 2024-11-27 23:07:02 +01:00
Alexandre Pasmantier
d3c16af4e9
fix(stdin): better handling of long running stdin streams (#81)
fix: long running pipes
2024-11-27 22:56:30 +01:00
Alexandre Pasmantier
1ebec7ead2
fix(output): quote output string when it contains spaces and points to an existing path (#77) 2024-11-26 10:53:14 +01:00
Alexandre Pasmantier
220671106e
feat(layout): allow reversing the layout and placing input bar on top (#76) 2024-11-25 21:32:41 +01:00
Alexandre Pasmantier
6d3965152e
feat(navigation): add action to scroll results list by a page (#72) 2024-11-24 16:54:35 +01:00
Alexandre Pasmantier
edd9df4e29
fix(entry): always preserve raw input + match ranges conversions (#62)
* fix(entry): preserve raw input

* chore(version): bump workspace crates and television

* test: add tests for replace_non_printable and cleanup commented out code

* chore(changelog): update changelog (auto)

* chore(deps): update cargo dependencies

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-24 00:20:04 +01:00
Alexandre Pasmantier
b757305d7a
refactor(picker): refactor picker logic and add tests to picker, cli, and events (#57)
* refactor(picker): refactor picker logic and add tests for picker, cli and events

* Update changelog

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-23 00:33:15 +01:00
Alexandre Pasmantier
565283babb
chore(deps): shed off unessential dependencies (#52) 2024-11-20 21:32:23 +01:00
Alexandre Pasmantier
40d5b20c7d
feat(ui): make the top UI help bar toggleable (#41) 2024-11-19 00:07:53 +01:00
Alexandre Pasmantier
75d0bf7b6b
refactor(config)!: make action names snake case in keybinding configuration (#40) 2024-11-18 23:58:02 +01:00
Alexandre Pasmantier
5807cda45d
feat(cli): allow passing passthrough keybindings via stdout for the parent process to deal with (#39) 2024-11-18 23:48:48 +01:00
Alexandre Pasmantier
512afa2fda
feat(ui): make help bar display optional (#35) 2024-11-16 20:32:40 +01:00
Alexandre Pasmantier
aa2f2609a4
refactor(configuration): modularize code and better handling of default options (#32)
* fix(config): set ui default configuration values

* refactor(configuration): modularize code and better handling of default options
2024-11-16 19:48:46 +01:00
Alexandre Pasmantier
06a4feb9f2
fix(config): swap out default keymaps with user defined ones instead of stacking (#26)
* fix(config): swap out default keymaps with user defined ones instead of stacking

* fix default configuration fallback
2024-11-15 15:16:00 +01:00
Alexandre Pasmantier
4f0daec63d
refactor(channels): converting between entries and channels is now generic over channels (#25) 2024-11-15 00:05:52 +01:00
Alexandre Pasmantier
ff25fb2dde
fix(windows): #20 respect TELEVISION_CONFIG env var on windows (#21)
* fix: remove org name from default platform config and data dirs

* fix: adjust config and data dirs fallback logic

* patch

* update README
2024-11-14 00:08:19 +01:00
Alexandre Pasmantier
5611ee8b2d
refactor(workspace): reorganize cargo workspace (#12) 2024-11-11 15:15:24 +01:00
Alexandre Pasmantier
62073d69cc
perf(preview): remove temporary plaintext previews in favor of loading message preview (#10)
* perf(preview): remove temporary plaintext previews in favor of a loading message

* linting

* dead code
2024-11-11 13:49:46 +01:00
Alexandre Pasmantier
81cf17bd5d
fix(config): more consistent configuration file location for linux and macos (#9) 2024-11-11 12:06:46 +01:00
Erich Gubler
e475523c79
fix(windows): ignore KeyEventKind::Release events (#3) 2024-11-11 00:55:39 +01:00
Alexandre Pasmantier
96976d93cb docs: update README.md 2024-11-10 02:30:08 +01:00
Alexandre Pasmantier
8dd7f23734 refactoring: more refactoring and fixing doctests 2024-11-10 01:03:12 +01:00
Alexandre Pasmantier
ae938dcfc0 refactoring: split project into separate crates 2024-11-10 00:51:58 +01:00