add hotkeys to show window and launch terminal

This commit is contained in:
2023-09-09 07:29:57 -07:00
parent c98a065587
commit 5685948608
5 changed files with 69 additions and 1 deletions

View File

@ -10,6 +10,7 @@ use tauri::{
App,
AppHandle,
Manager,
GlobalShortcutManager,
async_runtime as rt,
};
@ -83,6 +84,7 @@ async fn setup(app: &mut App) -> Result<(), Box<dyn Error>> {
let srv = Server::new(conf.listen_addr, conf.listen_port, app.handle()).await?;
config::set_auto_launch(conf.start_on_login)?;
config::register_hotkeys(&conf.hotkeys)?;
// if session is empty, this is probably the first launch, so don't autohide
if !conf.start_minimized || is_first_launch {
app.get_window("main")