Skip to content

Dim the minibuffer? #33

@mentalisttraceur

Description

@mentalisttraceur

I sometimes select another window while the minibuffer remains "in use", and it would be nice if the minibuffer itself got dimmed like other windows in those cases.

Compare these two cases:

  1. It is immediately obvious (once you know that black background is active and gray background is dimmed) from just an imprecise glance at either of the windows or the minibuffer if they are active or not:

    Screenshot from 2023-06-01 21-50-48

  2. It is not immediately obvious from an imprecise glance if the minibuffer is active or if the right window is active:

    Screenshot from 2023-06-01 21-50-57

    (Note: this is not due to the (setq auto-dim-other-buffers-dim-on-switch-to-minibuffer nil) line visible in these screenshots - that line was not in effect at the time that I took these screenshots, so auto-dim-other-buffers-dim-on-switch-to-minibuffer was set to t, and in fact it was the right window which was selected, not the minibuffer.)

In fact, in the first picture, we actually can't know from the available visual information if the minibuffer was active - for example, there might be a non-dimmed window in a frame on another monitor.

One example where this comes up: I might be in the middle of writing an M-: line, and then realize I already have some text I want to just reference or copy in a buffer I have open: so I use ace-window (I think plain other-window would work too) to leave the minibuffer, do soomething, and come back.

Another example:

  1. consult-line to find text I I want to copy from elsewhere in the file (or consult-ripgrep if that text is in another file),
  2. "select' the desired match in the minibuffer (this scrolls the main buffer to center that line in that buffer/file) but don't hit RET in the minuffer
  3. switch to the window from the minibuffer (I use ace-window, but I think C-x o/other-window would work) - this leaves the consult function unfinished in the minibuffer, and I can select/edit/copy text in the main buffer which is still "previewing" where the consult search would jump to, and finally
    6.switch back to the minibuffer "window", and abort (C-g), which scrolls the main buffer back to where I was when I started the consult search, so I can paste/etc - so obviously this is faster and less manual hassle than if I had to "finish" the consult search, and then navigate back to where I started.

(That second example can be replaced by getting fluent with the mark/jump ring stuff since then I wouldn't need to leave the minibuffer mid-command, but the first one can't, and the point is that this is a very broadly applicable thing - now that I have good keybinds for jumping out of the minibuffer while it's mid-command and then jumping back into it, I find all sorts of situations where that's enough to improve my workflow without me having to learn/configure anything else.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions