Skip to content

Commit

Permalink
feat: change config directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Feb 3, 2024
1 parent 47e1e32 commit 7863a49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/desktop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,15 @@ 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.")
.unwrap(),
)
.inner_size(500., 500.)
.visible_on_all_workspaces(true)
.transparent(true)
.decorations(false)
.resizable(false)
.build()
Expand Down
7 changes: 3 additions & 4 deletions packages/desktop/src/user_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
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 {
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit 7863a49

Please sign in to comment.