Fetch avatar and logs from current_dir instead of static path
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
4eccb02c19
commit
48c4e7b4a7
1 changed files with 3 additions and 2 deletions
|
@ -191,9 +191,10 @@ async fn do_main() -> io::Result<()> {
|
|||
.queue(terminal::DisableLineWrap)?
|
||||
.queue(crossterm::event::EnableBracketedPaste)?
|
||||
.queue(terminal::Clear(terminal::ClearType::All))?;
|
||||
let image = image::open("/home/linkmauve/avatar.png").unwrap();
|
||||
let current_dir = std::env::current_dir()?;
|
||||
let image = image::open(current_dir.join("avatar.png")).unwrap();
|
||||
render_image(image, 16, 16)?;
|
||||
let mut file = std::fs::File::open("/home/linkmauve/logs.log")?;
|
||||
let mut file = std::fs::File::open(current_dir.join("logs.log"))?;
|
||||
let mut data = String::new();
|
||||
file.read_to_string(&mut data)?;
|
||||
let logs = logger::parse_logs(&data).unwrap().1;
|
||||
|
|
Loading…
Reference in a new issue