From d6be8c60a519d079fe995a4f518864338b318245 Mon Sep 17 00:00:00 2001 From: adamstuck Date: Sun, 5 Dec 2021 13:18:41 +0100 Subject: Revert "Switched from bash to zsh" This reverts commit 47fe2ede669c5a52f0b42273146f41ebed59a9c8. --- .bash_profile | 22 +++++++++++ .bashrc | 87 ++++++++++++++++++++++++++++++++++++++++++ .config/zsh/.zprofile | 17 --------- .config/zsh/.zshrc | 102 -------------------------------------------------- .zshenv | 7 ---- 5 files changed, 109 insertions(+), 126 deletions(-) create mode 100644 .bash_profile create mode 100644 .bashrc delete mode 100644 .config/zsh/.zprofile delete mode 100644 .config/zsh/.zshrc delete mode 100644 .zshenv diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..808aa38 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,22 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +export XDG_CONFIG_HOME=$HOME/.config +export XDG_CACHE_HOME=$HOME/.cache +export XDG_DATA_HOME=$HOME/.local/share +export XDG_STATE_HOME=$HOME/.local/state +export XDG_DATA_DIRS="/usr/local/share:/usr/share" +export XDG_CONFIG_DIRS="/etc/xdg" + +export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority +export HISTFILE="$XDG_STATE_HOME"/bash/history +export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export RANGER_LOAD_DEFAULT_RC=FALSE + +[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx "$XDG_CONFIG_HOME/X11/xinitrc" -- vt1 diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..0e176c5 --- /dev/null +++ b/.bashrc @@ -0,0 +1,87 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=2000 + +shopt -s histappend +shopt -s checkwinsize + +PATH="$HOME/bin:$PATH" +PATH="$HOME/.local/bin:$PATH" +PATH="$HOME/.dotnet/tools:$PATH" +export PATH + +export EDITOR=vim +export VISUAL=vim +export PAGER=most + +source '/usr/share/fzf/key-bindings.bash' +source '/usr/share/fzf/completion.bash' + +alias q='exit' +alias c='clear' +alias h='history' +alias cl='c;l' +alias p='cat' +alias k='kill' +alias null='/dev/null' +alias r='ranger' +alias nf='neofetch' +alias pf='pfetch' + +alias ls='exa' +alias l='exa -1' +alias la='exa -1a' +alias ll='exa -la' +alias lt='exa -T' +alias lh="exa -1dI '.|..' .*" + +alias g='git' +alias gs='git status' +alias lg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" +alias com='git commit' +alias sth='git stash' +alias clone='git clone' +alias u='git add -u' +alias gdf='git diff' +alias gpl='git pull' + +alias config='/usr/bin/git --git-dir=/home/adam/.cfg/ --work-tree=/home/adam' +alias cs='config status' +alias clg="config log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" +alias ccom='config commit' +alias csth='config stash' +alias cu='config add -u' +alias cdf='config diff' +alias cpl='config pull' +alias cvim='GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME vim' + +alias loadbash='source ~/.bashrc' +alias bashrc='vim ~/.bashrc' +alias vimrc='vim ~/.vim/vimrc' +alias nvimrc='cd $XDG_CONFIG_HOME/nvim;nvim .' +alias i3config='vim $XDG_CONFIG_HOME/i3/config' +alias startup='vim $XDG_CONFIG_HOME/i3/init' + +cpy() { readlink -en $1 | xclip -sel clipboard; } + +cd_up() { + case $1 in + *[!0-9]*) + cd $( pwd | sed -r "s|(.*/$1[^/]*/).*|\1|i" ) + ;; + *) + cd $(printf "%0.0s../" $(seq 1 $1)); + ;; + esac +} +alias '..'='cd_up' +alias ghd='cd ~/Documents/github' +alias aau='cd ~/Documents/uni/5\ Semester' +alias pc='ssh -p 2080 192.168.0.151' + +alias luamake=/home/adam/Documents/github/lua-language-server/3rd/luamake/luamake + +eval "$(starship init bash)" diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile deleted file mode 100644 index 7210ca6..0000000 --- a/.config/zsh/.zprofile +++ /dev/null @@ -1,17 +0,0 @@ -export MAKEFLAGS="-j$(nproc)" -export XAUTHORITY=$XDG_RUNTIME_DIR/Xauthority -export HISTFILE=$XDG_STATE_HOME/bash/history -export INPUTRC=$XDG_CONFIG_HOME/readline/inputrc -export PASSWORD_STORE_DIR=$XDG_DATA_HOME/pass -export GTK_RC_FILES=$XDG_CONFIG_HOME/gtk-1.0/gtkrc -export GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc -export RANGER_LOAD_DEFAULT_RC=FALSE -export CARGO_HOME=$XDG_DATA_HOME/cargo -export MPLAYER_HOME=$XDG_CONFIG_HOME/mplayer -export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc -export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages -export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv -export GNUPGHOME="$XDG_DATA_HOME"/gnupg -export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java - -[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx $XDG_CONFIG_HOME/X11/xinitrc -- vt1 diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc deleted file mode 100644 index e2d69ab..0000000 --- a/.config/zsh/.zshrc +++ /dev/null @@ -1,102 +0,0 @@ -HISTFILE=$ZDOTDIR/history -HISTSIZE=1000 -SAVEHIST=5000 -setopt hist_ignore_all_dups -unsetopt beep - -zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' -zstyle ':completion:*' menu select -autoload -Uz compinit -compinit -d $ZDOTDIR/zcompdump-$ZSH_VERSION -setopt COMPLETE_ALIASES - -PATH="$HOME/bin:$PATH" -PATH="$HOME/.local/bin:$PATH" -PATH="$HOME/.dotnet/tools:$PATH" -export PATH - -export EDITOR=vim -export VISUAL=vim -export PAGER=most - -alias q='exit' -alias c='clear' -alias h='history' -alias cl='c;l' -alias p='cat' -alias k='kill' -alias null='/dev/null' -alias r='ranger' -alias nf='neofetch' -alias pf='pfetch' - -alias ls='exa' -alias l='exa -1' -alias la='exa -1a' -alias ll='exa -la' -alias lt='exa -T' -alias lh="exa -1dI '.|..' .*" - -alias g='git' -alias gs='git status' -alias lg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" -alias com='git commit' -alias sth='git stash' -alias clone='git clone' -alias u='git add -u' -alias gdf='git diff' -alias gpl='git pull' - -alias config='/usr/bin/git --git-dir=/home/adam/.cfg/ --work-tree=/home/adam' -alias cs='config status' -alias clg="config log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" -alias ccom='config commit' -alias csth='config stash' -alias cu='config add -u' -alias cdf='config diff' -alias cpl='config pull' -alias cvim='GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME vim' - -alias loadzsh='source $XDG_CONFIG_HOME/zsh/.zshrc' -alias zshrc='vim $XDG_CONFIG_HOME/zsh/.zshrc' -alias vimrc='vim ~/.vim/vimrc' -alias nvimrc='cd $XDG_CONFIG_HOME/nvim;nvim .' -alias i3config='vim $XDG_CONFIG_HOME/i3/config' -alias startup='vim $XDG_CONFIG_HOME/i3/init' - -cpy() { readlink -en $1 | xclip -sel clipboard; } - -cd_up() { - case $1 in - *[!0-9]*) - cd $( pwd | sed -r "s|(.*/$1[^/]*/).*|\1|i" ) - ;; - *) - cd $(printf "%0.0s../" $(seq 1 $1)); - ;; - esac -} -alias '..'='cd_up' -alias ghd='cd ~/Documents/github' -alias aau='cd ~/Documents/uni/5\ Semester' -alias pc='ssh -p 2080 192.168.0.151' - -alias luamake=/home/adam/Documents/github/lua-language-server/3rd/luamake/luamake - -function zvm_config() { - ZVM_VI_INSERT_ESCAPE_BINDKEY=kj -} - -function zvm_after_init() { - source '/usr/share/fzf/key-bindings.zsh' - source '/usr/share/fzf/completion.zsh' - bindkey '^ ' autosuggest-accept - bindkey '\e.' insert-last-word -} - -eval "$(starship init zsh)" - -source '/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh' -source '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' -source '/usr/share/zsh/plugins/zsh-vi-mode/zsh-vi-mode.zsh' -source '/usr/share/autojump/autojump.zsh' diff --git a/.zshenv b/.zshenv deleted file mode 100644 index 06da3ba..0000000 --- a/.zshenv +++ /dev/null @@ -1,7 +0,0 @@ -export XDG_CONFIG_HOME=$HOME/.config -export XDG_CACHE_HOME=$HOME/.cache -export XDG_DATA_HOME=$HOME/.local/share -export XDG_STATE_HOME=$HOME/.local/state -export XDG_DATA_DIRS="/usr/local/share:/usr/share" -export XDG_CONFIG_DIRS="/etc/xdg" -export ZDOTDIR=$XDG_CONFIG_HOME/zsh -- cgit v1.2.3-70-g09d2