aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorTheodore Dubois <tblodt@icloud.com>2017-12-13 09:52:36 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-12-13 09:52:36 -0800
commit94caa7667da2baba3c762e661a84a806d2212731 (patch)
tree9678b17fceaf65d402e180c9a087f7dfe215fb46 /src/main.rs
parent9bdac6b50aa911cd8f94624a1084a1ba35be6ed4 (diff)
downloadalacritty-94caa7667da2baba3c762e661a84a806d2212731.tar.gz
alacritty-94caa7667da2baba3c762e661a84a806d2212731.zip
Remove the launcher and set the locale/current directory in alacritty (#879)
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));