From a1f249f252f14d784f742fe1481ef40240615b7b Mon Sep 17 00:00:00 2001 From: tom Date: Sun, 6 May 2018 20:16:28 +0100 Subject: [PATCH] added fish configs --- .config/fish/fishd.Falk | 33 ++++++++++ .config/fish/functions/fish_prompt.fish | 81 +++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 .config/fish/fishd.Falk create mode 100644 .config/fish/functions/fish_prompt.fish diff --git a/.config/fish/fishd.Falk b/.config/fish/fishd.Falk new file mode 100644 index 00000000..5fbf8c26 --- /dev/null +++ b/.config/fish/fishd.Falk @@ -0,0 +1,33 @@ +# This file is automatically generated by the fish. +# Do NOT edit it directly, your changes will be overwritten. +SET __fish_classic_git_prompt_initialized:\x1d +SET __fish_init_2_39_8:\x1d +SET __fish_init_2_3_0:\x1d +SET fish_color_autosuggestion:9C9C9C +SET fish_color_cancel:\x2dr +SET fish_color_command:F4F4F4 +SET fish_color_comment:B0B0B0 +SET fish_color_cwd:green +SET fish_color_cwd_root:red +SET fish_color_end:969696 +SET fish_color_error:FFA779 +SET fish_color_escape:bryellow\x1e\x2d\x2dbold +SET fish_color_history_current:\x2d\x2dbold +SET fish_color_host:normal +SET fish_color_match:\x2d\x2dbackground\x3dbrblue +SET fish_color_normal:normal +SET fish_color_operator:bryellow +SET fish_color_param:A0A0F0 +SET fish_color_quote:666A80 +SET fish_color_redirection:FAFAFA +SET fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SET fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SET fish_color_status:red +SET fish_color_user:brgreen +SET fish_color_valid_path:\x2d\x2dunderline +SET fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell +SET fish_key_bindings:fish_default_key_bindings +SET fish_pager_color_completion:\x1d +SET fish_pager_color_description:B3A06D\x1eyellow +SET fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SET fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 00000000..4abddd28 --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,81 @@ +function fish_prompt + and set retc blue + or set retc red + tty | string match -q -r tty + and set tty tty + or set tty pts + + set_color $retc + if [ $tty = tty ] + echo -n .- + else + echo -n '┬─' + end + set_color -o blue + echo -n [ + if test "$USER" = root -o "$USER" = toor + set_color -o red + else + set_color -o red + end + echo -n $USER + set_color -o white + echo -n @ + if [ -z "$SSH_CLIENT" ] + set_color -o blue + else + set_color -o cyan + end + echo -n (prompt_hostname) + set_color -o white + #echo -n :(prompt_pwd) + echo -n :(pwd|sed "s=$HOME=~=") + set_color -o blue + echo -n ']' + set_color normal + set_color $retc + if [ $tty = tty ] + echo -n '-' + else + echo -n '─' + end + set_color -o blue + echo -n '[' + set_color normal + set_color $retc + echo -n (date +%X) + set_color -o blue + echo -n ] + + if type -q acpi + if [ (acpi -a 2> /dev/null | string match -r off) ] + echo -n '─[' + set_color -o red + echo -n (acpi -b|cut -d' ' -f 4-) + set_color -o blue + echo -n ']' + end + end + echo + set_color normal + for job in (jobs) + set_color $retc + if [ $tty = tty ] + echo -n '; ' + else + echo -n '│ ' + end + set_color brown + echo $job + end + set_color normal + set_color $retc + if [ $tty = tty ] + echo -n "'->" + else + echo -n '╰─>' + end + set_color -o red + echo -n '$ ' + set_color normal +end