diff options
author | Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> | 2023-02-27 21:27:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-27 21:27:59 +0900 |
commit | dc7515f6c466a1ad2a2c02413845e922328adffb (patch) | |
tree | d9d2ff9d379e3264226ee07aabe43ff80ff74e85 /zellij-utils | |
parent | 02e963fd594d63bf5d81d0d3e47d77a041c69532 (diff) |
fix(kdl): new-tab keybind looks in layout_dir for layouts (#2200)
* fix(themes): missing tokyo-night-dark theme
* fix(kdl): new-tab keybind also looks in layout_dir for layouts
Diffstat (limited to 'zellij-utils')
-rw-r--r-- | zellij-utils/src/kdl/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs index f3c7d9fb5..5e6fe1505 100644 --- a/zellij-utils/src/kdl/mod.rs +++ b/zellij-utils/src/kdl/mod.rs @@ -7,6 +7,7 @@ use crate::input::layout::{Layout, RunPlugin, RunPluginLocation}; use crate::input::options::{Clipboard, OnForceClose, Options}; use crate::input::plugins::{PluginConfig, PluginTag, PluginType, PluginsConfig}; use crate::input::theme::{FrameConfig, Theme, Themes, UiConfig}; +use crate::setup::{find_default_config_dir, get_layout_dir}; use kdl_layout_parser::KdlLayoutParser; use std::collections::HashMap; use std::fs::File; @@ -770,8 +771,12 @@ impl TryFrom<(&KdlNode, &Options)> for Action { .and_then(|c_m| kdl_child_string_value_for_entry(c_m, "name")) .map(|name_string| name_string.to_string()); + let layout_dir = config_options + .layout_dir + .clone() + .or_else(|| get_layout_dir(find_default_config_dir())); let (path_to_raw_layout, raw_layout, swap_layouts) = - Layout::stringified_from_path_or_default(layout.as_ref(), None).map_err( + Layout::stringified_from_path_or_default(layout.as_ref(), layout_dir).map_err( |e| { ConfigError::new_kdl_error( format!("Failed to load layout: {}", e), |