From 7863a4923cb168e48bca218b3c1a8153acb601a7 Mon Sep 17 00:00:00 2001 From: Lars Berger Date: Sat, 3 Feb 2024 16:55:31 +0800 Subject: [PATCH] feat: change config directory --- packages/desktop/src/main.rs | 3 ++- packages/desktop/src/user_config.rs | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/desktop/src/main.rs b/packages/desktop/src/main.rs index 91803b6b..1ca12d26 100644 --- a/packages/desktop/src/main.rs +++ b/packages/desktop/src/main.rs @@ -188,7 +188,7 @@ async fn main() { app_handle .path() .resolve( - format!(".glazer/tmp-{}", window_count), + format!(".glzr/zebar/tmp-{}", window_count), BaseDirectory::Home, ) .context("Unable to get home directory.") @@ -196,6 +196,7 @@ async fn main() { ) .inner_size(500., 500.) .visible_on_all_workspaces(true) + .transparent(true) .decorations(false) .resizable(false) .build() diff --git a/packages/desktop/src/user_config.rs b/packages/desktop/src/user_config.rs index bcf8365f..a325747a 100644 --- a/packages/desktop/src/user_config.rs +++ b/packages/desktop/src/user_config.rs @@ -3,15 +3,14 @@ use std::{fs, io::Read, path::PathBuf}; use anyhow::{Context, Result}; use tauri::{path::BaseDirectory, AppHandle, Manager}; -/// Reads the config file at `/.glazer/zebar.yaml` in the user's home -/// directory. +/// Reads the config file at `~/.glzr/zebar/config.yaml`. pub fn read_file( config_path_override: Option<&str>, app_handle: AppHandle, ) -> Result { let default_config_path = app_handle .path() - .resolve(".glazer/zebar.yaml", BaseDirectory::Home) + .resolve(".glzr/zebar/config.yaml", BaseDirectory::Home) .context("Unable to get home directory.")?; let config_path = match config_path_override { @@ -61,7 +60,7 @@ fn create_from_sample( pub fn open_config_dir(app_handle: AppHandle) -> Result<()> { let config_dir_path = app_handle .path() - .resolve(".glazer", BaseDirectory::Home) + .resolve(".glzr/zebar", BaseDirectory::Home) .context("Unable to get home directory.")?; #[cfg(target_os = "windows")]