atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Input bar at the top if we are in inline mode

Open ellie opened this issue 1 year ago • 4 comments

After merging this, I'm working on configurable UI before v15

The idea there is that we can control much more than just compact etc, and toggle each part of the UI to preference. Including where the input bar is

Thanks @pdecat for most of the work here! Based this off of #808

This does feel kinda weird with the up arrow binding

ellie avatar Apr 11 '23 21:04 ellie

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atuin ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2023 9:49am

vercel[bot] avatar Apr 11 '23 21:04 vercel[bot]

This does feel kinda weird with the up arrow binding

It feels like the exit at most recent behavior is quite biting when trying to get used to the new direction. That probably should be made optional, or require two consecutive presses to actually exit.

I've commented it out to test how it goes:

diff --git a/src/command/client/search/interactive.rs b/src/command/client/search/interactive.rs
index 3e9dd122..a8e15583 100644
--- a/src/command/client/search/interactive.rs
+++ b/src/command/client/search/interactive.rs
@@ -180,18 +180,18 @@ impl State {
                 self.search_mode = self.search_mode.next(settings);
                 self.engine = engines::engine(self.search_mode);
             }
-            KeyCode::Down if self.results_state.selected() == 0 && !invert => {
-                return Some(match settings.exit_mode {
-                    ExitMode::ReturnOriginal => RETURN_ORIGINAL,
-                    ExitMode::ReturnQuery => RETURN_QUERY,
-                })
-            }
-            KeyCode::Up if self.results_state.selected() == 0 && invert => {
-                return Some(match settings.exit_mode {
-                    ExitMode::ReturnOriginal => RETURN_ORIGINAL,
-                    ExitMode::ReturnQuery => RETURN_QUERY,
-                })
-            }
+            // KeyCode::Down if self.results_state.selected() == 0 && !invert => {
+                // return Some(match settings.exit_mode {
+                    // ExitMode::ReturnOriginal => RETURN_ORIGINAL,
+                    // ExitMode::ReturnQuery => RETURN_QUERY,
+                // })
+            // }
+            // KeyCode::Up if self.results_state.selected() == 0 && invert => {
+                // return Some(match settings.exit_mode {
+                    // ExitMode::ReturnOriginal => RETURN_ORIGINAL,
+                    // ExitMode::ReturnQuery => RETURN_QUERY,
+                // })
+            // }
             KeyCode::Down if !invert => {
                 let i = self.results_state.selected().saturating_sub(1);
                 self.results_state.select(i);

I guess the main issue with it is that you cannot tell if you are on the most recent command.

pdecat avatar Apr 12 '23 12:04 pdecat

I'm loving it so far :)

pdecat avatar Apr 12 '23 12:04 pdecat

I'm loving it so far :)

awesome! I'll probably get it merged and gated behind some config soon then

ellie avatar Apr 12 '23 19:04 ellie

I'm using the HEAD build which should include this commit, but when using

atuin search -i --inline-height 10

the search box is still at the bottom

image

Is this expected behavior?

lazywei avatar May 22 '23 17:05 lazywei

Love this change :heart: Thanks for adding it!

lawrencegripper avatar Jun 28 '23 08:06 lawrencegripper