Compare commits

...

5 commits

Author SHA1 Message Date
0454fc29ba
fancier zshs 2023-07-04 21:33:21 +02:00
cc1ca652ce
moar nvim confs 2023-07-04 21:33:12 +02:00
8065b790fe
safer apply scripts 2023-07-04 21:33:01 +02:00
d702e43215
Merge branch 'tablemode' 2023-07-04 19:38:43 +02:00
b2bbdc7aa1
table mode 2023-07-04 19:37:39 +02:00
17 changed files with 320 additions and 128 deletions

3
conf-only.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
set -e
cp -r $(pwd)/home/.config ~

View file

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
set -e
rm -rf ~/.zsh-very-old [ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old [ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old [ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old [ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old [ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old [ -f ~/.zshrc ] && 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 ~
@ -16,12 +17,7 @@ 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'

View file

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
rm -rf ~/.zsh-very-old [ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old [ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old [ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old [ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old [ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old [ -f ~/.zshrc ] && 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,9 +18,3 @@ 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'

View file

@ -19,7 +19,8 @@ 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 spell " enable spell check (may need to download language package) set numberwidth=4
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
@ -40,6 +41,8 @@ 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)
@ -95,6 +98,3 @@ 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

View file

@ -34,6 +34,9 @@ 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
@ -86,10 +89,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> <Space>bb <Cmd>BufferOrderByBufferNumber<CR> nnoremap <silent> <leader>bb <Cmd>BufferOrderByBufferNumber<CR>
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR> nnoremap <silent> <leader>bd <Cmd>BufferOrderByDirectory<CR>
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR> nnoremap <silent> <leader>bl <Cmd>BufferOrderByLanguage<CR>
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR> nnoremap <silent> <leader>bw <Cmd>BufferOrderByWindowNumber<CR>
" Other: " Other:
" :BarbarEnable - enables barbar (enabled by default) " :BarbarEnable - enables barbar (enabled by default)

View file

@ -14,8 +14,7 @@ local function my_on_attach(bufnr)
end end
-- default mappings -- default mappings
-- causes weird bugs, somehow it works without that? api.config.mappings.default_on_attach(bufnr)
--api.config.mappings.default_on_attach(bufnr)
-- custom mappings -- custom mappings
-- cd -- cd

View file

@ -22,6 +22,7 @@ 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()

View file

@ -0,0 +1,3 @@
" automatically ask for a password when trying to do something I don't have
" permission for
let g:suda_smart_edit = 1

View file

@ -0,0 +1,13 @@
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>' : '__'

View file

@ -9,6 +9,9 @@ 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"
@ -36,27 +39,34 @@ 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
### ---- history config ------------------------------------- ### ---- zsh options -------------------------------------
export HISTFILE=~/.zsh_history setopt autocd
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=""
# How many commands zsh will load to memory. # History configurations
export HISTSIZE=100000 HISTFILE=~/.zsh_history
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
# How many commands history will save on file. # force zsh to show the complete history
# all of them! alias history="history 0"
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.
@ -70,8 +80,49 @@ bindkey -s "^X" 'n^M'
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
### ---- ZSH MODULES ----------------------------------- ### ---- ZSH MODULES -----------------------------------
autoload -Uz compinit && compinit # enable completion features
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' autoload -Uz compinit
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

View file

@ -10,6 +10,9 @@ 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"
@ -37,27 +40,34 @@ 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
### ---- history config ------------------------------------- ### ---- zsh options -------------------------------------
export HISTFILE=~/.zsh_history setopt autocd
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=""
# How many commands zsh will load to memory. # History configurations
export HISTSIZE=100000 HISTFILE=~/.zsh_history
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
# How many commands history will save on file. # force zsh to show the complete history
# all of them! alias history="history 0"
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.
@ -67,8 +77,7 @@ bindkey "^[[1;5D" backward-word
bindkey -s "^X" 'n^M' bindkey -s "^X" 'n^M'
### ---- ZSH MODULES ----------------------------------- ### ---- ZSH MODULES -----------------------------------
autoload -Uz compinit && compinit # handled by original kali
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
@ -106,3 +115,4 @@ then
else else
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
fi fi

View file

@ -3,6 +3,9 @@ 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"
@ -29,27 +32,34 @@ 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
### ---- history config ------------------------------------- ### ---- zsh options -------------------------------------
export HISTFILE=~/.zsh_history setopt autocd
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=""
# How many commands zsh will load to memory. # History configurations
export HISTSIZE=100000 HISTFILE=~/.zsh_history
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
# How many commands history will save on file. # force zsh to show the complete history
# all of them! alias history="history 0"
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.
@ -62,8 +72,49 @@ 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 -----------------------------------
autoload -Uz compinit && compinit # enable completion features
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' autoload -Uz compinit
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

View file

@ -10,6 +10,9 @@ 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"
@ -37,27 +40,34 @@ 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
### ---- history config ------------------------------------- ### ---- zsh options -------------------------------------
export HISTFILE=~/.zsh_history setopt autocd
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=""
# How many commands zsh will load to memory. # History configurations
export HISTSIZE=100000 HISTFILE=~/.zsh_history
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
# How many commands history will save on file. # force zsh to show the complete history
# all of them! alias history="history 0"
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.
@ -71,8 +81,49 @@ bindkey -s "^X" 'n^M'
source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme source $ZSH/themes/powerlevel10k/powerlevel10k.zsh-theme
### ---- ZSH MODULES ----------------------------------- ### ---- ZSH MODULES -----------------------------------
autoload -Uz compinit && compinit # enable completion features
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' autoload -Uz compinit
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

View file

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
set -e
rm -rf ~/.zsh-very-old [ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old [ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old [ -f ~/.zsh ] && 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 ~
@ -11,10 +12,6 @@ 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
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc if [ tail -n 1 ~/.zshrc != "source ~/.zsh-kali/zshrc" ]; then
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc
# Install Vim Stuff fi
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 Executable file
View file

@ -0,0 +1,18 @@
#!/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

View file

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
set -e
rm -rf ~/.zsh-very-old [ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old [ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old [ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old [ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old [ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old [ -f ~/.zshrc ] && 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 ~

View file

@ -1,12 +1,13 @@
#!/bin/bash #!/bin/bash
set -e
rm -rf ~/.zsh-very-old [ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old [ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old [ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old [ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old [ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old [ -f ~/.zshrc ] && 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 ~