Skip to content

Commit b30fd4c

Browse files
committedMay 5, 2023
add my sh files2
1 parent ce3a6a6 commit b30fd4c

File tree

8 files changed

+197
-23
lines changed

8 files changed

+197
-23
lines changed
 

‎.DS_Store

0 Bytes
Binary file not shown.

‎config.sh ‎install_lang.sh

File renamed without changes.

‎zsh_install.sh ‎install_zsh.sh

File renamed without changes.

‎nvim/.DS_Store

0 Bytes
Binary file not shown.

‎zsh/.zshrc

+50-23
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,54 @@
55
# history
66
HISTFILE=~/.zsh_history
77

8-
# source
9-
plug "$HOME/.config/zsh/aliases.zsh"
10-
plug "$HOME/.config/zsh/exports.zsh"
11-
12-
# plugins
13-
plug "esc/conda-zsh-completion"
14-
plug "zsh-users/zsh-autosuggestions"
15-
plug "hlissner/zsh-autopair"
16-
plug "zap-zsh/supercharge"
17-
plug "zap-zsh/vim"
18-
plug "zap-zsh/zap-prompt"
19-
plug "zap-zsh/fzf"
20-
plug "zap-zsh/exa"
21-
plug "zsh-users/zsh-syntax-highlighting"
22-
23-
# keybinds
24-
bindkey '^ ' autosuggest-accept
25-
26-
export PATH="$HOME/.local/bin":$PATH
27-
28-
if command -v bat &> /dev/null; then
29-
alias cat="bat -pp --theme \"Visual Studio Dark+\""
30-
alias catt="bat --theme \"Visual Studio Dark+\""
8+
9+
# ------------------------------------------------------------------------------------------------
10+
# ------------------------------------zplug-------------------------------------------------------
11+
# ------------------------------------------------------------------------------------------------
12+
13+
if [[ ! -d "${ZPLUG_HOME}" ]]; then
14+
if [[ ! -d ~/.zplug ]]; then
15+
git clone https://github.com/zplug/zplug ~/.zplug
16+
17+
# If we can't get zplug, it'll be a very sobering shell experience. To at
18+
# least complete the sourcing of this file, we'll define an always-false
19+
# returning zplug function.
20+
if [[ $? != 0 ]]; then
21+
function zplug() {
22+
return 1
23+
}
24+
fi
25+
fi
26+
export ZPLUG_HOME=~/.zplug
27+
fi
28+
if [[ -d "${ZPLUG_HOME}" ]]; then
29+
source "${ZPLUG_HOME}/init.zsh"
30+
fi
31+
32+
zplug "$HOME/.config/zsh/aliases.zsh"
33+
zplug "$HOME/.config/zsh/exports.zsh"
34+
35+
zplug 'plugins/git', from:oh-my-zsh, if:'which git'
36+
zplug 'romkatv/powerlevel10k', use:powerlevel10k.zsh-theme
37+
zplug "plugins/vi-mode", from:oh-my-zsh
38+
zplug 'zsh-users/zsh-autosuggestions'
39+
zplug 'zsh-users/zsh-completions', defer:2
40+
zplug 'zsh-users/zsh-history-substring-search'
41+
zplug 'zsh-users/zsh-syntax-highlighting', defer:2
42+
43+
zplug "hlissner/zsh-autopair"
44+
zplug "zap-zsh/supercharge"
45+
zplug "zap-zsh/vim"
46+
zplug "zap-zsh/zap-prompt"
47+
zplug "zap-zsh/fzf"
48+
zplug "zap-zsh/exa"
49+
50+
if ! zplug check; then
51+
zplug install
3152
fi
53+
54+
zplug load
55+
56+
57+
58+

‎zshx/.config/zsh/aliases.zsh

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/bin/sh
2+
alias j='z'
3+
alias f='zi'
4+
alias g='lazygit'
5+
alias zsh-update-plugins="find "$ZDOTDIR/plugins" -type d -exec test -e '{}/.git' ';' -print0 | xargs -I {} -0 git -C {} pull -q"
6+
alias nvimrc='nvim ~/.config/nvim/'
7+
alias yay="paru"
8+
9+
# alias lvim='nvim -u ~/.local/share/lunarvim/lvim/init.lua --cmd "set runtimepath+=~/.local/share/lunarvim/lvim"'
10+
11+
# get fastest mirrors
12+
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
13+
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
14+
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
15+
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
16+
17+
# Remarkable
18+
alias remarkable_ssh='ssh root@10.11.99.1'
19+
alias restream='restream -p'
20+
21+
# Colorize grep output (good for log files)
22+
alias grep='grep --color=auto'
23+
alias egrep='egrep --color=auto'
24+
alias fgrep='fgrep --color=auto'
25+
26+
# confirm before overwriting something
27+
alias cp="cp -i"
28+
alias mv='mv -i'
29+
alias rm='rm -i'
30+
31+
# easier to read disk
32+
alias df='df -h' # human-readable sizes
33+
alias free='free -m' # show sizes in MB
34+
35+
# get top process eating memory
36+
alias psmem='ps auxf | sort -nr -k 4 | head -5'
37+
38+
# get top process eating cpu ##
39+
alias pscpu='ps auxf | sort -nr -k 3 | head -5'
40+
41+
# gpg encryption
42+
# verify signature for isos
43+
alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
44+
# receive the key of a developer
45+
alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
46+
47+
# For when keys break
48+
alias archlinx-fix-keys="sudo pacman-key --init && sudo pacman-key --populate archlinux && sudo pacman-key --refresh-keys"
49+
50+
# systemd
51+
alias mach_list_systemctl="systemctl list-unit-files --state=enabled"
52+
53+
alias mach_java_mode="export SDKMAN_DIR="$HOME/.sdkman" && [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh""
54+
55+
alias m="git checkout master"
56+
alias s="git checkout stable"
57+
58+
if [[ $TERM == "xterm-kitty" ]]; then
59+
alias ssh="kitty +kitten ssh"
60+
fi
61+
62+
case "$(uname -s)" in
63+
64+
Darwin)
65+
# echo 'Mac OS X'
66+
alias ls='ls -G'
67+
;;
68+
69+
Linux)
70+
alias ls='ls --color=auto'
71+
;;
72+
73+
CYGWIN* | MINGW32* | MSYS* | MINGW*)
74+
# echo 'MS Windows'
75+
;;
76+
*)
77+
# echo 'Other OS'
78+
;;
79+
esac

‎zshx/.config/zsh/exports.zsh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
# HISTFILE="$XDG_DATA_HOME"/zsh/history
3+
HISTSIZE=1000000
4+
SAVEHIST=1000000
5+
export EDITOR="nvim"
6+
export TERMINAL="kitty"
7+
export BROWSER="brave"
8+
export PATH="$HOME/.local/bin":$PATH
9+
export MANPAGER='nvim +Man!'
10+
export MANWIDTH=999
11+
export PATH=$HOME/.cargo/bin:$PATH
12+
export PATH=$HOME/.local/share/go/bin:$PATH
13+
export GOPATH=$HOME/.local/share/go
14+
export PATH=$HOME/.fnm:$PATH
15+
export PATH="$HOME/.local/share/neovim/bin":$PATH
16+
export XDG_CURRENT_DESKTOP="Wayland"
17+
#export PATH="$PATH:./node_modules/.bin"
18+
eval "$(fnm env)"
19+
eval "$(zoxide init zsh)"
20+
# eval "`pip completion --zsh`"
21+
22+
23+
# >>> conda initialize >>>
24+
# !! Contents within this block are managed by 'conda init' !!
25+
__conda_setup="$("$HOME/.miniconda/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)"
26+
if [ $? -eq 0 ]; then
27+
eval "$__conda_setup"
28+
else
29+
if [ -f "$HOME/.miniconda/etc/profile.d/conda.sh" ]; then
30+
. "$HOME/.miniconda/etc/profile.d/conda.sh"
31+
else
32+
export PATH="$HOME/.miniconda/bin:$PATH"
33+
fi
34+
fi
35+
unset __conda_setup
36+
# <<< conda initialize <<<
37+

‎zshx/.zshrc

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
3+
4+
5+
# history
6+
HISTFILE=~/.zsh_history
7+
8+
# source
9+
plug "$HOME/.config/zsh/aliases.zsh"
10+
plug "$HOME/.config/zsh/exports.zsh"
11+
12+
# plugins
13+
plug "esc/conda-zsh-completion"
14+
plug "zsh-users/zsh-autosuggestions"
15+
plug "hlissner/zsh-autopair"
16+
plug "zap-zsh/supercharge"
17+
plug "zap-zsh/vim"
18+
plug "zap-zsh/zap-prompt"
19+
plug "zap-zsh/fzf"
20+
plug "zap-zsh/exa"
21+
plug "zsh-users/zsh-syntax-highlighting"
22+
23+
# keybinds
24+
bindkey '^ ' autosuggest-accept
25+
26+
export PATH="$HOME/.local/bin":$PATH
27+
28+
if command -v bat &> /dev/null; then
29+
alias cat="bat -pp --theme \"Visual Studio Dark+\""
30+
alias catt="bat --theme \"Visual Studio Dark+\""
31+
fi

0 commit comments

Comments
 (0)
Please sign in to comment.