aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index c18764d2..e9ff12d5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,12 +24,15 @@ extern crate log;
use std::error::Error;
use std::sync::Arc;
+use std::env;
use alacritty::cli;
use alacritty::config::{self, Config};
use alacritty::display::Display;
use alacritty::event;
use alacritty::event_loop::{self, EventLoop, Msg};
+#[cfg(target_os = "macos")]
+use alacritty::locale;
use alacritty::logging;
use alacritty::sync::FairMutex;
use alacritty::term::{Term};
@@ -41,6 +44,11 @@ fn main() {
let options = cli::Options::load();
let config = load_config(&options);
+ // Switch to home directory
+ env::set_current_dir(env::home_dir().unwrap()).unwrap();
+ #[cfg(target_os = "macos")]
+ locale::set_locale_environment();
+
// Run alacritty
if let Err(err) = run(config, &options) {
die!("Alacritty encountered an unrecoverable error:\n\n\t{}\n", Red(err));