Skip to content

Commit

Permalink
macos: teach it about the color schemes path in the .app bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Jan 13, 2020
1 parent bb6251f commit ced85ac
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,18 @@ impl Config {
}
}

if cfg!(unix) {
if cfg!(target_os = "macos") {
if let Ok(exe_name) = std::env::current_exe() {
if let Some(colors_dir) = exe_name
.parent()
.map(|srcdir| srcdir.join("Contents").join("Resources").join("colors"))
{
paths.push(colors_dir);
}
}
} else if cfg!(unix) {
paths.push(PathBuf::from("/usr/share/wezterm/colors"));
}
if cfg!(windows) {
} else if cfg!(windows) {
// See commentary re: portable tools above!
if let Ok(exe_name) = std::env::current_exe() {
if let Some(exe_dir) = exe_name.parent() {
Expand Down

0 comments on commit ced85ac

Please sign in to comment.