diff --git a/conf.d/25_prompt_theme.fish b/conf.d/25_prompt_theme.fish index 25dfcb8..b676799 100644 --- a/conf.d/25_prompt_theme.fish +++ b/conf.d/25_prompt_theme.fish @@ -1,6 +1,15 @@ # Prompt theme -# Set the theme name. Default: "default" +# To get a list of available themes: +# - Check the theme directories in $__fish_config_dir/themes/ +# - Or use the funtion `fish_list_themes` +# To print the active prompt theme name: +# Use function `fish_theme` + +# Set the theme name. +# Default: "default" +# The theme name must match the theme directory name. set -g FISH_PROMPT_THEME default +# Load theme fish_load_theme $FISH_PROMPT_THEME \ No newline at end of file diff --git a/functions/fish_list_themes.fish b/functions/fish_list_themes.fish new file mode 100644 index 0000000..190bcf6 --- /dev/null +++ b/functions/fish_list_themes.fish @@ -0,0 +1,7 @@ +function fish_list_themes --description "List available prompt themes" + for theme in $__fish_config_dir/themes/* + if test -d $theme + basename $theme + end + end +end \ No newline at end of file diff --git a/functions/fish_theme.fish b/functions/fish_theme.fish new file mode 100644 index 0000000..03b67f0 --- /dev/null +++ b/functions/fish_theme.fish @@ -0,0 +1,3 @@ +function fish_theme --description "Print the active prompt theme" + echo $FISH_PROMPT_THEME +end \ No newline at end of file