mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-19 21:29:52 -07:00
Support notifications via terminal bell (#227)
Co-authored-by: Benjamin Grosse <ste3ls@gmail.com>
This commit is contained in:
parent
db9cb92737
commit
99996e275b
6 changed files with 78 additions and 27 deletions
|
@ -19,7 +19,7 @@ use std::collections::VecDeque;
|
|||
use std::convert::TryFrom;
|
||||
use std::fmt::Display;
|
||||
use std::fs::{create_dir_all, File};
|
||||
use std::io::{stdout, BufWriter, Stdout};
|
||||
use std::io::{stdout, BufWriter, Stdout, Write};
|
||||
use std::ops::DerefMut;
|
||||
use std::process;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
@ -293,6 +293,10 @@ impl Application {
|
|||
let sstate = &mut self.screen;
|
||||
let term = &mut self.terminal;
|
||||
|
||||
if store.application.ring_bell {
|
||||
store.application.ring_bell = term.backend_mut().write_all(&[7]).is_err();
|
||||
}
|
||||
|
||||
if full {
|
||||
term.clear()?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue