switching to fish

This commit is contained in:
Luddifee 2021-07-27 18:19:57 +02:00
parent b70890f80d
commit 08be905f75
No known key found for this signature in database
GPG Key ID: 21AC8D2CC02D7CCC
4 changed files with 78 additions and 76 deletions

43
.config/fish/config.fish Normal file
View File

@ -0,0 +1,43 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end
function fish_prompt
set ppwd (pwd)
echo -e "\033[0;34m$USER \033[0;33m$ppwd \033[0;31mλ\033[0m "
end
set fish_greeting
alias ls="ls --color=auto"
alias ll="ls -lah"
alias grep="grep --color=auto"
alias egrep="egrep --color=auto"
alias fgrep="fgrep --color=auto"
alias wget="wget -c"
alias pacman="sudo pacman --color=auto"
alias emacs="emacs -nw"
function gc
git add -a
git commit -S -m $argv
end
alias gp="git push"
alias gl="git pull"
alias gcl="git clone"
function gh_gcl
gcl https://github.com/$argv
end
alias rr="curl -s -L http://bit.ly/10hA8iC | bash"
function weather
curl wttr.in/$argv
end

View File

@ -0,0 +1,30 @@
# 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:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
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_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
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:\x1d
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

73
.zshrc
View File

@ -1,73 +0,0 @@
if [[ -r /usr/share/zsh/functions/command-not-found.zsh ]]; then
source /usr/share/zsh/functions/command-not-found.zsh
export PKGFILE_PROMPT_INSTALL_MISSING=1
fi
if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
if [[ -f /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh ]]; then
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
zmodload zsh/terminfo
fi
setopt correct
setopt extendedglob
setopt appendhistory
setopt inc_append_history
setopt histignoredups
autoload -Uz vcs_info
autoload -U compinit colors zcalc
compinit -d
colors
PS1="%F{blue}%n %F{yellow}%~ %F{red}λ %f"
HISTSIZE=10000
HISTFILE="$HOME/.history"
SAVEHIST=$HISTSIZE
alias ls="ls --color=auto"
alias ll="ls -lah"
alias grep="grep --color=auto"
alias egrep="egrep --color=auto"
alias fgrep="fgrep --color=auto"
alias wget="wget -c"
alias pacman="sudo pacman --color auto"
alias emacs="emacs -nw"
function gc() {
git add .
tmp=$(git config user.signingkey)
if [[ ${#tmp} -gt 2 ]] ; then
git commit -S -m "$1"
else
git commit -m "$1"
fi
}
alias gp="git push"
alias gl="git pull"
alias gcl="git clone"
function glcp() {
git pull;
git commit -m "$1";
git push;
}
alias rr="curl -s -L http://bit.ly/10hA8iC | bash"
function weather() { curl "wttr.in/$1"; }
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word

View File

@ -39,14 +39,16 @@ ipkg gnome-keyring
git config --global credential.helper /usr/lib/git-core/git-credential-libsecret
# setup terminal stuff
ipkg zsh
ipkg fish
ipkg kitty
cp $FILEDIR/.zshrc ~
mkdir -p ~/.config/fish
cp -r $FILEDIR/.config/fish/* ~/.config/fish/
mkdir -p ~/.config/kitty
cp $FILEDIR/.config/kitty/kitty.conf ~/.config/kitty/
sudo chsh -s `which zsh` $USER
sudo chsh -s `which fish` $USER
# setup snap support
ipkg snapd