This commit is contained in:
Alwin Berger 2024-09-24 10:11:02 +02:00
parent 7c9e6b99ec
commit 9a873a6e8a
6 changed files with 74 additions and 0 deletions

6
.config/fish/config.fish Normal file
View file

@ -0,0 +1,6 @@
set -x PATH $PATH /home/ab/code/cosmocc/bin
umask 0027
#. ~/.nix-profile/etc/profile.d/nix.fish
if status is-interactive
# Commands to run in interactive sessions can go here
end

View file

@ -0,0 +1,37 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3400
SETUVAR _fish_abbr_ga:git\x20add
SETUVAR _fish_abbr_gco:git\x20checkout
SETUVAR _fish_abbr_gps:git\x20push
SETUVAR _fish_abbr_gpu:git\x20push
SETUVAR _fish_abbr_gs:git\x20status
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:a3be8c
SETUVAR fish_color_redirection:b48ead
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_pager_color_selected_background:\x2dr

View file

@ -0,0 +1,4 @@
function dotfiles --wraps='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' --description 'alias dotfiles=/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" $argv
end

View 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

View file

@ -0,0 +1,4 @@
function rsrp --wraps='rsync --recursive --compress --times --human-readable --info=progress2' --description 'alias rsrp=rsync --recursive --compress --times --human-readable --info=progress2'
rsync --recursive --compress --times --human-readable --info=progress2 $argv
end

View file

@ -0,0 +1,3 @@
function vim --wraps=nvim --description 'alias vim nvim'
nvim $argv;
end