mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-26 03:51:49 +03:00
.
This commit is contained in:
parent
79cd2a3bbb
commit
cc6c5eda9d
@ -110,12 +110,12 @@
|
||||
label.btn.btn-secondary
|
||||
input(
|
||||
type='radio',
|
||||
[value]='"sound"'
|
||||
[value]='"visual"'
|
||||
)
|
||||
| Sound
|
||||
| Visual
|
||||
label.btn.btn-secondary
|
||||
input(
|
||||
type='radio',
|
||||
[value]='"notification"'
|
||||
[value]='"audible"'
|
||||
)
|
||||
| Notification
|
||||
| Audible
|
||||
|
@ -9,3 +9,7 @@ a:hover {
|
||||
* {
|
||||
font-feature-settings: "liga" 0; // disable ligatures (they break monospacing)
|
||||
}
|
||||
|
||||
x-screen {
|
||||
transition: 0.125s ease background;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
flex: auto;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
&> .content {
|
||||
flex: auto;
|
||||
position: relative;
|
||||
|
@ -17,6 +17,7 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
hterm: any
|
||||
configSubscription: Subscription
|
||||
focusedSubscription: Subscription
|
||||
bell$ = new Subject()
|
||||
size$ = new ReplaySubject<ResizeEvent>(1)
|
||||
input$ = new Subject<string>()
|
||||
output$ = new Subject<string>()
|
||||
@ -83,6 +84,17 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
this.displayActivity()
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
this.bell$.subscribe(() => {
|
||||
if (this.config.full().terminal.bell != 'off') {
|
||||
let bg = preferenceManager.get('background-color')
|
||||
preferenceManager.set('background-color', 'rgba(128,128,128,.25)')
|
||||
setTimeout(() => {
|
||||
preferenceManager.set('background-color', bg)
|
||||
}, 125)
|
||||
}
|
||||
// TODO audible
|
||||
})
|
||||
}
|
||||
|
||||
attachHTermHandlers (hterm: any) {
|
||||
@ -121,6 +133,10 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
_onMouse_(event)
|
||||
}
|
||||
|
||||
hterm.ringBell = () => {
|
||||
this.bell$.next()
|
||||
}
|
||||
|
||||
for (let screen of [hterm.primaryScreen_, hterm.alternateScreen_]) {
|
||||
const _insertString = screen.insertString.bind(screen)
|
||||
screen.insertString = (data) => {
|
||||
@ -203,6 +219,7 @@ export class TerminalTabComponent extends BaseTabComponent {
|
||||
this.contentUpdated$.complete()
|
||||
this.alternateScreenActive$.complete()
|
||||
this.mouseEvent$.complete()
|
||||
this.bell$.complete()
|
||||
|
||||
this.session.gracefullyDestroy()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user