Merge branch 'titusupdate'
This commit is contained in:
commit
dc4dd64cdd
4 changed files with 56 additions and 23 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,6 +1,6 @@
|
||||||
[submodule "pure"]
|
[submodule "pure"]
|
||||||
path = pure
|
path = pure
|
||||||
url = https://github.com/sindresorhus/pure.git
|
url = https://github.com/sindresorhus/pure
|
||||||
[submodule "zsh-autosuggestions"]
|
[submodule "zsh-autosuggestions"]
|
||||||
path = zsh-autosuggestions
|
path = zsh-autosuggestions
|
||||||
url = https://github.com/zsh-users/zsh-autosuggestions
|
url = https://github.com/zsh-users/zsh-autosuggestions
|
||||||
|
|
33
README.md
33
README.md
|
@ -26,33 +26,50 @@ ln -s ~/zsh/zshrc.pure ~/.zsh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get Dependancies
|
## Get Dependancies
|
||||||
|
|
||||||
### Included in this repository
|
### Included in this repository
|
||||||
- `zsh-syntax-highlighting` - syntax highlighting for ZSH
|
- `zsh-syntax-highlighting` - syntax highlighting for ZSH
|
||||||
- `zsh-autosuggestions` - Suggestions based on your history
|
- `zsh-autosuggestions` - Suggestions based on your history
|
||||||
- `powerlevel10k` theme - The the actual theme
|
- `powerlevel10k` theme - The the actual theme
|
||||||
- `pure` - Pure shell look for zsh
|
- `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
|
### Get this from your distribution's repository
|
||||||
- `zsh` - the shell itself
|
### Debian Dependencies
|
||||||
|
```
|
||||||
|
sudo apt install autojump zsh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arch Dependencies
|
||||||
|
```
|
||||||
|
yay -S autojump zsh
|
||||||
|
```
|
||||||
|
|
||||||
### Recomended for `powerlevel10k`
|
### Recomended for `powerlevel10k`
|
||||||
- [`nerd-fonts`](https://github.com/ryanoasis/nerd-fonts "nerd-fonts github page") - I recomend `MesloLGS NF Regular`
|
- [`nerd-fonts`](https://github.com/ryanoasis/nerd-fonts "nerd-fonts github page") - I recomend `MesloLGS NF Regular`
|
||||||
|
|
||||||
## Set as default
|
## Set as default
|
||||||
To set zsh as default shell for your user, edit `/etc/passwd` (from `/bin/bash` to `/bin/zsh`)
|
To set zsh as default shell for your user, edit `/etc/passwd` (from `/bin/bash` to `/bin/zsh`)
|
||||||
|
|
||||||
### There are two ways:
|
### There are two ways:
|
||||||
#### Running this command:
|
#### Running this command:
|
||||||
|
<<<<<<< HEAD
|
||||||
|
```chsch $USER```
|
||||||
|
|
||||||
|
=======
|
||||||
- ```chsch $USER```
|
- ```chsch $USER```
|
||||||
- Input your password
|
- Input your password
|
||||||
- Input `/bin/zsh`
|
- Input `/bin/zsh`
|
||||||
|
>>>>>>> master
|
||||||
#### Modifying `/etc/passwd`
|
#### Modifying `/etc/passwd`
|
||||||
|
* Change your user in `/etc/passwd` to `/bin/zsh` instead of `/bin/bash`
|
||||||
|
<details>
|
||||||
|
|
||||||
* Find line containing your username
|
* Find line containing your username
|
||||||
* Put your username instead of `user`
|
* Change the end of the line
|
||||||
|
From: ...`:/bin/bash`
|
||||||
|
|
||||||
From: `user:x:1000:1000::/home/user:/bin/bash`
|
To: ...`:/bin/zsh`
|
||||||
|
</details>
|
||||||
To: `user:x:1000:1000::/home/user:/bin/zsh`
|
|
||||||
|
|
||||||
## What I used
|
## What I used
|
||||||
My config is based on Chris Titus's config, `powerlevel10k` theme and `pure`
|
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
|
case $1 in
|
||||||
*.tar.bz2) tar xjf $1 ;;
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
*.tar.gz) tar xzf $1 ;;
|
*.tar.gz) tar xzf $1 ;;
|
||||||
*.tar.xz) tar -xf ;;
|
*.tar.xz) tar xJf $1 ;;
|
||||||
*.bz2) bunzip2 $1 ;;
|
*.bz2) bunzip2 $1 ;;
|
||||||
*.rar) unrar x $1 ;;
|
*.rar) unrar x $1 ;;
|
||||||
*.gz) gunzip $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 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'
|
alias ll='ls -l'
|
||||||
# ls, the common ones I use a lot shortened for rapid fire usage
|
# 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 l='ls -lFh' #size,show type,human readable
|
||||||
alias la='ls -lAFh --color=auto' #long list,show almost all,show type,human readable
|
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
||||||
alias lr='ls -tRFh --color=auto' #sorted by date,recursive,show type,human readable
|
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
|
||||||
alias lt='ls -ltFh --color=auto' #long list,sorted by date,show type,human readable
|
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
|
||||||
alias ll='ls -l --color=auto' #long list
|
alias ll='ls -l' #long list
|
||||||
alias ldot='ls -ld .* --color=auto'
|
alias ldot='ls -ld .*'
|
||||||
alias lS='ls -1FSsh --color=auto'
|
alias lS='ls -1FSsh'
|
||||||
alias lart='ls -1Fcart --color=auto'
|
alias lart='ls -1Fcart'
|
||||||
alias lrt='ls -1Fcrt --color=auto'
|
alias lrt='ls -1Fcrt'
|
||||||
|
|
||||||
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
|
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
|
||||||
|
|
||||||
|
@ -91,8 +91,10 @@ alias rm='rm -i'
|
||||||
alias cp='cp -i'
|
alias cp='cp -i'
|
||||||
alias mv='mv -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() {
|
gitpush() {
|
||||||
git add .
|
git add .
|
||||||
git commit -m "$*"
|
git commit -m "$*"
|
||||||
|
@ -106,6 +108,7 @@ gitupdate() {
|
||||||
}
|
}
|
||||||
alias gp=gitpush
|
alias gp=gitpush
|
||||||
alias gu=gitupdate
|
alias gu=gitupdate
|
||||||
|
|
||||||
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|
||||||
#alias firefox='GTK_USE_PORTAL=1 firefox'
|
#alias firefox='GTK_USE_PORTAL=1 firefox'
|
||||||
alias cls="clear"
|
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
|
# Dependancies You Need for this Config
|
||||||
# zsh-syntax-highlighting - syntax highlighting for ZSH in standard repos
|
# 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
|
# autojump - jump to directories with j or jc for child or jo to open in file manager
|
||||||
# zsh-autosuggestions - Suggestions based on your history
|
# zsh-autosuggestions - Suggestions based on your history
|
||||||
|
|
||||||
# Initial Setup
|
# Initial Setup
|
||||||
# mkdir -p "$HOME/zsh/.zsh"
|
# touch "$HOME/.cache/zshhistory
|
||||||
# git submodule add https://github.com/sindresorhus/pure.git "$HOME/zsh/pure"
|
|
||||||
# Setup Alias in $HOME/zsh/aliasrc
|
# 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:
|
# Enable colors and change prompt:
|
||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
|
@ -26,6 +34,7 @@ PURE_PROMPT_VICMD_SYMBOL=\<
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
SAVEHIST=10000
|
SAVEHIST=10000
|
||||||
HISTFILE=~/.cache/zshhistory
|
HISTFILE=~/.cache/zshhistory
|
||||||
|
setopt appendhistory
|
||||||
|
|
||||||
# Basic auto/tab complete:
|
# Basic auto/tab complete:
|
||||||
autoload -U compinit
|
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-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
||||||
source $HOME/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.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 /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