Last active
July 8, 2021 05:05
-
-
Save kiselev-nikolay/156e7686c3a0e9020576d86602616165 to your computer and use it in GitHub Desktop.
Fish config which I put on my servers. Beautiful and requires nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Functions | |
# | |
function i | |
hostname -I | cut -d " " -f 1 | |
end | |
function ut | |
sudo sh -c "timedatectl set-timezone Europe/Moscow && /usr/sbin/ntpdate pool.ntp.org" | |
end | |
function ll | |
ls -alah | |
end | |
function fuck | |
git update-index --assume-unchanged | |
end | |
function unfuck | |
git update-index --no-assume-unchanged | |
end | |
# | |
# Fish-related | |
# | |
function fish_greeting | |
end | |
function fish_prompt -d "Write out the prompt" | |
set laststatus $status | |
printf '%s%s@%s%s ' (set_color green) $USER (i) (set_color normal) | |
printf '%s%s%s ' (set_color blue) (prompt_pwd) (set_color normal) | |
if test -d .git | |
printf '%s %s%s ' (set_color magenta) (git rev-parse --symbolic-full-name @{upstream} | cut -d "/" -f 3,4 2> /dev/null) (set_color normal) | |
end | |
printf '%s%s%s\n' (set_color normal) (date +"%T") (set_color normal) | |
if test $laststatus -eq 0 | |
printf '%s%s%s ' (set_color blue) (set_color normal) | |
else | |
printf '%s%s%s ' (set_color red) (set_color normal) | |
end | |
printf '%s%s%s ' (set_color normal) (set_color normal) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file contains fish universal variable definitions. | |
# VERSION: 3.0 | |
SETUVAR __fish_initialized:3100 | |
SETUVAR fish_color_autosuggestion:555\x1ebrblack | |
SETUVAR fish_color_cancel:\x2dr | |
SETUVAR fish_color_command:white | |
SETUVAR fish_color_comment:brblack | |
SETUVAR fish_color_cwd:green | |
SETUVAR fish_color_cwd_root:red | |
SETUVAR fish_color_end:cyan | |
SETUVAR fish_color_error:white | |
SETUVAR fish_color_escape:cyan | |
SETUVAR fish_color_history_current:\x2d\x2dbold | |
SETUVAR fish_color_host:normal | |
SETUVAR fish_color_host_remote:yellow | |
SETUVAR fish_color_normal:normal | |
SETUVAR fish_color_operator:cyan | |
SETUVAR fish_color_param:blue | |
SETUVAR fish_color_quote:green | |
SETUVAR fish_color_redirection:blue | |
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:\x1d | |
SETUVAR fish_pager_color_description:B3A06D\x1eyellow | |
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline | |
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan |
Author
kiselev-nikolay
commented
Jun 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment