Commit Graph

34 Commits

Author SHA1 Message Date
Sandro
cc964861c4
feat(stats): Normalize formatting of default config, suggest nix (#1764)
* Normalize formatting

This makes the commented bits unifed and makes lists multiline and
always adds the trailing comma.

* Add nix to default config

Since we are big fans of it ;)
2024-02-26 14:58:22 +00:00
Helmut K. C. Tessarek
56b971ae19
feat(client): add config option keys.scroll_exits (#1744)
* feat(client): add config option keys.scroll_exits

If the config option is set the `false`, using the up/down key won't
exit the TUI when scrolled past the first/last entry.

Example:

```
[keys]
scroll_exits = false
```

The default is `true`, which is the current behavior.

* Update atuin/src/command/client/search/interactive.rs

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>

* refactor: add option to config.toml

---------

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-02-21 08:25:55 +00:00
Onè
409456fce1
fix: typo (#1741) 2024-02-20 12:54:48 +00:00
David
f8d01eef99
feat: add 'ignored_commands' option to stats (#1722) 2024-02-15 18:52:19 +00:00
David
b4f8d1433b
docs: minor formatting updates to the default config.toml (#1689) 2024-02-12 09:26:29 +00:00
cyqsimon
318bdd8955
Add timezone configuration option & CLI overrides (#1517)
* Allow specifying a timezone in history search/list

* Fix clippy complaints

* Add a bit more comment on supporting named timezones

* Add rudimentary tests

* Ditch local timezone test

* Timezone configuration support

* Set default timezone to `local`

* `--tz` -> `--timezone`

`--tz` is kept as a visible alias
2024-02-06 15:34:03 +00:00
Conrad Ludgate
744f0059c2
feat: add prefers_reduced_motion flag (#1645)
* feat: add prefers_reduced_motion flag

* use NO_MOTION, and ensure type is bool

* update default config

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-02-01 15:17:29 +00:00
Dongxu Wang
e1c2b9c783
feat: make history list format configurable (#1638)
* feat: make history list format configurable

* Update atuin-client/config.toml

* review: run format

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-01-29 10:58:20 +00:00
Koichi Murase
e484a68b8b
feat(search): make cursor style configurable (#1595)
* feat(search): make cursor style configurable

The vim mode of the interactive Atuin search changes the cursor style
on a mode change, but the current implementation has the following
issues.

* The terminal's cursor style set by the Atuin search remains after
  Atuin exits.  This causes an inconsistency with the shell's setting
  for the cursor style.

* Also, the cursor style for each keymap mode is currently hardcoded
  in the source code, which is not necessarily consistent with the
  user's cursor-style setting in the shell.

* Since the current implementation does not set the cursor style for
  the initial keymap mode but only sets the cursor style when the
  keymap mode is changed, it also causes inconsistency in the cursor
  style and the actual keymap when the shell's keymap and Atuin's
  initial keymap mode are different.

This patch solves those issues by introducing an opt-in configuration
variable `keymap_cursor`.  By default, the vim mode does not change
the cursor style because there is no way to automatically determine
the cursor style consistent with the shell settings.  We enable the
feature only when the user specifies the preferred cursor style in
each mode in their config.  Also, the cursor style is set on the
startup of the Atuin search (based on the initial keymap mode) and is
reset on the termination of the Atuin search (based on the shell's
keymap mode that started the Atuin search).

* chore(settings): remove dependency on crossterm
2024-01-22 10:56:44 +00:00
Ellie Huxtable
8899ce5089
fix: add acquire timeout to sqlite database connection (#1590)
* fix: add acquire timeout to sqlite database connection

This should fix #1503

I wasn't able to trigger enough IO pressure for the SQL connection to be
a problem.

This adds `local_timeout` to the client config. This is a float, and
represents the number of seconds (units in line with the other timeouts,
though those are ints). Users may well want to reduce this if they
regularly have issues, but by default I think 2s is fine and avoids a
non-responsive system in bad situations.

* tests
2024-01-19 15:45:42 +00:00
Koichi Murase
6bff8c8e1a
feat(search): introduce keymap-dependent vim-mode (#1570)
* feat(search): introduce keymap-dependent vim-mode

* fix(zsh): provide widgets with specific keymaps

* fix(settings): unify "vim" and "keymap_mode"
2024-01-16 13:35:10 +00:00
YummyOreo
a56085f059
feat(ui): vim mode (#1553)
* feat(config): add vim option to config

* feat(ui): simple vim mode

* fix(windows): windows sadly doesn't support the stuff

* feat(ui): blinking

* fix(merge)

* revert: reverts some debugging stuff

* feat(ui): changes the defaut to insert, don't know what should be the default

* feat(ui): implements some vim parity

* doc: adds this to the docs

* docs(keybindings): adds vim mode keybindsings to the list of keybindings

* refactor: rustfmt and remove the docs for pr in own repo

* refactor: use execute!

* Update atuin/src/command/client/search/interactive.rs

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-01-13 17:15:49 +00:00
Josef Friedrich
3c7f6991e3
fix(docs): fix typo (#1439) 2023-12-11 20:16:11 +00:00
Ellie Huxtable
b530d39c3f
docs: new stats config (#1412) 2023-11-23 09:59:56 +00:00
Michael Vincent
6bf35071dd
Remove duplicate "invert" in default config (#1338) 2023-10-26 17:32:00 +00:00
Ellie Huxtable
88f3e2a04f
Add enter_accept to immediately execute an accepted command (#1311)
* make enter execute the command, tab copy it

* Add config for enter_accept

enter_accept will make Atuin immediately accept an execute a command
when selected. It defaults to false in our binary, but the default
config enables it.

This means that users who already use atuin will not default to the new
behaviour unless they opt in, but new users will have it by default.

Thanks to @davidhewitt for the patch and bulk of this implementation!
Currently we have it just for zsh, but I'll follow up with other shells
(unless anyone beats me to it :D)

* Add docs

* we need to tidy up the ui code anyway

* Check if using zsh

* Update docs/docs/config/config.md

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>

---------

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
2023-10-20 07:16:54 +01:00
Tobias Genannt
20afcd2b63
Add commands to print the default configuration (#1241)
* Add commands to print the default configuration

When updating a software I often want to compare my configuration with the
configuration of the new version. To make this possible atuin can now print
the default configuration.
This also updates the example files with the actual values used as default in
the settings.rs files.

* Changed command name to 'default-config'

* Fixed merge
2023-10-12 22:13:50 +01:00
Dieter Eickstaedt
ebef5cdaf0
feat(keyup): Configure SearchMode for KeyUp invocation #1216 (#1224)
* feat(keyup): Configure SearchMode for KeyUp invocation #1216

* docs: adjusted search mode documentation

* feat: setting search mode on engine

* chore: cargo fmt

* chore: removed redundant field name
2023-09-17 19:30:13 +01:00
Matheus Martins
0c2d5ce07b
Update config.toml: List inverted mode (#1226) 2023-09-14 21:04:13 +00:00
Emanuele Panzeri
8080a172af
Update(docs) Add workspace to config.toml and config.md (#1157) 2023-08-09 23:06:27 +01:00
Richard Turner
c0449955e3
use Ctrl-n instead of Alt-n on macOS (#1106)
* use Ctrl-n instead of Alt-n on macOS

* make ctrl-n instead of alt-n configurable
2023-07-27 08:10:40 +00:00
Simon
a6c4f2c23e
Update config.toml path default comments (#1092)
- Updates outdated mac db_path default
- Adds windows db_path default
- Adds windows, mac, linux defaults for key_path and session_path
- Changes example session_path to be different to example key_path
2023-07-08 22:46:12 +00:00
Per Modin
6118da2ee2
Fix typo in config.toml (#1006)
Typo in config key `filter_mode_shell_up_key_binding` that's fixed by
this commit, and while at it fix a minor typo in a comment.

Co-authored-by: Per Modin <per@wgtwo.com>
2023-05-24 22:00:01 +00:00
Kjetil Jørgensen
244a501cbb
cwd_filter: much like history_filter, only it applies to cwd (#904)
* cwd_filter: much like history_filter, only it applies to cwd

* appease clippy
2023-05-02 02:55:54 +00:00
cyqsimon
6671f72d1b
Updated client config docs (#839)
* Updated client config docs

- Example `config.toml` now includes all the newest options
- `settings.rs`, `config.toml`, and `config.md` now have uniform option order

* Remove trailing space
2023-04-05 09:32:26 +01:00
Steven Xu
2e79e73af3
feat: add common default keybindings (#719)
* feat: add common default keybindings

* feat: add `WORD_SEPARATORS` to config as `word_chars`, as this is what *Zsh* calls it

* feat: add option for *Emacs* word jumping

* feat: scroll with `PageUp` and `PageDown`, cf #374
2023-03-05 18:49:09 +00:00
Johannes Baiter
5cb43772dc
Add history_filter cfg to exclude commands from history (#515) (#716)
Adds a new `history_filter` setting through which users can specify a
list of regular expressions that match commands that should not be
recorded in the history.
2023-02-14 07:14:05 +00:00
Evan Purkhiser
6ae2abf09f
Remove whitespace in template client config.tom (#697) 2023-02-07 09:10:57 +00:00
Sam Lanning
4768b16b74
Add setting for keeping typed query when exiting (#451)
* Add option for keeping typed query on escape

fixes #422

* chore: Address duplicate if statement blocks
2022-11-06 07:34:14 +00:00
Ellie Huxtable
f03f6e9ad7
Add automatic update checking (#555)
* Add automatic update checking

* Add setting to opt out of update checks

* Document options

* no

* no

* also no

* Make clippy happy

* Update atuin-client/src/settings.rs

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>

* fix features

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2022-10-14 10:59:21 +01:00
xfzv
eadf573670
Add style to config.toml and config.md (#552)
* Add `style` to config.toml

* Add `style` to config.md

* Update atuin-client/config.toml

Co-authored-by: Conrad Ludgate <oon@conradludgate.com>

Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
2022-10-05 12:14:56 +00:00
Frank Hamand
0b9dc6696b
Add fuzzy text search mode (#142) 2021-06-01 08:38:19 +01:00
Ellie Huxtable
d3059af815
Release v0.7.0 (#103)
* Release v0.7.0

- Update all the crate versions
- Update the demo gif
- Write a changelog
- Adjust the title of the search screen (has the old name still)
- Adjust the colours of the quick-jump numbers (sadly invisible on some
  colour schemes as dark grey :/)

* Update README, default config file, docs

* Link usernames

* Trigger release workflow upon release creation, as well as tags
2021-05-10 21:28:07 +01:00
Ellie Huxtable
a21737e2b7
Use cargo workspaces (#37)
* Switch to Cargo workspaces

Breaking things into "client", "server" and "common" makes managing the
codebase much easier!

client - anything running on a user's machine for adding history
server - handles storing/syncing history and running a HTTP server
common - request/response API definitions, common utils, etc

* Update dockerfile
2021-04-20 20:53:07 +00:00