Merge from titus #3

Merged
jiriks74 merged 14 commits from master into titusupdate 2021-11-14 19:08:52 +01:00
4 changed files with 67 additions and 25 deletions

22
.zshrc

@ -1,12 +1,20 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Dependancies You Need for this Config
# zsh-syntax-highlighting - syntax highlighting for ZSH in standard repos
# autojump - jump to directories with j or jc for child or jo to open in file manager
# zsh-autosuggestions - Suggestions based on your history
# Initial Setup
# mkdir -p "$HOME/zsh/.zsh"
# git submodule add https://github.com/sindresorhus/pure.git "$HOME/zsh/pure"
# touch "$HOME/.cache/zshhistory
# Setup Alias in $HOME/zsh/aliasrc
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
# echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
# Enable colors and change prompt:
autoload -U colors && colors
@ -15,15 +23,11 @@ PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magent
# Custom Variables
EDITOR=vim
# Pure Prompt
fpath+=$HOME/zsh/pure
autoload -U promptinit; promptinit
prompt pure
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zshhistory
setopt appendhistory
# Basic auto/tab complete:
autoload -U compinit
@ -42,3 +46,7 @@ bindkey '^ ' autosuggest-accept
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
source /usr/share/autojump/autojump.zsh 2>/dev/null
source ~/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

@ -1,14 +1,34 @@
# zsh
My ZSH Config
## Setup
```
git clone --recursive https://github.com/ChrisTitusTech/zsh
ln -s -f ~/zsh/.zshrc ~/.zshrc
touch "$HOME/.cache/zshhistory"
#-- Setup Alias in $HOME/zsh/aliasrc
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc
```
## Get Dependencies
- zsh-syntax-highlighting - syntax highlighting for ZSH in standard repos
- autojump - jump to directories with j or jc for child or jo to open in file manager
- zsh-autosuggestions - Suggestions based on your history
### Debian Dependencies
```bash
sudo apt install zsh-syntax-highlighting autojump zsh-autosuggestions
```
### Arch Dependencies
```bash
yay -S zsh-syntax-highlighting autojump zsh-autosuggestions
```
## Get Dependancies
- zsh-syntax-highlighting - syntax highlighting for ZSH in standard repos
- autojump - jump to directories with j or jc for child or jo to open in file manager
- zsh-autosuggestions - Suggestions based on your history
Finish the conversion by changing your user in /etc/passwd to /bin/zsh instead of /bin/bash
or typing `chsh $USER` and entering `/bin/zsh`

37
aliasrc

@ -7,6 +7,7 @@ ex ()
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xJf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
@ -27,18 +28,18 @@ export EDITOR=vim
alias pacman-update='sudo pacman-mirrors --geoip'
alias ls='ls --color=auto'
alias ls='ls'
alias ll='ls -l'
# ls, the common ones I use a lot shortened for rapid fire usage
alias l='ls -lFh --color=auto' #size,show type,human readable
alias la='ls -lAFh --color=auto' #long list,show almost all,show type,human readable
alias lr='ls -tRFh --color=auto' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh --color=auto' #long list,sorted by date,show type,human readable
alias ll='ls -l --color=auto' #long list
alias ldot='ls -ld .* --color=auto'
alias lS='ls -1FSsh --color=auto'
alias lart='ls -1Fcart --color=auto'
alias lrt='ls -1Fcrt --color=auto'
alias l='ls -lFh' #size,show type,human readable
alias la='ls -lAFh' #long list,show almost all,show type,human readable
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
alias ll='ls -l' #long list
alias ldot='ls -ld .*'
alias lS='ls -1FSsh'
alias lart='ls -1Fcart'
alias lrt='ls -1Fcrt'
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
@ -78,4 +79,18 @@ alias vim='vim'
alias vi='vim'
alias gds-start='sudo systemctl start openvpn-client@gds'
alias gds-stop='sudo systemctl stop openvpn-client@gds'
gitpush() {
git add .
git commit -m "$*"
git pull
git push
}
gitupdate() {
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github
ssh -T git@github.com
}
alias gp=gitpush
alias gu=gitupdate
alias lbrynet='/opt/LBRY/resources/static/daemon/lbrynet'
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'

1
pure

@ -1 +0,0 @@
Subproject commit c42bd354943ba4cf2da3ecf493fca4fef0b2722c