diff --git a/conf.d/25_prompt_theme.fish b/conf.d/25_prompt_theme.fish new file mode 100644 index 0000000..6c63cb2 --- /dev/null +++ b/conf.d/25_prompt_theme.fish @@ -0,0 +1,12 @@ +# Prompt theme + +# Change "default" to preferred theme name +set -g FISH_PROMPT_THEME default + +set -l theme_dir ~/.config/fish/themes/$FISH_PROMPT_THEME + +source $theme_dir/prompt.fish + +if test -f $theme_dir/right_prompt.fish + source $theme_dir/right_prompt.fish +end \ No newline at end of file diff --git a/conf.d/31_right_prompt.fish b/conf.d/31_right_prompt.fish deleted file mode 100644 index cac89a0..0000000 --- a/conf.d/31_right_prompt.fish +++ /dev/null @@ -1,2 +0,0 @@ -# Right-side prompt -# Empty for now \ No newline at end of file diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish new file mode 100644 index 0000000..9a4a957 --- /dev/null +++ b/functions/fish_prompt.fish @@ -0,0 +1,3 @@ +function fish_prompt + __fish_theme_prompt +end \ No newline at end of file diff --git a/functions/fish_right_prompt.fish b/functions/fish_right_prompt.fish new file mode 100644 index 0000000..5d388e3 --- /dev/null +++ b/functions/fish_right_prompt.fish @@ -0,0 +1,5 @@ +function fish_right_prompt + if functions -q __fish_theme_right_prompt + __fish_theme_right_prompt + end +end \ No newline at end of file diff --git a/conf.d/30_prompt.fish b/themes/default/prompt.fish similarity index 94% rename from conf.d/30_prompt.fish rename to themes/default/prompt.fish index 194f7a5..10be6c0 100644 --- a/conf.d/30_prompt.fish +++ b/themes/default/prompt.fish @@ -1,6 +1,7 @@ +# Default theme # Shell prompt: Left side -function fish_prompt +function __fish_theme_prompt set -l exit_status $status set -l prompt_symbol set -l user_color