diff options
-rw-r--r-- | .config/procps/toprc | 20 | ||||
-rw-r--r-- | .k9s/skin.yml | 55 | ||||
-rw-r--r-- | .kshrc | 4 | ||||
-rw-r--r-- | .tmux.conf | 2 | ||||
-rw-r--r-- | .vimrc | 22 | ||||
-rw-r--r-- | .zshrc | 29 | ||||
-rwxr-xr-x | bin/colcol | 36 | ||||
-rw-r--r-- | devi.zsh-theme | 42 | ||||
-rw-r--r-- | postit | 1 | ||||
-rwxr-xr-x | tmux/vcs_info.sh | 3 |
10 files changed, 171 insertions, 43 deletions
diff --git a/.config/procps/toprc b/.config/procps/toprc new file mode 100644 index 0000000..8c8c783 --- /dev/null +++ b/.config/procps/toprc @@ -0,0 +1,20 @@ +top's Config File (Linux processes with windows) +Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=3.0, Curwin=3 +Def fieldscur=¥¨³´»½ÀÄ·º¹Å&')*+,-./012568<>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij + winflags=195892, sortindx=18, maxtasks=0, graph_cpus=0, graph_mems=0 + summclr=1, msgsclr=1, headclr=3, taskclr=28 +Job fieldscur=¥¦¹·º(³´Ä»½@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij + winflags=195892, sortindx=0, maxtasks=0, graph_cpus=0, graph_mems=0 + summclr=6, msgsclr=6, headclr=7, taskclr=6 +Mem fieldscur=¥º»<½¾¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij + winflags=195892, sortindx=21, maxtasks=0, graph_cpus=0, graph_mems=0 + summclr=5, msgsclr=5, headclr=4, taskclr=22 +Usr fieldscur=¥¦¨§ª´³°¹·º»Äµ¼ÎÅ)+,-./1268=>?@ABCFGHIJKLMOPQRSTUVWXYZ[\]^_`abcdefghij + winflags=686518, sortindx=3, maxtasks=0, graph_cpus=1, graph_mems=1 + summclr=31, msgsclr=3, headclr=32, taskclr=22 +Fixed_widest=0, Summ_mscale=1, Task_mscale=1, Zero_suppress=0 + +pipe Open Files lsof -P -p %d 2>&1 +file NUMA Info /proc/%d/numa_maps +pipe Log tail -n100 /var/log/syslog | sort -Mr + diff --git a/.k9s/skin.yml b/.k9s/skin.yml index c5ed102..8c2a23c 100644 --- a/.k9s/skin.yml +++ b/.k9s/skin.yml @@ -1,15 +1,25 @@ -# Skin InTheNavy... +# adapted from InTheNavy... k9s: - # General K9s styles body: - fgColor: dodgerblue + fgColor: dodgerblue4 bgColor: '#000000' logoColor: '#0000ff' - # ClusterInfoView styles. + prompt: + fgColor: cadetblue + bgColor: black + suggestColor: dodgerblue4 info: fgColor: lightskyblue sectionColor: steelblue - # Help panel styles + dialog: + fgColor: dodgerblue4 + bgColor: black + buttonFgColor: black + buttonBgColor: dodgerblue4 + buttonFocusFgColor: white + buttonFocusBgColor: slateblue3 + labelFgColor: slateblue3 + fieldFgColor: dodgerblue4 help: fgColor: white bgColor: default @@ -17,31 +27,26 @@ k9s: numKeyColor: blue sectionColor: gray frame: - # Borders styles. border: - fgColor: dodgerblue + fgColor: dodgerblue4 focusColor: aliceblue - # MenuView attributes and styles. menu: fgColor: darkblue keyColor: cornflowerblue - # Used for favorite namespaces numKeyColor: cadetblue - # CrumbView attributes for history navigation. crumbs: fgColor: white bgColor: default - activeColor: skyblue - # Resource status and update styles + activeColor: deepskyblue status: - newColor: '#00ff00' + newColor: darkgreen modifyColor: powderblue addColor: lightskyblue - errorColor: indianred + errorColor: darkred + pendingColor: mediumpruple highlightcolor: royalblue killColor: slategray - completedColor: gray - # Border title styles. + completedColor: slateblue3 title: fgColor: aqua bgColor: default @@ -49,22 +54,32 @@ k9s: counterColor: slateblue filterColor: slategray views: - # TableView attributes. table: fgColor: blue bgColor: default cursorColor: aqua - # Header row styles. header: fgColor: white bgColor: default sorterColor: orange - # YAML info styles. yaml: keyColor: steelblue colonColor: blue valueColor: royalblue - # Logs styles. logs: fgColor: white bgColor: default + xray: + fgColor: blue + bgColor: black + cursorColor: aqua + graphicColor: cornflowerblue + showIcons: false + charts: + bgColor: black + defaultDialColors: + - linegreen + - orangered + defaultChartColors: + - linegreen + - orangered @@ -83,5 +83,9 @@ function dig { fi } +function fd { + ls -l $(find -iname "*$1*") +} + export SHELL="ksh" export PATH=$PATH:/home/devi/scripts/bin @@ -138,7 +138,7 @@ set-option -g status-right-length 170 # set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#[fg=colour15 bg=colour22]#U@#H#[fg=colour22 bg=colour148]î‚°#(/home/devi/tmux-powerline/powerline.sh left)" # set-option -g status-right "#(/home/devi/tmux-powerline/powerline.sh right)#{online_status}" -set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#{?#{pane_ssh_connected},#[fg=colour15 bg=colour31],#[fg=colour15 bg=colour24]}#U@#H#{?#{pane_ssh_connected},:#{pane_ssh_port}#[fg=colour31 bg=colour29],#[fg=colour24 bg=colour29]}î‚°#(/home/devi/scripts/tmux/vcs_info.sh)" +set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#{?#{pane_ssh_connected},#[fg=colour15 bg=colour31],#[fg=colour15 bg=colour24]}#U@#H#{?#{pane_ssh_connected},:#{pane_ssh_port}#[fg=colour31 bg=colour26],#[fg=colour24 bg=colour26]}î‚°#(/home/devi/scripts/tmux/vcs_info.sh)" # set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#{?#{pane_ssh_connected},#[fg=colour15 bg=colour31],#[fg=colour15 bg=colour24]}#[fg=colour15 bg=colour31]#U@#H:#{pane_ssh_port}#[fg=colour31 bg=colour61]î‚°#(/home/devi/scripts/tmux/vcs_info.sh)" set-option -g status-right "#(/home/devi/scripts/tmux/date.sh)#{online_status}" @@ -3,7 +3,6 @@ let maplocalleader = "," set encoding=UTF-8 set nocompatible set completeopt-=preview -set completeopt+=popup set showmatch set list set listchars=eol:$,tab:>- @@ -30,7 +29,7 @@ set laststatus=2 set smartcase set more set lazyredraw -set synmaxcol=800 +set synmaxcol=200 syntax sync minlines=64 set ttyfast set relativenumber @@ -69,7 +68,10 @@ set backspace=indent,eol,start " set cursorcolumn " set exrc " set wildmode=list:longest,full -set viminfo='100,\"500,:50,%,n~/.viminfo +if !has('nvim') + set viminfo='100,\"500,:50,%,n~/.viminfo + set completeopt+=popup +endif highlight clear Search let g:is_posix = 1 @@ -184,6 +186,13 @@ Plug 'roxma/vim-tmux-clipboard' Plug 'wellle/visual-split.vim' Plug 'zchee/vim-goasm' Plug 'jvirtanen/vim-hcl' +Plug 'AndrewRadev/splitjoin.vim' +if has('nvim') + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +endif +Plug 'dansomething/vim-hackernews' +Plug 'andrewstuart/vim-kubernetes' +" Plug 'psliwka/vim-smoothie' " Plug 'lifepillar/pgsql.vim', {'for': ['sql','pqsl', 'pgsql']} " Plug 'tmux-plugins/vim-tmux' " Plug 'rhysd/vim-gfm-syntax' @@ -1018,6 +1027,7 @@ highlight vimBufnrWarn ctermbg=16 ctermfg=202 " highlight airline_tabtype ctermbg=15 ctermfg=34 "typos +iab adn and iab teh the iab strign string iab pritn print @@ -1057,7 +1067,7 @@ autocmd FileType markdown,text,vimwiki,tex setlocal complete+=k "fzf map <leader>f <Esc><Esc>:Files!<CR> -let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.7 } } +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } } let g:fzf_colors = \ { 'fg': ['fg', 'Normal'], \ 'bg': ['bg', 'Normal'], @@ -1166,7 +1176,7 @@ augroup YCMDocRust autocmd! autocmd FileType rust let b:ycm_hover = { \ 'command': 'GetDoc', - \ 'syntax': &filetype + \ 'syntax': 'rust' \ } augroup END @@ -1243,7 +1253,7 @@ let g:context_presenter = 'vim-popup' augroup AUSpell autocmd! - autocmd FileType markdown,txt,vimwiki,tex set spell + autocmd FileType markdown,txt,vimwiki,tex setlocal spell augroup END nnoremap <leader>b :Make<CR> @@ -16,10 +16,12 @@ source $ZSH/oh-my-zsh.sh [[ -s /home/devi/.autojump/etc/profile.d/autojump.sh ]] && source /home/devi/.autojump/etc/profile.d/autojump.sh autoload -U compinit && compinit -u -alias ls="exa" -alias la="exa -a" -alias ll="exa -abghHliSmxF --color-scale --git -@" -alias lss="exa -Sls=size" +alias ls="ls --color=auto" +alias la="ls -a" +# alias ll="exa -abghHliSmxF --color-scale --git -@" +alias ll="\ls -lZspihbFA --color=never --full-time --author | colcol | column -t" +# alias lss="exa -Sls=size" +alias lss="ls -sASh" alias ee="nautilus ." alias updaterc="cp ~/scripts/.zshrc ~/.zshrc" alias fixvimrc='cp ~/scripts/.vimrc ~/.vimrc' @@ -76,7 +78,7 @@ alias w3m="torsocks w3m -graph" #alias clang="COLORMAKE_COMMAND=clang colormake" alias mv="mv -i" alias cp="cp -i" -alias nuke="rm -rf * .*" +alias nuke="rm -rf .[^.]* *" alias bruiser="bruiser --history ~/.bruiser/history.lua" alias digg="dig && clear" alias ogg="ogg123" @@ -86,6 +88,7 @@ alias ddgr="ddgr --colorize always -r us-en -n 15" alias pirate-get="pirate-get -S ~/magnets/" alias vps="ssh 87.236.209.206 -l ubuntu" alias vpn="ssh 192.99.102.52 -l rooot -p 1022" +alias vpn2="ssh 145.239.165.137 -l rooot" alias pytags="ctags --fields=+l --languages=python --python-kinds=-iv -R ." alias v="vim" alias kshrc="vim ~/scripts/.kshrc" @@ -195,6 +198,19 @@ math() { echo $(($@)) } +fd() { + ls -l $(find -iname "*$1*") +} + +pss() { + "ps" $1 | colcol | column -t +} + +pdfsearch() { + REGEX=$1 + shift + pdfgrep --warn-empty --unac --color=auto -i -e $REGEX -n -C 1 "$@" +} # function pid { # ps -aux | grep "$1" | grep -v grep | awk '{print$2}' # } @@ -264,6 +280,8 @@ export PATH=$PATH:/home/devi/dry export PATH=$PATH:/home/devi/k9s export PATH=$PATH:/home/devi/opam export PATH=$PATH:/home/devi/devi/ghorg +export PATH=$PATH:/home/devi/kubectl +export PATH=$PATH:/home/devi/solidity export EDITOR=vim export BROWSER=w3m @@ -396,6 +414,7 @@ setopt INTERACTIVE_COMMENTS # no more C-s and C-q unsetopt FLOW_CONTROL setopt LONG_LIST_JOBS +setopt +o nomatch # eval "$(goenv init -)" # export PATH="$GOROOT/bin:$PATH" diff --git a/bin/colcol b/bin/colcol new file mode 100755 index 0000000..bb1eb61 --- /dev/null +++ b/bin/colcol @@ -0,0 +1,36 @@ +#!/usr/bin/gawk -f +#colorizes a columnar output +BEGIN { + colors[1] = "\x1b[38;5;216m" + colors[2] = "\x1b[38;5;192m" + colors[3] = "\x1b[38;5;22m" + colors[4] = "\x1b[38;5;25m" + colors[5] = "\x1b[38;5;98m" + colors[6] = "\x1b[38;5;68m" + colors[7] = "\x1b[38;5;59m" + colors[8] = "\x1b[38;5;36m" + colors[9] = "\x1b[38;5;202m" + colors[10] = "\x1b[38;5;100m" + colors[11] = "\x1b[38;5;105m" + colors[12] = "\x1b[38;5;106m" + colors[13] = "\x1b[38;5;96m" + colors[14] = "\x1b[38;5;31m" + colors[15] = "\x1b[38;5;23m" + colors[16] = "\x1b[38;5;105m" + colors_len=16 +} +{ + if (1 == NR){ + max_col = NF + } + # printf max_col" " + printf NR-1" " + for (i = 1; i <= NF; i++){ + if (i >= colors_len) { + printf "",colors[colors_len]$i" " + } else { + printf colors[i]$i" " + } + } + print "\033[0m" +} diff --git a/devi.zsh-theme b/devi.zsh-theme index 2c754f3..989dd77 100644 --- a/devi.zsh-theme +++ b/devi.zsh-theme @@ -57,6 +57,7 @@ if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then viinsert="%F{33}" veryorange="%F{202}" yablue="%F{32}" + yagreen="%F{34}" else turquoise="$fg[cyan]" orange="$fg[yellow]" @@ -158,14 +159,6 @@ add-zsh-hook precmd steeef_precmd time_function() { date | gawk '{print $2" "$3" "$4}' } -# function time_function { -# $guess_who -# if [[ "$os" = "win" ]]; then -# date | gawk 'BEGIN{RS=","}END{print $2" "$3}' -# else -# date | gawk '{print $4" "$5}' -# fi -# } node_version() { local version=$(fnm current) @@ -242,8 +235,32 @@ typescriptversion() { echo " <$version>" } -PROMPT=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$limegreen%}%/%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%}\n%{$limblue%}--âžœ%{$reset_color%}' +pwd_shortened() { + local cwd=$(pwd) + IFS='/' read -rA tmux_path_array <<< "$cwd" + typeset -i counter + for i in "${tmux_path_array[@]}" + do + let counter++ + if [[ $counter == $(($#tmux_path_array)) ]]; then + shortened_path+=$i + else + shortened_path+=${i:0:1}/ + fi + done + echo $shortened_path +} + +PS1=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$yagreen%}$(pwd_shortened)%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%}' +PS2=$'\n%{$limblue%}--âžœ%{$reset_color%}' +PROMPT="$PS1$PS2" +get_prompt_len() { + local zero='%([BSUbfksu]|([FK]|){*})' + FOOLENGTH=${#${(S%%)PS1//$~zero/}} + # FOOLENGTH=$(($#1 * 3 - ${#${(ml[$#1 * 2])1}})) + echo $FOOLENGTH +} # function battery_charge { # upower -e > /dev/null 2>&1 @@ -322,7 +339,12 @@ add-zsh-hook precmd timer_precmd source ~/.oh-my-zsh/plugins/zle-vi-visual/zle_vi_visual.zsh function zle-line-init zle-keymap-select { - RIGHT_PROMPT="%{$teal%}$timer_final%{$reset_color%} %{$lorange%}%?↵%{$reset_color%}%{$veryorange%}$(bg_job_count)%{$reset_color%}%{$bluesomething%}$(inranger)%{$reset_color%}" +RIGHT_PROMPT="%{$teal%}$timer_final%{$reset_color%} \ +%{$lorange%}%?↵%{$reset_color%}\ +%{$veryorange%}$(bg_job_count)%{$reset_color%}\ +%{$bluesomething%}$(inranger)%{$reset_color%}" +# %{$purple4%}$(get_prompt_len)%{$reset_color%}" + VIM_PROMPT_INSERT="%{$fg_bold[cyan]%}% [% INS]% %{$reset_color%}" VIM_PROMPT_MAIN="%{$fg_bold[blue]%}% [% INSERT]% %{$reset_color%}" VIM_PROMPT_REPLACE="%{$fg_bold[black]%}% %{$bg_bold[red]%}% [% REPLACE]% %{$reset_color%}" @@ -19,3 +19,4 @@ export WSL_INTEROP=/run/WSL/13105_interop sudo ./irc-slack --port 6667 --host 0.0.0.0 --debug ssh -N -D 9999 -o ExitOnForwardFailure=yes -l pi 192.168.1.108 fall of hyperion--7:32:30 +proot -r d11rootfs -0 diff --git a/tmux/vcs_info.sh b/tmux/vcs_info.sh index 2b2d857..ffe174a 100755 --- a/tmux/vcs_info.sh +++ b/tmux/vcs_info.sh @@ -73,4 +73,5 @@ untracked_info="#[fg=colour255 bg=colour244]"$(git_untracked_info) deletions_info="#[fg=colour255 bg=colour1]"$(gitdeletions) additions__info="#[fg=colour255 bg=colour22]"$(gitadditions) -echo "#[fg=colour255 bg=colour29]$shortened_path #[fg=colour29 bg=colour26]$SEPARATOR_RIGHT_BOLD#[fg=colour255 bg=colour26]$tmux_session_info #[fg=colour26 bg=colour39]$SEPARATOR_RIGHT_BOLD $branch_info #[fg=colour39 bg=colour22]$SEPARATOR_RIGHT_BOLD $additions__info #[fg=colour22 bg=colour1]$SEPARATOR_RIGHT_BOLD $deletions_info #[fg=colour1 bg=colour244]$SEPARATOR_RIGHT_BOLD $untracked_info #[fg=colour244 bg=colour16]$SEPARATOR_RIGHT_BOLD" +# echo "#[fg=colour255 bg=colour29]$shortened_path #[fg=colour29 bg=colour26]$SEPARATOR_RIGHT_BOLD#[fg=colour255 bg=colour26]$tmux_session_info #[fg=colour26 bg=colour39]$SEPARATOR_RIGHT_BOLD $branch_info #[fg=colour39 bg=colour22]$SEPARATOR_RIGHT_BOLD $additions__info #[fg=colour22 bg=colour1]$SEPARATOR_RIGHT_BOLD $deletions_info #[fg=colour1 bg=colour244]$SEPARATOR_RIGHT_BOLD $untracked_info #[fg=colour244 bg=colour16]$SEPARATOR_RIGHT_BOLD" +echo "#[fg=colour255 bg=colour26]$tmux_session_info #[fg=colour26 bg=colour39]$SEPARATOR_RIGHT_BOLD $branch_info #[fg=colour39 bg=colour22]$SEPARATOR_RIGHT_BOLD $additions__info #[fg=colour22 bg=colour1]$SEPARATOR_RIGHT_BOLD $deletions_info #[fg=colour1 bg=colour244]$SEPARATOR_RIGHT_BOLD $untracked_info #[fg=colour244 bg=colour16]$SEPARATOR_RIGHT_BOLD" |