Inspector feedback

Any chance this could be an option? While maybe not that pretty right now, I still think it gives a nice overview. Also, who knows, maybe ratatui will add fancier bar charts…

On another note: The keyboard shortcut Ctrl+o is hard to reach for people who are only able to use one hand to type. It would be nice, if the shortcut were configurable.

@ellie would you accept a PR that switches between the inspector and search with Ctrl+Tab. I think tab is the obvious choice to switch between tabs.

I am not saying I want to replace the Ctrl+O, but rather add the Ctrl+Tab as an additional shortcut so that it can be used as well.

1 Like

This would be awesome !

1 Like

Hmm, for some reason Ctrl+Tab and Ctrl+Shift+Tab don’t work. They don’t fire. Maybe a bug in crossterm. I’ll have to investigate.

It will most likely be moved to atuin stats somewhere. I’ve also been playing around with some graphical options, which are far more flexible.

I don’t think that’s possible, at least not in all terminals. The control sequences wouldn’t come out correctly.

We are severely limited in what we can do, I’m afraid. If we want more flexibility, we have a few options

  1. Have some sort of command prefix, like tmux
  2. Make vim-mode the default and force users to learn Vim
  3. Drop some readline parity

See: Default key binding changes

It’s not possible I’m afraid. Terminals use ANSI escape codes, and more complex key combinations just aren’t there

Some reading: ANSI escape code - Wikipedia

There’s the kitty protocol which provides support for this sort of thing, but support is only there in a small number of terminals: Comprehensive keyboard handling in terminals - kitty

I was able to manage a ctrl+alt+tab (which is ctrl+opt+tab on macos) to work.
I’ll play around a bit more…

While I am a vim user myseld, I still don’t use the vim mode in atuin. I doubt that people would like option number 2 too much.
1 and 3 seem the best options IMO.

If the inspector is removed from the TUI, adding another shortcut for it is rather moot.

However, I was able to get Ctrl+Opt+Tab (Ctrl+Alt+Tab) working. I am not sure why it works, but it does. It works on macOS and on Linux. I can’t test it on Windows, because I don’t have Windows.

But even if this key combination is too weird, Ctrl+z isn’t currently used, so adding that instead is easy. (I know Ctrl+z has another meaning in a shell, but the TUI is not a shell.)

I can’t really add this to the custom custom key bindings issue on github, because it is not a custom keybinding, but an additional hard-coded one.
The “default key binding changes” topic seems to be rather on the theoretical side and specific changes haven’t been discussed, so I am not sure what I shall do with those links.

The plan isn’t to remove the inspector, merely to move the stats from the inspector elsewhere

I’m not entirely sure on the perceived benefit of ctrl-z over ctrl-o? It’s also a bit weird to mix the meanings up, and I can see it having issues on some setups

Because ctrl-z can be used with one hand. ctrl-o is very hard to press with only one hand.

I don’t really get that. You are already doing that. ctrl-o is usually used for opening files. Also, as I mentioned, the atuin TUI is not a shell. there is nothing to mix up.

Btw, I mentioned that ctrl-opt-tab works too. I only asked for an additional shortcut, because ctrl-o is incredible hard to press with one hand.

No. Ctrl-Z has a meaning at the terminal, not the shell. It suspends the foreground processes, no matter it is a cli program (e.g. cat, grep, sed) or a TUI one (e.g. htop, vim, s-tui).

Suspending atuin doesn’t sound very useful, but using Ctrl-Z for other things where its original meaning makes sense doesn’t seem intuitive.

Btw I use F12 for it because it sounds somewhat like the browser devtools.

1 Like

suspending a temp window does not seem intuitive to me. It makes more sense to close it with Esc or Ctrl-C.

You are using F12 for what? Did you patch your own atuin? Anyway, F12 is also not great to press on a mac with only one hand. Somehow the fact that I am pointing out that I am talking about a nice shortcut for using with one hand gets ignored.
Just pray you never lose an arm.

When I search and see something, I may want to run a command first (e.g. I am in the wrong directory, I need to ensure something, or another command reminds me something I need to record).

I usually use tmux though so I just open another shell to do this, but when I ssh into a host and forget to run tmux first, job control is the next easy solution.


The definite solution for these issues is configurable key bindings (that I’m still waiting for).

I think we’ve been talking past each other and still are.

I never said that job control is useless. I said who would think that job control made sense in atuin? If there is no reason to use ctrl-z to background and foreground stuff in atuin, there is no reason to think people wouuld mix up things.

Many apps use Cmd+P to print. Well, not so VS Code and a few other apps. What I am saying is that you reach a limit in shortcuts at one point. It’s not against the law to use ctrl-z for something other than back/foregrounding a job. Yes, it could be confusing, the operative word being “could” though, especially when back/foregrounding doesn’t make sense it this (in atuin’s TUI) context.

I think I will step back from this discussion, because I am apparently unable to make my point.

Well, this might take some time. I was rather thinking of an interim solution

I explained this in the previous paragraph.

I understand that you may feel ctrl-o does not make sense for Atuin, however users are more likely to expect job control in a terminal app to work than they are to expect ctrl-o to open a file in a history search application.

Both @lilydjwg and I are not talking about job control within Atuin, but that users may expect to open Atuin, do something, return to their terminal, and then foreground Atuin once more. I do this workflow with Vim many, many times a day.

I also understand that ctrl-o is difficult to reach with one hand, however we are fairly limited in what we can bind, and optimizing for one-handed usage isn’t really a priority at the moment. If you’d like to discuss some accessiblity needs, I’m happy to open that conversation separately.

For the meantime, you have two options

  1. Maintain a patch with your preferences, like @lilydjwg, if you feel strongly that our keybindings are not for you
  2. Wait until we have custom keybindings

Feel free to DM me, but I’m closing this for now as it’s gotten too heated.

1 Like