-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.merged
158 lines (157 loc) · 6.96 KB
/
.zshrc.merged
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#
}
${aurhelper} -S "${aur[@]}"
# Add wisely, as too many plugins slow down shell startup.
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias c='clear' # clear terminal
alias ...='cd ../..'
alias ..='cd ..'
alias ld='eza -lhD --icons=auto' # long list dirs
alias l='eza -lh --icons=auto' # long list
alias ll='eza -lha --icons=auto --sort=name --group-directories-first' # long list all
alias ls='eza -1 --icons=auto' # short list
alias mkdir='mkdir -p'
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias pa='$aurhelper -Ss' # list availabe package
alias pc='$aurhelper -Sc' # remove unused cache
alias pl='$aurhelper -Qs' # list installed package
alias po='$aurhelper -Qtdq | $aurhelper -Rns -' # remove unused packages, also try > $aurhelper -Qqd | $aurhelper -Rsu --print -
alias ssh='kitten ssh'
alias un='$aurhelper -Rns' # uninstall package
alias up='$aurhelper -Syu' # update system/package/aur
alias vc='code --ozone-platform-hint=wayland --disable-gpu' # gui code editor
# alias zshconfig="mate ~/.zshrc"
# Always mkdir a path (this doesn't inhibit functionality to make a single dir)
arch+=("${pkg}")
# a theme from this variable instead of looking in $ZSH/themes/
aur+=("${pkg}")
aurhelper="paru"
aurhelper="yay"
# Case-sensitive completion must be off. _ and - will be interchangeable.
# CASE_SENSITIVE="true"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# Compilation flags
# COMPLETION_WAITING_DOTS="true"
# confirmations, etc.) must go above this block; everything else may go below.
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Detect the AUR wrapper
# DISABLE_AUTO_TITLE="true"
# DISABLE_LS_COLORS="true"
# DISABLE_MAGIC_FUNCTIONS="true"
# DISABLE_UNTRACKED_FILES_DIRTY="true"
#Display Pokemon
done
done
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
elif pacman -Qi paru &>/dev/null ; then
else
# else
# ENABLE_CORRECTION="true"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Example aliases
# Example format: plugins=(rails git textmate ruby lighthouse)
# export ARCHFLAGS="-arch x86_64"
# export EDITOR='mvim'
# export EDITOR='vim'
# export LANG=en_US.UTF-8
# export MANPATH="/usr/local/man:$MANPATH"
# export PATH=$HOME/bin:/usr/local/bin:$PATH
fi
fi
fi
# fi
fi
# Fixes "Error opening terminal: xterm-kitty" when using the default kitty term to open some programs through ssh
# For a full list of active aliases, run `alias`.
for entry in "${entries[@]}" ; do
for pkg in "${inPkg[@]}"; do
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
function command_not_found_handler {
function in {
# Handy change dir shortcuts
# Helpful aliases
# HIST_STAMPS="mm/dd/yyyy"
# HYPHEN_INSENSITIVE="true"
if [[ ${#arch[@]} -gt 0 ]]; then
if [[ ${#aur[@]} -gt 0 ]]; then
if (( ${#entries[@]} )) ; then
if [[ "$pkg" != "${fields[2]}" ]] ; then
if [[ ! -d $ZSH_CACHE_DIR ]]; then
# if [[ -n $SSH_CONNECTION ]]; then
if pacman -Qi yay &>/dev/null ; then
if pacman -Si "${pkg}" &>/dev/null ; then
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# If set to an empty array, this variable will have no effect.
# If you come from bash you might have to change your $PATH.
# In case a command is not found, try to find the package that has it
# Initialization code that may require console input (password prompts, [y/n]
# List of plugins used
# load a random theme each time oh-my-zsh is loaded, in which case,
local -a arch=()
local -a aur=()
local -a inPkg=("$@")
local entries=( ${(f)"$(/usr/bin/pacman -F --machinereadable -- "/usr/bin/$1")"} )
local fields=( ${(0)entry} )
local pkg
local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m'
mkdir $ZSH_CACHE_DIR
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# much, much faster.
# or set a custom format using the strftime function format specifications,
# Path to powerlevel10k theme
# Path to your oh-my-zsh installation.
pkg="${fields[2]}"
plugins=()
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
plugins=(git)
pokemon-colorscripts --no-title -r 1,3,6
# Preferred editor for local and remote sessions
printf "${bright}$1${reset} may be found in the following packages:\n"
printf "${purple}%s/${bright}%s ${green}%s${reset}\n" "${fields[1]}" "${fields[2]}" "${fields[3]}"
printf ' /%s\n' "${fields[4]}"
printf 'zsh: command not found: %s\n' "$1"
return 127
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# see 'man strftime' for details.
# Set list of themes to pick from when loading at random
# Set name of the theme to load --- if set to "random", it will
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# Setting this variable when ZSH_THEME=random will cause zsh to load
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
source $ZSH/oh-my-zsh.sh
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
# stamp shown in the history command output.
# Standard plugins can be found in $ZSH/plugins/
sudo pacman -S "${arch[@]}"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# to know which specific one was loaded, run: echo $RANDOM_THEME
# Uncomment one of the following lines to change the auto-update behavior
# Uncomment the following line if pasting URLs and other text is messed up.
# Uncomment the following line if you want to change the command execution time
# Uncomment the following line if you want to disable marking untracked files
# Uncomment the following line to change how often to auto-update (in days).
# Uncomment the following line to disable auto-setting terminal title.
# Uncomment the following line to disable colors in ls.
# Uncomment the following line to display red dots whilst waiting for completion.
# Uncomment the following line to enable command auto-correction.
# Uncomment the following line to use case-sensitive completion.
# Uncomment the following line to use hyphen-insensitive completion.
# under VCS as dirty. This makes repository status check for large repositories
# User configuration
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# Which plugins would you like to load?
# Would you like to use another custom folder than $ZSH/custom?
# You can also set it to another string to have that shown instead of the default red dots.
# You can set one of the optional three formats:
# You may need to manually set your language environment
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
# ZSH_CUSTOM=/path/to/new-custom-folder
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
ZSH_THEME="robbyrussell"
ZSH=/usr/share/oh-my-zsh/
# zstyle ':omz:update' frequency 13
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode reminder # just remind me to update when it's time