Compare commits
No commits in common. "0454fc29ba0b4bd0a68b5067fc97b93f0ae4f610" and "f6a13be619d9585135757f182cae1b29570c4dbd" have entirely different histories.
0454fc29ba
...
f6a13be619
17 changed files with 128 additions and 320 deletions
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
cp -r $(pwd)/home/.config ~
|
|
|
@ -1,13 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
|
rm -rf ~/.zsh-very-old
|
||||||
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
|
mv ~/.zsh-old ~/.zsh-very-old
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
mv ~/.zsh ~/.zsh-old
|
||||||
|
|
||||||
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
|
rm -rf ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
|
mv ~/.zshrc-old ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
|
mv ~/.zshrc ~/.zshrc-old
|
||||||
|
|
||||||
cp -r $(pwd)/home/.gitconfig ~
|
cp -r $(pwd)/home/.gitconfig ~
|
||||||
cp -r $(pwd)/home/.p10k.zsh ~
|
cp -r $(pwd)/home/.p10k.zsh ~
|
||||||
|
@ -17,7 +16,12 @@ cp -r $(pwd)/home/.vimrc ~
|
||||||
cp -r $(pwd)/home/.local ~
|
cp -r $(pwd)/home/.local ~
|
||||||
cp -r $(pwd)/home/.config ~
|
cp -r $(pwd)/home/.config ~
|
||||||
cp -r $(pwd)/home/.tmux.conf ~
|
cp -r $(pwd)/home/.tmux.conf ~
|
||||||
|
|
||||||
touch ~/.local.zsh
|
touch ~/.local.zsh
|
||||||
|
|
||||||
ln ~/.zsh/zshrc ~/.zshrc
|
ln ~/.zsh/zshrc ~/.zshrc
|
||||||
|
|
||||||
|
# Install Vim Stuff
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
|
rm -rf ~/.zsh-very-old
|
||||||
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
|
mv ~/.zsh-old ~/.zsh-very-old
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
mv ~/.zsh ~/.zsh-old
|
||||||
|
|
||||||
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
|
rm -rf ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
|
mv ~/.zshrc-old ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
|
mv ~/.zshrc ~/.zshrc-old
|
||||||
|
|
||||||
cp -r $(pwd)/home/.gitconfig ~
|
cp -r $(pwd)/home/.gitconfig ~
|
||||||
cp -r $(pwd)/home/.p10k.zsh ~
|
cp -r $(pwd)/home/.p10k.zsh ~
|
||||||
|
@ -18,3 +18,9 @@ cp -r $(pwd)/home/.tmux.conf ~
|
||||||
touch ~/.local.zsh
|
touch ~/.local.zsh
|
||||||
|
|
||||||
ln ~/.zsh-distrobox/zshrc ~/.zshrc
|
ln ~/.zsh-distrobox/zshrc ~/.zshrc
|
||||||
|
|
||||||
|
# Install Vim Stuff
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
|
|
@ -19,8 +19,7 @@ set cursorline " highlight current cursorline
|
||||||
set ttyfast " Speed up scrolling in Vim
|
set ttyfast " Speed up scrolling in Vim
|
||||||
set fdm=indent " foldingmethod syntax
|
set fdm=indent " foldingmethod syntax
|
||||||
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
|
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
|
||||||
set numberwidth=4
|
"set spell " enable spell check (may need to download language package)
|
||||||
set spell " enable spell check (may need to download language package)
|
|
||||||
set timeout timeoutlen=400
|
set timeout timeoutlen=400
|
||||||
set ttimeoutlen=0
|
set ttimeoutlen=0
|
||||||
|
|
||||||
|
@ -41,8 +40,6 @@ noremap OO O<ESC>
|
||||||
" H and L for end and beginning
|
" H and L for end and beginning
|
||||||
nmap H ^
|
nmap H ^
|
||||||
nmap L $
|
nmap L $
|
||||||
vmap H ^
|
|
||||||
vmap L $
|
|
||||||
|
|
||||||
" usefull functions for arrow keys
|
" usefull functions for arrow keys
|
||||||
" (and force the user to use hjkl)
|
" (and force the user to use hjkl)
|
||||||
|
@ -98,3 +95,6 @@ nnoremap <C-Left> :vertical resize +1<CR>
|
||||||
nnoremap <C-Right> :vertical resize -1<CR>
|
nnoremap <C-Right> :vertical resize -1<CR>
|
||||||
nnoremap <C-Up> :resize -1<CR>
|
nnoremap <C-Up> :resize -1<CR>
|
||||||
nnoremap <C-Down> :resize +1<CR>
|
nnoremap <C-Down> :resize +1<CR>
|
||||||
|
|
||||||
|
" remove extra gutter width for line numbers
|
||||||
|
set numberwidth=5
|
||||||
|
|
|
@ -34,9 +34,6 @@ runtime nvim-table-mode.vim
|
||||||
" load tabbar
|
" load tabbar
|
||||||
runtime tagbar.vim
|
runtime tagbar.vim
|
||||||
|
|
||||||
" load suda
|
|
||||||
runtime suda.vim
|
|
||||||
|
|
||||||
" load ALE (another language server or something that works with COC)
|
" load ALE (another language server or something that works with COC)
|
||||||
"runtime ale.vim
|
"runtime ale.vim
|
||||||
|
|
||||||
|
@ -89,10 +86,10 @@ nnoremap <silent> <A-c> <Cmd>BufferClose<CR>
|
||||||
" Magic buffer-picking mode
|
" Magic buffer-picking mode
|
||||||
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
|
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
|
||||||
" Sort automatically by..."
|
" Sort automatically by..."
|
||||||
nnoremap <silent> <leader>bb <Cmd>BufferOrderByBufferNumber<CR>
|
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
|
||||||
nnoremap <silent> <leader>bd <Cmd>BufferOrderByDirectory<CR>
|
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
|
||||||
nnoremap <silent> <leader>bl <Cmd>BufferOrderByLanguage<CR>
|
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
|
||||||
nnoremap <silent> <leader>bw <Cmd>BufferOrderByWindowNumber<CR>
|
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
|
||||||
|
|
||||||
" Other:
|
" Other:
|
||||||
" :BarbarEnable - enables barbar (enabled by default)
|
" :BarbarEnable - enables barbar (enabled by default)
|
||||||
|
|
|
@ -14,7 +14,8 @@ local function my_on_attach(bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- default mappings
|
-- default mappings
|
||||||
api.config.mappings.default_on_attach(bufnr)
|
-- causes weird bugs, somehow it works without that?
|
||||||
|
--api.config.mappings.default_on_attach(bufnr)
|
||||||
|
|
||||||
-- custom mappings
|
-- custom mappings
|
||||||
-- cd
|
-- cd
|
||||||
|
|
|
@ -22,7 +22,6 @@ Plug 'nvim-tree/nvim-tree.lua'
|
||||||
Plug 'nvim-tree/nvim-web-devicons'
|
Plug 'nvim-tree/nvim-web-devicons'
|
||||||
Plug 'rust-lang/rust.vim'
|
Plug 'rust-lang/rust.vim'
|
||||||
Plug 'preservim/tagbar'
|
Plug 'preservim/tagbar'
|
||||||
Plug 'lambdalisue/suda.vim'
|
|
||||||
"Plug 'dense-analysis/ale'
|
"Plug 'dense-analysis/ale'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
" automatically ask for a password when trying to do something I don't have
|
|
||||||
" permission for
|
|
||||||
let g:suda_smart_edit = 1
|
|
|
@ -1,13 +0,0 @@
|
||||||
function! s:isAtStartOfLine(mapping)
|
|
||||||
let text_before_cursor = getline('.')[0 : col('.')-1]
|
|
||||||
let mapping_pattern = '\V' . escape(a:mapping, '\')
|
|
||||||
let comment_pattern = '\V' . escape(substitute(&l:commentstring, '%s.*$', '', ''), '\')
|
|
||||||
return (text_before_cursor =~? '^' . ('\v(' . comment_pattern . '\v)?') . '\s*\v' . mapping_pattern . '\v$')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
inoreabbrev <expr> <bar><bar>
|
|
||||||
\ <SID>isAtStartOfLine('\|\|') ?
|
|
||||||
\ '<c-o>:TableModeEnable<cr><bar><space><bar><left><left>' : '<bar><bar>'
|
|
||||||
inoreabbrev <expr> __
|
|
||||||
\ <SID>isAtStartOfLine('__') ?
|
|
||||||
\ '<c-o>:silent! TableModeDisable<cr>' : '__'
|
|
|
@ -9,9 +9,6 @@ fi
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export editor=nvim
|
export editor=nvim
|
||||||
|
|
||||||
# configure `time` format
|
|
||||||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias l="lsd -lah"
|
alias l="lsd -lah"
|
||||||
alias ll="lsd -lh"
|
alias ll="lsd -lh"
|
||||||
|
@ -39,34 +36,27 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||||
### ZSH HOME
|
### ZSH HOME
|
||||||
export ZSH=$HOME/.zsh-distrobox
|
export ZSH=$HOME/.zsh-distrobox
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- history config -------------------------------------
|
||||||
setopt autocd
|
export HISTFILE=~/.zsh_history
|
||||||
setopt HIST_FIND_NO_DUPS
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
setopt INC_APPEND_HISTORY
|
setopt INC_APPEND_HISTORY
|
||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
setopt interactivecomments # allow comments in interactive mode
|
|
||||||
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
|
||||||
setopt nonomatch # hide error message if there is no match for the pattern
|
|
||||||
setopt notify # report the status of background jobs immediately
|
|
||||||
setopt numericglobsort # sort filenames numerically when it makes sense
|
|
||||||
setopt promptsubst # enable command substitution in prompt
|
|
||||||
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
|
||||||
PROMPT_EOL_MARK=""
|
|
||||||
|
|
||||||
# History configurations
|
# How many commands zsh will load to memory.
|
||||||
HISTFILE=~/.zsh_history
|
export HISTSIZE=100000
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=200000
|
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
|
||||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
|
||||||
setopt hist_verify # show command with history expansion to user before running it
|
|
||||||
#setopt share_history # share command history data
|
|
||||||
|
|
||||||
# force zsh to show the complete history
|
# How many commands history will save on file.
|
||||||
alias history="history 0"
|
# all of them!
|
||||||
|
export SAVEHIST=10000000
|
||||||
|
|
||||||
|
# History won't save duplicates.
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# History won't show duplicates on search.
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
|
||||||
|
### ---- zsh options -------------------------------------
|
||||||
|
setopt autocd
|
||||||
|
|
||||||
### --- Inputs Config ------------------------------------
|
### --- Inputs Config ------------------------------------
|
||||||
# vim keys, then override stuff.
|
# vim keys, then override stuff.
|
||||||
|
@ -80,49 +70,8 @@ bindkey -s "^X" 'n^M'
|
||||||
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
|
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
### ---- ZSH MODULES -----------------------------------
|
### ---- ZSH MODULES -----------------------------------
|
||||||
# enable completion features
|
autoload -Uz compinit && compinit
|
||||||
autoload -Uz compinit
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
compinit -d ~/.cache/zcompdump
|
|
||||||
zstyle ':completion:*:*:*:*:*' menu select
|
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
|
||||||
zstyle ':completion:*' completer _expand _complete
|
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
|
||||||
zstyle ':completion:*' use-compctl false
|
|
||||||
zstyle ':completion:*' verbose true
|
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|
||||||
|
|
||||||
# enable color support
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
|
|
||||||
|
|
||||||
alias dir='dir --color=auto'
|
|
||||||
alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
alias diff='diff --color=auto'
|
|
||||||
alias ip='ip --color=auto'
|
|
||||||
|
|
||||||
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
|
||||||
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
|
||||||
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
|
||||||
export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
|
|
||||||
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
|
||||||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
|
||||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
|
||||||
|
|
||||||
# Take advantage of $LS_COLORS for completion as well
|
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
||||||
fi
|
|
||||||
|
|
||||||
### ---- PLUGINS -----------------------------------
|
### ---- PLUGINS -----------------------------------
|
||||||
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
||||||
|
|
|
@ -10,9 +10,6 @@ export PATH=/usr/local/sbin:/usr/sbin/:/usr/local/bin:/usr/bin:/var/lib/flatpak/
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export editor=nvim
|
export editor=nvim
|
||||||
|
|
||||||
# configure `time` format
|
|
||||||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias l="lsd -lah"
|
alias l="lsd -lah"
|
||||||
alias ll="lsd -lh"
|
alias ll="lsd -lh"
|
||||||
|
@ -40,34 +37,27 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||||
### ZSH HOME
|
### ZSH HOME
|
||||||
export ZSH=$HOME/.zsh
|
export ZSH=$HOME/.zsh
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- history config -------------------------------------
|
||||||
setopt autocd
|
export HISTFILE=~/.zsh_history
|
||||||
setopt HIST_FIND_NO_DUPS
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
setopt INC_APPEND_HISTORY
|
setopt INC_APPEND_HISTORY
|
||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
setopt interactivecomments # allow comments in interactive mode
|
|
||||||
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
|
||||||
setopt nonomatch # hide error message if there is no match for the pattern
|
|
||||||
setopt notify # report the status of background jobs immediately
|
|
||||||
setopt numericglobsort # sort filenames numerically when it makes sense
|
|
||||||
setopt promptsubst # enable command substitution in prompt
|
|
||||||
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
|
||||||
PROMPT_EOL_MARK=""
|
|
||||||
|
|
||||||
# History configurations
|
# How many commands zsh will load to memory.
|
||||||
HISTFILE=~/.zsh_history
|
export HISTSIZE=100000
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=200000
|
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
|
||||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
|
||||||
setopt hist_verify # show command with history expansion to user before running it
|
|
||||||
#setopt share_history # share command history data
|
|
||||||
|
|
||||||
# force zsh to show the complete history
|
# How many commands history will save on file.
|
||||||
alias history="history 0"
|
# all of them!
|
||||||
|
export SAVEHIST=10000000
|
||||||
|
|
||||||
|
# History won't save duplicates.
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# History won't show duplicates on search.
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
|
||||||
|
### ---- zsh options -------------------------------------
|
||||||
|
setopt autocd
|
||||||
|
|
||||||
### --- Inputs Config ------------------------------------
|
### --- Inputs Config ------------------------------------
|
||||||
# vim keys, then override stuff.
|
# vim keys, then override stuff.
|
||||||
|
@ -77,7 +67,8 @@ bindkey "^[[1;5D" backward-word
|
||||||
bindkey -s "^X" 'n^M'
|
bindkey -s "^X" 'n^M'
|
||||||
|
|
||||||
### ---- ZSH MODULES -----------------------------------
|
### ---- ZSH MODULES -----------------------------------
|
||||||
# handled by original kali
|
autoload -Uz compinit && compinit
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
|
|
||||||
### ---- PLUGINS -----------------------------------
|
### ---- PLUGINS -----------------------------------
|
||||||
source ~/.local/share/fzf/key-bindings.zsh
|
source ~/.local/share/fzf/key-bindings.zsh
|
||||||
|
@ -115,4 +106,3 @@ then
|
||||||
else
|
else
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,6 @@ export PATH=/usr/local/sbin:/usr/sbin/:/usr/local/bin:/usr/bin:~/.local/bin:~/.c
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export editor=vim
|
export editor=vim
|
||||||
|
|
||||||
# configure `time` format
|
|
||||||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias l="ls --color -lah"
|
alias l="ls --color -lah"
|
||||||
alias ll="ls --color -lh"
|
alias ll="ls --color -lh"
|
||||||
|
@ -32,34 +29,27 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||||
### ZSH HOME
|
### ZSH HOME
|
||||||
export ZSH=$HOME/.zsh-server
|
export ZSH=$HOME/.zsh-server
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- history config -------------------------------------
|
||||||
setopt autocd
|
export HISTFILE=~/.zsh_history
|
||||||
setopt HIST_FIND_NO_DUPS
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
setopt INC_APPEND_HISTORY
|
setopt INC_APPEND_HISTORY
|
||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
setopt interactivecomments # allow comments in interactive mode
|
|
||||||
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
|
||||||
setopt nonomatch # hide error message if there is no match for the pattern
|
|
||||||
setopt notify # report the status of background jobs immediately
|
|
||||||
setopt numericglobsort # sort filenames numerically when it makes sense
|
|
||||||
setopt promptsubst # enable command substitution in prompt
|
|
||||||
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
|
||||||
PROMPT_EOL_MARK=""
|
|
||||||
|
|
||||||
# History configurations
|
# How many commands zsh will load to memory.
|
||||||
HISTFILE=~/.zsh_history
|
export HISTSIZE=100000
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=200000
|
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
|
||||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
|
||||||
setopt hist_verify # show command with history expansion to user before running it
|
|
||||||
#setopt share_history # share command history data
|
|
||||||
|
|
||||||
# force zsh to show the complete history
|
# How many commands history will save on file.
|
||||||
alias history="history 0"
|
# all of them!
|
||||||
|
export SAVEHIST=10000000
|
||||||
|
|
||||||
|
# History won't save duplicates.
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# History won't show duplicates on search.
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
|
||||||
|
### ---- zsh options -------------------------------------
|
||||||
|
setopt autocd
|
||||||
|
|
||||||
### --- Inputs Config ------------------------------------
|
### --- Inputs Config ------------------------------------
|
||||||
# vim keys, then override stuff.
|
# vim keys, then override stuff.
|
||||||
|
@ -72,49 +62,8 @@ bindkey -s "^X" 'n^M'
|
||||||
PS1='%B%F{red}%n@%m%k %B%F{cyan}%(4~|...|)%3~%F{white} %# %b%f%k'
|
PS1='%B%F{red}%n@%m%k %B%F{cyan}%(4~|...|)%3~%F{white} %# %b%f%k'
|
||||||
|
|
||||||
### ---- ZSH MODULES -----------------------------------
|
### ---- ZSH MODULES -----------------------------------
|
||||||
# enable completion features
|
autoload -Uz compinit && compinit
|
||||||
autoload -Uz compinit
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
compinit -d ~/.cache/zcompdump
|
|
||||||
zstyle ':completion:*:*:*:*:*' menu select
|
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
|
||||||
zstyle ':completion:*' completer _expand _complete
|
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
|
||||||
zstyle ':completion:*' use-compctl false
|
|
||||||
zstyle ':completion:*' verbose true
|
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|
||||||
|
|
||||||
# enable color support
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
|
|
||||||
|
|
||||||
alias dir='dir --color=auto'
|
|
||||||
alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
alias diff='diff --color=auto'
|
|
||||||
alias ip='ip --color=auto'
|
|
||||||
|
|
||||||
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
|
||||||
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
|
||||||
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
|
||||||
export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
|
|
||||||
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
|
||||||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
|
||||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
|
||||||
|
|
||||||
# Take advantage of $LS_COLORS for completion as well
|
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
||||||
fi
|
|
||||||
|
|
||||||
### ---- PLUGINS -----------------------------------
|
### ---- PLUGINS -----------------------------------
|
||||||
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
||||||
|
|
|
@ -10,9 +10,6 @@ export PATH=/usr/local/sbin:/usr/sbin/:/usr/local/bin:/usr/bin:/var/lib/flatpak/
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export editor=nvim
|
export editor=nvim
|
||||||
|
|
||||||
# configure `time` format
|
|
||||||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias l="lsd -lah"
|
alias l="lsd -lah"
|
||||||
alias ll="lsd -lh"
|
alias ll="lsd -lh"
|
||||||
|
@ -40,34 +37,27 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||||
### ZSH HOME
|
### ZSH HOME
|
||||||
export ZSH=$HOME/.zsh
|
export ZSH=$HOME/.zsh
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- history config -------------------------------------
|
||||||
setopt autocd
|
export HISTFILE=~/.zsh_history
|
||||||
setopt HIST_FIND_NO_DUPS
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt appendhistory
|
setopt appendhistory
|
||||||
setopt INC_APPEND_HISTORY
|
setopt INC_APPEND_HISTORY
|
||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
setopt interactivecomments # allow comments in interactive mode
|
|
||||||
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
|
||||||
setopt nonomatch # hide error message if there is no match for the pattern
|
|
||||||
setopt notify # report the status of background jobs immediately
|
|
||||||
setopt numericglobsort # sort filenames numerically when it makes sense
|
|
||||||
setopt promptsubst # enable command substitution in prompt
|
|
||||||
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
|
||||||
PROMPT_EOL_MARK=""
|
|
||||||
|
|
||||||
# History configurations
|
# How many commands zsh will load to memory.
|
||||||
HISTFILE=~/.zsh_history
|
export HISTSIZE=100000
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=200000
|
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
|
||||||
setopt hist_ignore_dups # ignore duplicated commands history list
|
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
|
||||||
setopt hist_verify # show command with history expansion to user before running it
|
|
||||||
#setopt share_history # share command history data
|
|
||||||
|
|
||||||
# force zsh to show the complete history
|
# How many commands history will save on file.
|
||||||
alias history="history 0"
|
# all of them!
|
||||||
|
export SAVEHIST=10000000
|
||||||
|
|
||||||
|
# History won't save duplicates.
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# History won't show duplicates on search.
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
|
||||||
|
### ---- zsh options -------------------------------------
|
||||||
|
setopt autocd
|
||||||
|
|
||||||
### --- Inputs Config ------------------------------------
|
### --- Inputs Config ------------------------------------
|
||||||
# vim keys, then override stuff.
|
# vim keys, then override stuff.
|
||||||
|
@ -81,49 +71,8 @@ bindkey -s "^X" 'n^M'
|
||||||
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
|
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
### ---- ZSH MODULES -----------------------------------
|
### ---- ZSH MODULES -----------------------------------
|
||||||
# enable completion features
|
autoload -Uz compinit && compinit
|
||||||
autoload -Uz compinit
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
compinit -d ~/.cache/zcompdump
|
|
||||||
zstyle ':completion:*:*:*:*:*' menu select
|
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
|
||||||
zstyle ':completion:*' completer _expand _complete
|
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
|
||||||
zstyle ':completion:*' use-compctl false
|
|
||||||
zstyle ':completion:*' verbose true
|
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
|
||||||
|
|
||||||
# enable color support
|
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
||||||
export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
|
|
||||||
|
|
||||||
alias dir='dir --color=auto'
|
|
||||||
alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
alias diff='diff --color=auto'
|
|
||||||
alias ip='ip --color=auto'
|
|
||||||
|
|
||||||
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
|
||||||
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
|
||||||
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
|
||||||
export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
|
|
||||||
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
|
||||||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
|
||||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
|
||||||
|
|
||||||
# Take advantage of $LS_COLORS for completion as well
|
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
||||||
fi
|
|
||||||
|
|
||||||
### ---- PLUGINS -----------------------------------
|
### ---- PLUGINS -----------------------------------
|
||||||
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
|
rm -rf ~/.zsh-very-old
|
||||||
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
|
mv ~/.zsh-old ~/.zsh-very-old
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
mv ~/.zsh ~/.zsh-old
|
||||||
|
|
||||||
cp -r $(pwd)/home/.zsh-kali ~
|
cp -r $(pwd)/home/.zsh-kali ~
|
||||||
cp -r $(pwd)/home/.vimrc ~
|
cp -r $(pwd)/home/.vimrc ~
|
||||||
|
@ -12,6 +11,10 @@ cp -r $(pwd)/home/.config ~
|
||||||
cp -r $(pwd)/home/.tmux-server.conf ~/.tmux.conf
|
cp -r $(pwd)/home/.tmux-server.conf ~/.tmux.conf
|
||||||
touch ~/.local.zsh
|
touch ~/.local.zsh
|
||||||
|
|
||||||
if [ tail -n 1 ~/.zshrc != "source ~/.zsh-kali/zshrc" ]; then
|
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc
|
||||||
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc
|
|
||||||
fi
|
# Install Vim Stuff
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
|
18
minimal.sh
18
minimal.sh
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -f ~/.zsh-old ] && rm -rf ~/.zsh-old
|
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
|
||||||
|
|
||||||
[ -f ~/.zshrc-old ] && rm -rf ~/.zshrc-old
|
|
||||||
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
|
|
||||||
|
|
||||||
cp -r $(pwd)/home/.zsh-server ~
|
|
||||||
cp -r $(pwd)/home/.vimrc ~
|
|
||||||
mkdir -p ~/.config/nvim
|
|
||||||
cp -r $(pwd)/home/.config/nvim/init.vim ~/.config/nvim
|
|
||||||
cp -r $(pwd)/home/.config/nvim/common.vim ~/.config/nvim
|
|
||||||
cp -r $(pwd)/home/.tmux-server.conf ~/.tmux.conf
|
|
||||||
touch ~/.local.zsh
|
|
||||||
|
|
||||||
ln ~/.zsh-server/zshrc ~/.zshrc
|
|
|
@ -1,13 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
|
rm -rf ~/.zsh-very-old
|
||||||
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
|
mv ~/.zsh-old ~/.zsh-very-old
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
mv ~/.zsh ~/.zsh-old
|
||||||
|
|
||||||
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
|
rm -rf ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
|
mv ~/.zshrc-old ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
|
mv ~/.zshrc ~/.zshrc-old
|
||||||
|
|
||||||
cp -r $(pwd)/home/.zsh-server ~
|
cp -r $(pwd)/home/.zsh-server ~
|
||||||
cp -r $(pwd)/home/.vimrc ~
|
cp -r $(pwd)/home/.vimrc ~
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
|
||||||
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
|
rm -rf ~/.zsh-very-old
|
||||||
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
|
mv ~/.zsh-old ~/.zsh-very-old
|
||||||
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
|
mv ~/.zsh ~/.zsh-old
|
||||||
|
|
||||||
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
|
rm -rf ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
|
mv ~/.zshrc-old ~/.zshrc-very-old
|
||||||
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
|
mv ~/.zshrc ~/.zshrc-old
|
||||||
|
|
||||||
cp -r $(pwd)/home/.p10k-standart-fonts.zsh ~/.p10k.zsh
|
cp -r $(pwd)/home/.p10k-standart-fonts.zsh ~/.p10k.zsh
|
||||||
cp -r $(pwd)/home/.zsh ~
|
cp -r $(pwd)/home/.zsh ~
|
||||||
|
|
Loading…
Add table
Reference in a new issue