Compare commits
6 Commits
desktop/co
...
main
Author | SHA1 | Date |
---|---|---|
Mathis | fee835708f | |
Mathis | 0d4d2de665 | |
LordMathis | 642187d71e | |
LordMathis | 8b5f2bffa8 | |
LordMathis | dcdea6b580 | |
LordMathis | a1200a3534 |
16
.aliases
16
.aliases
|
@ -1,16 +0,0 @@
|
|||
alias mkdir='mkdir -p'
|
||||
|
||||
alias vim='nvim'
|
||||
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
|
||||
alias doco='docker-compose'
|
||||
alias dops='docker ps -a'
|
||||
alias doe='docker exec'
|
||||
alias dol='docker logs -f'
|
||||
|
||||
alias sudo='sudo '
|
||||
|
||||
open () {
|
||||
xdg-open "$@" &>/dev/null
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
alias cat='bat'
|
||||
alias update='yay -Syu'
|
|
@ -1,2 +0,0 @@
|
|||
alias cat='batcat'
|
||||
alias update='sudo apt-get update && sudo apt-get upgrade'
|
|
@ -1,15 +0,0 @@
|
|||
[submodule ".zsh/ohmyzsh"]
|
||||
path = .zsh/ohmyzsh
|
||||
url = https://github.com/ohmyzsh/ohmyzsh.git
|
||||
[submodule ".zsh/zsh-syntax-highlighting"]
|
||||
path = .zsh/zsh-syntax-highlighting
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
[submodule ".zsh/zsh-autosuggestions"]
|
||||
path = .zsh/zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-autosuggestions.git
|
||||
[submodule ".zsh/zsh-completions"]
|
||||
path = .zsh/zsh-completions
|
||||
url = https://github.com/zsh-users/zsh-completions.git
|
||||
[submodule ".zsh/zsh-history-substring-search"]
|
||||
path = .zsh/zsh-history-substring-search
|
||||
url = https://github.com/zsh-users/zsh-history-substring-search
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3fd63fdf01344bb5f5f13a9c33eb0b7a72fe4771
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 828fe2bd3c67123263fc8a8cadebae92e10a2224
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 400e58a87f72ecec14f783fbd29bc6be4ff1641c
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 754cefe0181a7acd42fdcb357a67d0217291ac47
|
106
.zshrc
106
.zshrc
|
@ -1,106 +0,0 @@
|
|||
source $HOME/.aliases
|
||||
|
||||
# Set $PATH
|
||||
export PATH=$HOME/bin:$PATH
|
||||
|
||||
# Set Golang
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
export GOPATH=$HOME/Projects/golang
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
|
||||
# History
|
||||
export HISTFILE=$HOME/.zsh_history
|
||||
export HISTSIZE=15000 # keep 15,000 lines in memory
|
||||
export SAVEHIST=10000 # but save only 10,000 of them
|
||||
export HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=true
|
||||
|
||||
# ohmyzsh cache dir
|
||||
export ZSH_CACHE_DIR=$HOME/.zsh/cache
|
||||
mkdir -p "$ZSH_CACHE_DIR/completions"
|
||||
|
||||
# Editor
|
||||
export EDITOR=nvim
|
||||
export GIT_EDITOR=nvim
|
||||
|
||||
# VTE
|
||||
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
|
||||
source /etc/profile.d/vte.sh
|
||||
fi
|
||||
|
||||
# Distro specific aliases
|
||||
DISTRO=`cat /etc/os-release | grep ^ID= | cut -f2 -d'='`
|
||||
if [ "$DISTRO" = 'arch' ]; then
|
||||
source $HOME/.aliases_arch
|
||||
else
|
||||
source $HOME/.aliases_ubuntu
|
||||
fi
|
||||
|
||||
# Conda
|
||||
__conda_setup="$('/home/matus/bin/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/home/matus/bin/anaconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "/home/matus/bin/anaconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/home/matus/bin/anaconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
|
||||
# Node Version Manager
|
||||
|
||||
lazynvm() {
|
||||
unset -f nvm node npm
|
||||
export NVM_DIR=~/.nvm
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
}
|
||||
|
||||
nvm() {
|
||||
lazynvm
|
||||
nvm $@
|
||||
}
|
||||
|
||||
node() {
|
||||
lazynvm
|
||||
node $@
|
||||
}
|
||||
|
||||
npm() {
|
||||
lazynvm
|
||||
npm $@
|
||||
}
|
||||
|
||||
# Compinit
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# ZSH Plugins
|
||||
|
||||
## Oh My Zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/pip/pip.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/command-not-found/command-not-found.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/docker/_docker
|
||||
source ~/.zsh/ohmyzsh/plugins/docker-compose/docker-compose.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/git/git.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/golang/golang.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/helm/helm.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/jsontools/jsontools.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/kubectl/kubectl.plugin.zsh
|
||||
source ~/.zsh/ohmyzsh/plugins/sudo/sudo.plugin.zsh
|
||||
|
||||
### Prompt Theme
|
||||
source ~/.zsh/ohmyzsh/themes/gentoo.zsh-theme
|
||||
|
||||
## zsh-users
|
||||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source ~/.zsh/zsh-completions/zsh-completions.plugin.zsh
|
||||
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
# Set Prompt
|
||||
setopt promptsubst
|
||||
|
||||
# Bindkeys
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
|
@ -0,0 +1,23 @@
|
|||
# Dotfiles
|
||||
|
||||
My dotfiles. If you want to use them fork or clone the repo. Each branch has specific dotfiles for one of my machines
|
||||
|
||||
## Requirements
|
||||
|
||||
* [git](https://git-scm.com/), [zsh](http://www.zsh.org/) and [bat](https://github.com/sharkdp/bat)
|
||||
|
||||
## Install
|
||||
|
||||
`curl https://git.namesny.com/Mathis/dotfiles/raw/branch/master/install.sh | zsh -s -- <branch name>`
|
||||
|
||||
## Manual install
|
||||
|
||||
* `echo ".dotfiles" >> .gitignore`
|
||||
* `git clone --bare git@git.namesny.com:Mathis/dotfiles.git $HOME/.dotfiles`
|
||||
* `alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`
|
||||
* `config checkout <branch-name>`
|
||||
* `config submodule init`
|
||||
* `config submodule update`
|
||||
* `source .zshrc`
|
||||
|
||||
## [Full Guide](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/)
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Git branch name missing"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo ".dotfiles" >> $HOME/.gitignore
|
||||
git clone --bare https://git.namesny.com/Mathis/dotfiles.git $HOME/.dotfiles
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
config checkout $1
|
||||
config submodule init
|
||||
config submodule update
|
||||
source .zshrc
|
Loading…
Reference in New Issue