diff --git a/fish_cfg/functions/fish_greeting.fish b/fish_cfg/functions/fish_greeting.fish new file mode 100644 index 0000000..7e3f78b --- /dev/null +++ b/fish_cfg/functions/fish_greeting.fish @@ -0,0 +1,7 @@ +function fish_greeting + neofetch + # + nagios_status + # + echo; echo; cat ~/todo.txt +end diff --git a/fish_cfg/functions/fish_prompt.fish b/fish_cfg/functions/fish_prompt.fish new file mode 100644 index 0000000..7a9b3d3 --- /dev/null +++ b/fish_cfg/functions/fish_prompt.fish @@ -0,0 +1,58 @@ +function fish_prompt --description 'Prompt ausgeben' + set -l last_status $status + if not set -q __fish_git_prompt_show_informative_status + set -g __fish_git_prompt_show_informative_status 1 + end + if not set -q __fish_git_prompt_hide_untrackedfiles + set -g __fish_git_prompt_hide_untrackedfiles 1 + end + if not set -q __fish_git_prompt_color_branch + set -g __fish_git_prompt_color_branch magenta --bold + end + if not set -q __fish_git_prompt_showupstream + set -g __fish_git_prompt_showupstream informative + end + if not set -q __fish_git_prompt_color_dirtystate + set -g __fish_git_prompt_color_dirtystate blue + end + if not set -q __fish_git_prompt_color_stagedstate + set -g __fish_git_prompt_color_stagedstate yellow + end + if not set -q __fish_git_prompt_color_invalidstate + set -g __fish_git_prompt_color_invalidstate red + end + if not set -q __fish_git_prompt_color_untrackedfiles + set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal + end + if not set -q __fish_git_prompt_color_cleanstate + set -g __fish_git_prompt_color_cleanstate green --bold + end + + set -l normal (set_color normal) + set -l status_color (set_color brgreen) + set -l cwd_color (set_color $fish_color_cwd) + set -l vcs_color (set_color brpurple) + set -l prompt_status "" + + # Since we display the prompt on a new line allow the directory names to be longer. + set -q fish_prompt_pwd_dir_length + or set -lx fish_prompt_pwd_dir_length 0 + + # Color the prompt differently when we're root + set -l suffix '❯' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set cwd_color (set_color $fish_color_cwd_root) + end + set suffix '#' + end + + # Color the prompt in red on error + if test $last_status -ne 0 + set status_color (set_color $fish_color_error) + set prompt_status $status_color "[" $last_status "]" $normal + end + + echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status + echo -n -s $status_color $suffix ' ' $normal +end diff --git a/fish_cfg/functions/ll.fish b/fish_cfg/functions/ll.fish new file mode 100644 index 0000000..a0aa870 --- /dev/null +++ b/fish_cfg/functions/ll.fish @@ -0,0 +1,4 @@ +function ll --wraps=ls --wraps='exa -Hlg --git --group-directories-first' --description 'alias ll=ls' + ls $argv + +end diff --git a/fish_cfg/functions/ls.fish b/fish_cfg/functions/ls.fish new file mode 100644 index 0000000..a4610c9 --- /dev/null +++ b/fish_cfg/functions/ls.fish @@ -0,0 +1,4 @@ +function ls --wraps='exa -Hlg --git --group-directories-first' --description 'alias ls=exa -Hlg --git --group-directories-first' + exa -Hlg --git --group-directories-first $argv + +end