Update some scripts, chnages to vimrc

This commit is contained in:
natemaia 2018-07-14 22:11:15 -07:00
parent 47cf12153b
commit e0a6b713ba
3 changed files with 45 additions and 19 deletions

View File

@ -3,6 +3,7 @@
" Arch defaults " Arch defaults
runtime! archlinux.vim runtime! archlinux.vim
" additional settings
set modeline " enable vim modelines set modeline " enable vim modelines
set clipboard^=unnamedplus " system clipboard (requires +clipboard) set clipboard^=unnamedplus " system clipboard (requires +clipboard)
set number " enable line numbers set number " enable line numbers
@ -13,12 +14,15 @@ set softtabstop=4 " spaces to enter for each tab
set shiftwidth=4 " amount of spaces for indentation set shiftwidth=4 " amount of spaces for indentation
set shortmess+=aAcIws " Hide or shorten certain messages set shortmess+=aAcIws " Hide or shorten certain messages
let g:netrw_altv = 1
let g:netrw_liststyle = 3
let g:netrw_browse_split = 3
" ------ leader mapping ------ " ------ leader mapping ------
let g:mapleader = ',' let g:mapleader = ','
map <Space> , map <Space> ,
" ------ enable additional features ------ " ------ enable additional features ------
" enable mouse " enable mouse
@ -32,14 +36,19 @@ endif
syntax enable syntax enable
if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256 if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256
let g:jinx_colors = 'night' " night or day (shift-t to change on the fly) let g:jinx_colors = 'night' " night or day (shift-t to change on the fly)
" true color in the terminal try
" true colors in the terminal
set termguicolors set termguicolors
colorscheme jinx colorscheme jinx
catch
set nocursorline
set notermguicolors
colorscheme evening
endtry
" fix true color in some terminals (nvim doesn't have this issue) " fix true colors in some terminals (neovim doesn't seem to have this issue)
if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm') if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm')
let $TERM = 'xterm-256color' let $TERM = 'xterm-256color'
let &term = 'xterm-256color' let &term = 'xterm-256color'
@ -51,16 +60,26 @@ else
endif endif
" change cursor shape for different editing modes (nvim does this by default) " change cursor shape for different editing modes (nvim does this by default)
if !has('nvim') && exists('$TMUX') if !has('nvim')
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\" let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\"
let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\" let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\" let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
elseif !has('nvim') else
let &t_SI = "\e[6 q" let &t_SI = "\e[6 q"
let &t_SR = "\e[4 q" let &t_SR = "\e[4 q"
let &t_EI = "\e[2 q" let &t_EI = "\e[2 q"
endif
endif endif
set linebreak
set breakindent
set list listchars=tab:>>,trail:~
if has('multi_byte')
set listchars=tab:»»,trail:•
set fillchars=vert:┃ showbreak=
endif
" ------ basic maps ------ " ------ basic maps ------

View File

@ -5,9 +5,10 @@ VER="0.3"
usage() { usage() {
cat <<- EOF cat <<- EOF
USAGE: $NAME [OPTIONS]
OPTIONS: USAGE: $NAME [OPTIONS]
OPTIONS:
-h,--help Display this message -h,--help Display this message

View File

@ -1,23 +1,29 @@
#!/usr/bin/env bash #!/usr/bin/env bash
Name=$(basename "$0") Name=$(basename "$0")
Version="0.2" Version="0.3"
_usage() { _usage() {
cat <<EOF cat <<EOF
USAGE: USAGE:
$Name [OPTIONS] [ADDITIONAL] $Name [OPTIONS [ADDITIONAL]]
OPTIONS: OPTIONS:
-h,--help Display this message -h,--help Display this message
-v,--version Display script version -v,--version Display script version
-p,--polybar Toggle the configured polybar session, no additional options
-p,--polybar Toggle the configured polybar session, NO additional options
-c,--compton Toggle compton or daemon monitoring icon, can use toggle option -c,--compton Toggle compton or daemon monitoring icon, can use toggle option
-r,--redshift Toggle redshift or daemon monitoring icon, can use toggle option -r,--redshift Toggle redshift or daemon monitoring icon, can use toggle option
-f,--caffeine Toggle caffeine or daemon monitoring icon, can use toggle option -f,--caffeine Toggle caffeine or daemon monitoring icon, can use toggle option
ADDITIONAL: ADDITIONAL:
-tg,--toggle Toggle the program off/on, without this flag a monitor process will be started -tg,--toggle Toggle the program off/on, without this flag a monitor process will be started
EOF EOF