Commit c8337b65 authored by Benedict Lee's avatar Benedict Lee Committed by Derek W. Stavis

Enable conf.d loading for themes (#713)

Loading of conf.d files for the current theme is done after all other initialisation to ensure that everything the files need is loaded.
parent affb0b14
......@@ -48,4 +48,9 @@ end
emit perf:timer:start "Oh My Fish init user config path"
require --no-bundle --path $OMF_CONFIG
emit perf:timer:finish "Oh My Fish init user config path"
# Load conf.d for current theme if exists
set -l theme_conf_path {$OMF_CONFIG,$OMF_PATH}/themes*/$theme/conf.d
for conf in $theme_conf_path/*.fish
source $conf
end
emit perf:timer:finish "Oh My Fish initialisation"
......@@ -37,6 +37,11 @@ function omf.theme.set -a target_theme
and test -e $OMF_CONFIG/key_bindings.fish -o -e $OMF_PATH/key_bindings.fish
and __fish_reload_key_bindings
# Load target theme's conf.d files
for conf in {$OMF_CONFIG,$OMF_PATH}/themes/$target_theme/conf.d/*.fish
source $conf
end
# Persist the changes
echo "$target_theme" > "$OMF_CONFIG/theme"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment