Merge branch 'master' of https://github.com/ChrisTitusTech/zsh into ChrisTitusTech-master
This commit is contained in:
commit
6a8ffa0845
4 changed files with 49 additions and 18 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,6 +1,6 @@
|
|||
[submodule "pure"]
|
||||
path = pure
|
||||
url = https://github.com/sindresorhus/pure.git
|
||||
url = https://github.com/sindresorhus/pure
|
||||
[submodule "zsh-autosuggestions"]
|
||||
path = zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-autosuggestions
|
||||
|
|
21
README.md
21
README.md
|
@ -26,30 +26,45 @@ ln -s ~/zsh/zshrc.pure ~/.zsh
|
|||
```
|
||||
|
||||
## Get Dependancies
|
||||
|
||||
### Included in this repository
|
||||
- `zsh-syntax-highlighting` - syntax highlighting for ZSH
|
||||
- `zsh-autosuggestions` - Suggestions based on your history
|
||||
- `powerlevel10k` theme - The the actual theme
|
||||
- `pure` - Pure shell look for zsh
|
||||
|
||||
### Get this from your distribution's repository
|
||||
- Consider security here - autojump is ok on local machine, but I wouldn't recommend deploying it on public server due to some security concerns
|
||||
`autojump` - Jump to directories with j or jc for child or jo to open in file manager
|
||||
- `zsh` - the shell itself
|
||||
### Debian Dependencies
|
||||
```bash
|
||||
sudo apt install autojump zsh
|
||||
```
|
||||
|
||||
### Arch Dependencies
|
||||
```bash
|
||||
yay -S autojump zsh
|
||||
```
|
||||
|
||||
### Recomended for `powerlevel10k`
|
||||
- [`nerd-fonts`](https://github.com/ryanoasis/nerd-fonts "nerd-fonts github page") - I recomend `MesloLGS NF Regular`
|
||||
|
||||
## Set as default
|
||||
To set zsh as default shell for your user, edit `/etc/passwd` (from `/bin/bash` to `/bin/zsh`)
|
||||
|
||||
### There are two ways:
|
||||
#### Running this command:
|
||||
```chsch $USER```
|
||||
|
||||
#### Modifying `/etc/passwd`
|
||||
* Change your user in /etc/passwd to /bin/zsh instead of /bin/bash
|
||||
<details>
|
||||
|
||||
* Find line containing your username
|
||||
* Put your username instead of `user`
|
||||
|
||||
From: `user:x:1000:1000::/home/user:/bin/bash`
|
||||
|
||||
To: `user:x:1000:1000::/home/user:/bin/zsh`
|
||||
</details>
|
||||
|
||||
## What I used
|
||||
My config is based on Chris Titus's config, `powerlevel10k` theme and `pure`
|
||||
|
|
27
aliasrc
27
aliasrc
|
@ -10,7 +10,7 @@ ex ()
|
|||
case $1 in
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.tar.xz) tar -xf ;;
|
||||
*.tar.xz) tar xJf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
|
@ -43,18 +43,18 @@ export EDITOR=nano
|
|||
|
||||
alias pacman-update='sudo reflector -c $country -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist'
|
||||
|
||||
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
|
||||
|
||||
|
@ -91,8 +91,10 @@ alias rm='rm -i'
|
|||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
|
||||
alias wallpaper=/home/jirka/.local/bin/wallpaper
|
||||
alias wallpaper=/home/$USER/.local/bin/wallpaper
|
||||
|
||||
#alias vim='vim'
|
||||
#alias vi='vim'
|
||||
gitpush() {
|
||||
git add .
|
||||
git commit -m "$*"
|
||||
|
@ -106,6 +108,7 @@ gitupdate() {
|
|||
}
|
||||
alias gp=gitpush
|
||||
alias gu=gitupdate
|
||||
|
||||
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
#alias firefox='GTK_USE_PORTAL=1 firefox'
|
||||
alias cls="clear"
|
||||
|
|
17
zshrc.pure
17
zshrc.pure
|
@ -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
|
||||
|
@ -26,6 +34,7 @@ PURE_PROMPT_VICMD_SYMBOL=\<
|
|||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
HISTFILE=~/.cache/zshhistory
|
||||
setopt appendhistory
|
||||
|
||||
# Basic auto/tab complete:
|
||||
autoload -U compinit
|
||||
|
@ -47,3 +56,7 @@ bindkey "^[[3~" delete-char
|
|||
source $HOME/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
||||
source $HOME/zsh/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
|
||||
|
|
Reference in a new issue