-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Specify cursor behaviour on window focus / unfocus #2316
Comments
This is a pretty good idea. |
Hey we just came to the same conclusion. Good idea, terminal backlog is great for it. 😄 |
This is an option, but you could also highlight/frame/focus the pane with the active cursor. Or, the one that sometimes get's implemented is de-focus the inactive panes (eg increase transparency, reduce contrast in text, etc). I'm not saying cursor-highlight is right or wrong, I'm just saying the range of possible solutions is > changing-shape-fill-colour of cursor. Note that there may be relationship to mouse-behaviours like focus-follows-mouse / click-to-focus etc. |
I completely agree, I just wrote this issue with a suggested solution since I got frustrated after playing around with Windows Terminal and mutliple tabs / windows and constantly getting the vim / emacs / nano / other nox-editor right-click-pastes-into-unfocused-window wrong (not to mention that you have to click twice, once to focus, and once to paste). Ties into #2444 (single click should focus and paste) and #524 (marking text should put text in clipboard) as the mouse as the primary copy-and-paste tool between terminals (which the mouse should do well IMHO, but it should do neither more nor less). |
This pull request adds an appearance configuration object to our settings model and app lib, allowing the control to be rendered differently depending on its state, and then uses it to add support for an "unfocused" appearance that the terminal will use when it's not in focus. To accomplish this, we isolated the appearance-related settings from Profile (into AppearanceConfig) and TerminalSettings (into the IControlAppearance and ICoreAppearance interfaces). A bunch of work was done to make inheritance work. The unfocused appearance inherits from the focused one _for that profile_. This is important: If you define a defaults.unfocusedAppearance, it will apply all of defaults' settings to any leaf profile when a terminal in that profile is out of focus. Specified in #8345 Closes #3062 Closes #2316
🎉This issue was addressed in #8392, which has now been successfully released as Handy links: |
🎉This issue was addressed in #8392, which has now been successfully released as Handy links: |
Description of the new feature/enhancement
Currently I find it hard to find focus, and confusing to pasting text into unfocused terminals, since you cannot change cursor behaviour in unfocused terminals. For example by changing color or opacity (I do not know the feasability of this).
Proposed technical implementation details
(Speculating without looking at actual code for ease of implementation, and images curtesy of Google image search along the lines of "terminal [window] focus") Since I like box cursors, I will provide three examples with box cursors which can be extended to other types of cursors.
An example from Code (possible today, terminal in focus shows unfilled box as cursor, terminal out of focus does not):
An example from Linux (possible today, specifically Kali and Gnome terminal, focused terminal shown filled box while unfocused terminal shows nothing)
Another example from Linux (not possible today, specifically Ubuntu and Tilix terminal emulator, focused terminal shows filled box while unfocused terminal shows unfilled box)
I do not propose that the result should be static, rather that the user can select what the cursor should look like in a focused window and an unfocused window. I.e.:
Of course taking height for #1203 so that the "filledBox" setting becomes more meaningful.
The text was updated successfully, but these errors were encountered: