Added configuration for fish shell as a lightweight alternative to zsh and oh-my-zsh
This commit is contained in:
parent
c041590a8c
commit
abf2831f62
16
fish/.config/fish/config.fish
Normal file
16
fish/.config/fish/config.fish
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
if [ -z "$DISPLAY" ] && [ (fgconsole) -eq 1 ];
|
||||||
|
startx
|
||||||
|
end
|
||||||
|
|
||||||
|
function q
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
function cl
|
||||||
|
command clear && ls
|
||||||
|
end
|
||||||
|
|
||||||
|
function cat
|
||||||
|
bat --theme=Nord $argv
|
||||||
|
end
|
||||||
|
|
32
fish/.config/fish/fish_variables
Normal file
32
fish/.config/fish/fish_variables
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:3100
|
||||||
|
SETUVAR fish_color_autosuggestion:4c566a
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:81a1c1
|
||||||
|
SETUVAR fish_color_comment:434c5e
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:88c0d0
|
||||||
|
SETUVAR fish_color_error:ebcb8b
|
||||||
|
SETUVAR fish_color_escape:00a6b2
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:00a6b2
|
||||||
|
SETUVAR fish_color_param:eceff4
|
||||||
|
SETUVAR fish_color_quote:999900
|
||||||
|
SETUVAR fish_color_redirection:00afff
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
||||||
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_user_paths:/home/n0x/\x2elocal/bin
|
3
fish/.config/fish/functions/fish_greeting.fish
Normal file
3
fish/.config/fish/functions/fish_greeting.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function fish_greeting -d "What's up, fish?"
|
||||||
|
pfetch
|
||||||
|
end
|
20
fish/.config/fish/functions/fish_prompt.fish
Normal file
20
fish/.config/fish/functions/fish_prompt.fish
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
function fish_prompt --description 'Informative prompt'
|
||||||
|
#Save the return status of the previous command
|
||||||
|
set -l last_pipestatus $pipestatus
|
||||||
|
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
|
||||||
|
|
||||||
|
if functions -q fish_is_root_user; and fish_is_root_user
|
||||||
|
printf '%s@%s %s%s%s# ' $USER (prompt_hostname) (set -q fish_color_cwd_root
|
||||||
|
and set_color $fish_color_cwd_root
|
||||||
|
or set_color $fish_color_cwd) \
|
||||||
|
(prompt_pwd) (set_color normal)
|
||||||
|
else
|
||||||
|
set -l status_color (set_color $fish_color_status)
|
||||||
|
set -l statusb_color (set_color --bold $fish_color_status)
|
||||||
|
set -l pipestatus_string (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
||||||
|
|
||||||
|
printf '[%s] %s%s@%s %s%s %s%s%s \n> ' (date "+%H:%M:%S") (set_color brblue) \
|
||||||
|
$USER (prompt_hostname) (set_color $fish_color_cwd) $PWD $pipestatus_string \
|
||||||
|
(set_color normal)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user