-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
88 lines (77 loc) · 2.47 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Created by Zap installer
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
plug "zsh-users/zsh-history-substring-search"
plug "zsh-users/zsh-autosuggestions"
plug "zap-zsh/supercharge"
plug "zsh-users/zsh-syntax-highlighting"
plug "zap-zsh/vim"
plug "zap-zsh/completions"
# export PATH
export PATH=$PATH:/home/raphael/.local/share/bob/nvim-bin
export PATH=$HOME/.cargo/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
# export environment variables
export EDITOR='nvim'
export VISUAL='nvim'
export MANPAGER='nvim +Man!'
# Binds
bindkey '^[[A' history-substring-search-up
bindkey '^[OA' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^[OB' history-substring-search-down
# Shortcuts
alias n="nvim"
alias nz="nvim ~/.zshrc"
alias ne="nix-env"
alias e="yazi"
alias gl="lazygit"
alias zj="zellij"
alias zjs="zellij --session"
alias dlv="yt-dlp -P ~/Videos/ytdlp/ --embed-chapters"
alias dla="yt-dlp -f m4a -P ~/Videos/ytdlp/"
alias ws="watch sensors"
alias ff="fastfetch"
# One liners
alias fn='nvim $(fzf --preview "bat --color=always --style=numbers --line-range=:500 {}" )'
alias fcd='z $(fdfind . -td | fzf) && eza --icons'
alias zjr='zellij attach "$(zellij ls | sed '\''s/\x1b\[[0-9;]*m//g'\'' | awk '\''{print $1}'\'' | fzf)"'
# Remaps
alias cat="bat"
alias cd="z"
alias l="eza -l --icons"
alias ls="eza --icons"
alias la="eza -la --icons"
alias t="erd -y inverted -H"
alias ta="erd -y inverted -H -. --no-git"
alias grep="rg"
# Folder navigation
alias cdn="z ~/.config/nvim/ && eza --icons"
alias cdl="z ~/Lab && eza --icons"
alias cdg="z ~/Lab/Git/ && eza --icons"
alias cdd="z ~/Dev/dotfiles/ && eza --icons"
alias cdy="z ~/Downloads/ytdlp && eza --icons"
alias cdo="z ~/Documents/'Obsidian Vault'/"
# Load and initialise completion system
autoload -Uz compinit
compinit
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"
eval "$(atuin init zsh)"
# if [[ -z "$ZELLIJ" ]]; then
#
# choice=$(printf "resurrect_session\nhome_session\n.config_session\nroot_session" | fzf --prompt="Choose a command: ")
#
# if [[ "$choice" == "home_session" ]]; then
# fcd && zellij
# elif [[ "$choice" == "resurrect_session" ]]; then
# zjr
# elif [[ "$choice" == ".config_session" ]]; then
# cd ~/.config && fcd && zellij
# elif [[ "$choice" == "root_session" ]]; then
# cd / && fcd && zellij
# else
# echo "No valid selection made."
# fi
# fi
#
fastfetch