mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-16 17:40:00 +00:00
Implement 'focus follows mouse' for pane navigation
This commit is contained in:
parent
8ee1d0076b
commit
a98050b1cd
@ -799,6 +799,9 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||||||
const ref = tab.insertIntoContainer(this.viewContainer)
|
const ref = tab.insertIntoContainer(this.viewContainer)
|
||||||
this.viewRefs.set(tab, ref)
|
this.viewRefs.set(tab, ref)
|
||||||
tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'click', () => this.focus(tab))
|
tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'click', () => this.focus(tab))
|
||||||
|
if (this.config.store.terminal.focusFollowsMouse) {
|
||||||
|
tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'mousemove', () => this.focus(tab))
|
||||||
|
}
|
||||||
|
|
||||||
tab.subscribeUntilDestroyed(tab.titleChange$, () => this.updateTitle())
|
tab.subscribeUntilDestroyed(tab.titleChange$, () => this.updateTitle())
|
||||||
tab.subscribeUntilDestroyed(tab.activity$, a => a ? this.displayActivity() : this.clearActivity())
|
tab.subscribeUntilDestroyed(tab.activity$, a => a ? this.displayActivity() : this.clearActivity())
|
||||||
|
@ -20,6 +20,7 @@ terminal:
|
|||||||
showBuiltinProfiles: true
|
showBuiltinProfiles: true
|
||||||
showRecentProfiles: 3
|
showRecentProfiles: 3
|
||||||
paneResizeStep: 0.1
|
paneResizeStep: 0.1
|
||||||
|
focusFollowsMouse: false
|
||||||
hotkeys:
|
hotkeys:
|
||||||
profile:
|
profile:
|
||||||
__nonStructural: true
|
__nonStructural: true
|
||||||
|
@ -319,6 +319,15 @@ h3.mt-4(translate) Panes
|
|||||||
step='0.05'
|
step='0.05'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.form-line()
|
||||||
|
.header
|
||||||
|
.title(translate) Focus follows mouse
|
||||||
|
.description(translate) Moving the mouse over an inactive pane will cause it to activate
|
||||||
|
toggle(
|
||||||
|
[(ngModel)]='config.store.terminal.focusFollowsMouse',
|
||||||
|
(ngModelChange)='config.save(); config.requestRestart()'
|
||||||
|
)
|
||||||
|
|
||||||
h3.mt-4(translate) Hacks
|
h3.mt-4(translate) Hacks
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user