Browse Source

bashrc, zshrc: some syntax altered; tmux.conf, xresources: some tweaks; vimplugrc: get rid of some plugins, bring back gvim

master
Von Random 2 weeks ago
parent
commit
ea9ede6627
5 changed files with 30 additions and 39 deletions
  1. +2
    -10
      bashrc
  2. +2
    -1
      tmux.conf
  3. +12
    -9
      vimplugrc
  4. +1
    -1
      xresources
  5. +13
    -18
      zshrc

+ 2
- 10
bashrc View File

@ -22,8 +22,8 @@ prompt_command() {
esac
}
((UID)) && ps_clr=4 || ps_clr=1
# just a colored version of [ $USER@$HOSTNAME:~ ]
PS1='\[\e[47;30m\][ \[\e[3'"$ps_clr"'m\]\u\[\e[30m\] \h:\[\e[32m\w\[\e[30m\] ]\[\e[0m\]\n\$ '
# just a colored version of [ $USER $HOSTNAME:$CWD ]
printf -v PS1 '\\[\\e[0m\\][ \\[\\e[3%sm\\]\\u\\[\\e[0m\\] \\h:\\[\\e[32m\\w\\[\\e[0m\\] ]\n\\$ ' $ps_clr
unset ps_clr
PROMPT_COMMAND=prompt_command
# }}}
@ -92,14 +92,6 @@ gdf() {
gdiff "$@"
fi
}
# more compatible TERM for ssh sessions
s() {
if termcompat=$(command -v termcompat); then
"$termcompat" ssh "$@"
else
ssh "$@"
fi
}
# we want to see exit code on error (it also has to be the last entry here)
trap_msg='\e[31m>>\e[0m exit \e[31m%s\e[0m\n'
trap 'printf "$trap_msg" "$?" >&2' ERR


+ 2
- 1
tmux.conf View File

@ -11,9 +11,10 @@ bind -T resize -r h resize-pane -L 5
bind -T resize -r j resize-pane -D 5
bind -T resize -r k resize-pane -U 5
bind -T resize -r l resize-pane -R 5
bind p command-prompt -p "ssh:" "new-session -As 'ssh'; new-window -n '%1' 'termcompat ssh %%'"
bind p command-prompt -p "ssh:" "new-window 's %%'"
bind t command-prompt -p "attach pane to:" "join-pane -t '%%'"
bind y command-prompt break-pane
bind N new-session
bind -n M-w next-window
bind -n M-q previous-window
set -g prefix C-g


+ 12
- 9
vimplugrc View File

@ -9,25 +9,21 @@ silent!call plug#begin(plugdir)
Plug 'junegunn/vim-plug'
" general plugins
"Plug 'sheerun/vim-polyglot'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'lifepillar/vim-solarized8'
Plug 'lifepillar/vim-gruvbox8'
Plug 'mhinz/vim-signify'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rsi'
Plug 'tpope/vim-vinegar'
Plug 'davidhalter/jedi-vim', {'for': 'python'}
Plug 'w0rp/ale', {'for': ['python', 'sh']}
Plug 'w0rp/ale', {'for': ['sh']}
Plug 'vimwiki/vimwiki', {'on': 'VimwikiIndex'}
call plug#end()
" ale
let g:ale_python_flake8_executable = 'python2'
" easy-align
xmap <Leader>a <Plug>(EasyAlign)
nmap <Leader>a <Plug>(EasyAlign)
@ -39,11 +35,18 @@ nmap <Leader>fb :Buffers<CR>
nmap <Leader>fl :Lines<CR>
nmap <Leader>ft :Filetypes<CR>
" vimwiki
let g:vimwiki_list = [{'path': '$HOME/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
" colorschemes
if $TERM =~ '^tmux' || $TERM =~ '^xterm' || $TERM =~ '^st'
if has('gui_running')
set guifont=Fantasque\ Sans\ Mono\ 14
set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
set bg=dark guiheadroom=0 guioptions=aei mouse=a
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
colorscheme gruvbox8
elseif $TERM =~ '^tmux' || $TERM =~ '^xterm' || $TERM =~ '^st'
set bg=dark tgc
let g:gruvbox_filetype_hi_groups = 1
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"


+ 1
- 1
xresources View File

@ -7,7 +7,7 @@ Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
#define TERMINUS -xos4-terminus-bold-*-*-*-14-*-*-*-*-*-iso10646-1
#define TERMINUS -xos4-terminus-bold-*-*-*-18-*-*-*-*-*-iso10646-1
#define TERMINUS_SMALL -xos4-terminus-*-*-*-*-12-*-*-*-*-*-iso10646-1
#define FONT xft:Fantasque Sans Mono:12


+ 13
- 18
zshrc View File

@ -71,13 +71,16 @@ bindkey -s '^j' '^atime ^m' # ctrl + j
bindkey '^x^e' edit-command-line
# }}}
# {{{ prompt
prompt_state_file=/tmp/zsh_gitstatus_$$.tmp
prompt_ln1='%K{white}%F{black}[ %F{%(!.red.blue)}%n%F{black} %m:%F{green}%d%F{black} '
prompt_ln2=$']%f%k\n> '
PROMPT=$prompt_ln1$prompt_ln2
PROMPT2='%K{white}%F{black}[ %_ ]%f%k '
PROMPT3='%K{white}%F{black}[ ?# ]%f%k '
PROMPT4='%K{white}%F{black}[ +%N:%i ]%f%k '
prompt_fmt='%%k%%f[ %s %s:%s %s]\n> '
prompt_user='%F{%(!.red.blue)}%n%f'
prompt_host='%m'
prompt_cwd='%F{green}%d%f'
prompt_git_fmt='\ue0a0 %s %s%%f '
prompt_state_file=/run/user/$UID/zsh_gitstatus_$$.tmp
PROMPT=$'%k%f[ %n %m:%d ]\n> '
PROMPT2='%k%f[ %_ ] '
PROMPT3='%k%f[ ?# ] '
PROMPT4='%k%f[ +%N:%i ] '
precmd.title() {
case $TERM in
(screen*) printf '\033k%s\033\' ${HOST%%.*};;
@ -122,10 +125,10 @@ precmd.git() {
(( unmerged_count )) && git_status+=%F{cyan}*$unmerged_count
[[ -z $git_status ]] && git_status=%F{green}ok
printf '\ue0a0 %s %s%%F{black} ' $branch_status $git_status > $prompt_state_file
printf $prompt_git_fmt $branch_status $git_status > $prompt_state_file
}
precmd.prompt() {
PROMPT=$prompt_ln1$1$prompt_ln2
printf -v PROMPT $prompt_fmt $prompt_user $prompt_host $prompt_cwd $1
}
precmd.git_update() {
precmd.git
@ -137,7 +140,7 @@ precmd() {
precmd.prompt $'\ue0a0 ... '
precmd.git_update &!
else
precmd.prompt
precmd.prompt ''
fi
}
TRAPUSR1() {
@ -181,14 +184,6 @@ scr() { command screen sudo -Es }
# vim
vi() { $(whence -p nvim || whence -p vim || return 1) $@ }
vim() { vi $@ }
# termcompat
s() {
[[ -n $TMUX ]] && /usr/bin/tmux renamew $1
$(whence -p termcompat||return 0) ssh $@
[[ -n $TMUX ]] && /usr/bin/tmux renamew $HOST
}
# }}}
# {{{ plugins
# grc


Loading…
Cancel
Save