nyxt
nyxt copied to clipboard
Customizable Prompt Buffer Placement (Top/Bottom)
Is your feature request related to a problem? Please describe.
I've moved the status buffer to the top position using the window.status-buffer-position
slot. I want a similar slot which allows for moving the prompt buffer into an equivalent "top" position.
I want this new functionality because I dislike the way the prompt buffer currently obscures element hints which would appear near the bottom of the window. I'd rather the prompt buffer instead appear at the top because my workflow is not as negatively affected when element hints near the top are obscured. I also just happen to think that the UI flows better when both the status buffer & prompt buffer are spacially grouped together (currently only possible using bottom status buffer placement)
Describe the solution you'd like
The new slot should shift the layout order of prompt-buffer-container
within root-box-layout
in a way similar to window.status-buffer-position
(see referenced code below). More specifically: the prompt buffer should render directly below where the "top" position of the status buffer is currently.
https://github.com/atlas-engineer/nyxt/blob/3f5d1bdada48296182c14966ad07994b972e65db/source/renderer/gtk.lisp#L483-L484
Describe alternatives you've considered I tried to manually reorder the root layout to suit my own needs, but I couldn't seem to figure it out. The only thing I managed was causing the UI to momentarily flicker:
(let ((window (current-window)))
(gtk:gtk-box-reorder-child
(nyxt/renderer/gtk::root-box-layout window)
(nyxt/renderer/gtk::prompt-buffer-container window)
1))
Additional context
Naming of this slot may be tricky due to the fact that window.status-buffer-position
will be renamed to status-buffer.placement
in v4. On the one hand, you might name the slot prompt-buffer.placement
since that's evidently now a more correct naming scheme. On the other hand, you might name the slot window.prompt-buffer-position
for the sake of parity and only rename it later on at the same time as window.status-buffer-position
.