From 08be905f75e48fce75663ba6aa8ad1a3612e95ef Mon Sep 17 00:00:00 2001 From: Luddifee Date: Tue, 27 Jul 2021 18:19:57 +0200 Subject: [PATCH] switching to fish --- .config/fish/config.fish | 43 ++++++++++++++++++++++ .config/fish/fish_variables | 30 +++++++++++++++ .zshrc | 73 ------------------------------------- scripts/basic-setup | 8 ++-- 4 files changed, 78 insertions(+), 76 deletions(-) create mode 100644 .config/fish/config.fish create mode 100644 .config/fish/fish_variables delete mode 100644 .zshrc diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..48189ff --- /dev/null +++ b/.config/fish/config.fish @@ -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 + diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..1b4481a --- /dev/null +++ b/.config/fish/fish_variables @@ -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 diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 36fd7e8..0000000 --- a/.zshrc +++ /dev/null @@ -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 - diff --git a/scripts/basic-setup b/scripts/basic-setup index 5733cd7..5f1cfa6 100755 --- a/scripts/basic-setup +++ b/scripts/basic-setup @@ -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