Update user home config files

This commit is contained in:
natemaia 2018-08-18 13:16:42 -07:00
parent fee0d19036
commit bc77924804
8 changed files with 176 additions and 233 deletions

View File

@ -4,21 +4,21 @@
*.cursorColor: #707880
*.color0: #1c2023
*.color1: #a54242
*.color2: #8c9440
*.color3: #de935f
*.color4: #5f819d
*.color5: #85678f
*.color6: #5e8d87
*.color1: #bf616a
*.color2: #a3be8c
*.color3: #ebcb8b
*.color4: #8fa1b3
*.color5: #b48ead
*.color6: #96b5b4
*.color7: #E1E1E1
*.color8: #1c2023
*.color9: #cc6666
*.color10: #b5bd68
*.color11: #f0c674
*.color12: #81a2be
*.color13: #b294bb
*.color14: #8abeb7
*.color15: #c5c8c6
*.color9: #bf616a
*.color10: #a3be8c
*.color11: #ebcb8b
*.color12: #8fa1b3
*.color13: #b48ead
*.color14: #96b5b4
*.color15: #c0c5ce
! Rofi
rofi.font: DejaVu Sans Mono 12
@ -33,13 +33,13 @@ rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
! xterm
xterm*termName: xterm-256color
xterm*font: DejaVu Sans Mono
xterm*faceName: DejaVu Sans Mono:size=11:antialias=false
xterm*faceName: DejaVu Sans Mono:size=11
xterm*loginShell: true
xterm*vt100*geometry: 90x34
xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*termName: xterm-256color
xterm*eightBitInput: false
! URxvt
@ -62,7 +62,7 @@ URxvt.keysym.m-v: perl:clipboard:paste
URxvt.urlLauncher: exo-open
URxvt.underlineURLs: true
URxvt.urlButton: 1
URxvt.geometry: 90x30
URxvt.geometry: 90x34
URxvt.tabbed.tabbar-fg: 4
URxvt.tabbed.tabbar-bg: 16
URxvt.tabbed.tab-fg: 15
@ -72,9 +72,9 @@ URxvt*buffered: false
! UXTerm
UXTerm*termName: xterm-256color
UXTerm*cursorColor: white
UXTerm*VT100.geometry: 90x30
UXTerm*VT100.geometry: 90x34
UXTerm*font: DejaVu Sans Mono
UXTerm*faceSize: 10
UXTerm*faceSize: 11
UXTerm*dynamicColors: true
UXTerm*utf8: 2
UXTerm*eightBitInput: true

View File

@ -12,9 +12,6 @@ nitrogen --restore &
# launch compton
al-compositor --start &
# panel
al-polybar-session &
# xfce settings
xfsettingsd &
@ -28,6 +25,9 @@ gnome-keyring-daemon --start --components=pkcs11 &
ksuperkey -e 'Super_L=Alt_L|F1' &
ksuperkey -e 'Super_R=Alt_L|F1' &
# panel
al-polybar-session &
# Set some bsp specific stuff
bspc monitor -d I II III IV V VI VII VIII IX X

View File

@ -28,7 +28,7 @@ gaps inner 15
gaps outer 5
# font
font pango:DejaVu Sans Mono 10
font pango:DejaVu Sans Mono 11
# $Mod = Super or Alt?
set $Mod Mod4

View File

@ -17,17 +17,17 @@ ksuperkey -e 'Super_R=Alt_L|F1' &
# restore wallpaper
nitrogen --restore &
# start panel
al-polybar-session &
# openbox autostart
# run the ob-autostart GUI configured commands
ob-autostart -d &
# Required for xfce settings to work
# required for xfce settings to work
xfsettingsd &
# Side panel shortcuts for file managers
# side panel shortcuts for file managers
xdg-user-dirs-gtk-update &
# start the panel
al-polybar-session &
# start conky
sleep 1; al-conky-session --autostart &

View File

@ -159,7 +159,6 @@
</finalactions>
</action>
</keybind>
<!-- Window Tiling: Snap feature -->
<keybind key="W-Left">
<action name="UnmaximizeFull"/>
<action name="MaximizeVert"/>
@ -176,135 +175,6 @@
</action>
<action name="MoveToEdgeEast"/>
</keybind>
<keybind key="A-F">
<action name="MaximizeFull"/>
</keybind>
<keybind key="A-S-F">
<action name="UnmaximizeFull"/>
</keybind>
<keybind key="A-S-k">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>15</y>
<height>96%</height>
<width>47%</width>
</action>
</keybind>
<keybind key="A-S-j">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
<height>96%</height>
<width>47%</width>
</action>
</keybind>
<!-- Top right-->
<keybind key="W-k">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>15</y>
</action>
</keybind>
<!-- Top left-->
<keybind key="W-h">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
</action>
</keybind>
<!-- Bottom left-->
<keybind key="W-j">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>-15</y>
</action>
</keybind>
<!-- Bottom right-->
<keybind key="W-l">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-15</x>
<y>-15</y>
</action>
</keybind>
<keybind key="A-z">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>15</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<keybind key="A-x">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>34%</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<keybind key="A-c">
<action name="Unmaximize"/>
<action name="MoveResizeTo">
<x>-17</x>
<y>15</y>
<height>97%</height>
<width>32%</width>
</action>
</keybind>
<!-- Move -->
<keybind key="W-Right">
<action name="MoveRelative">
<x>20</x>
<y>0</y>
</action>
</keybind>
<keybind key="W-Left">
<action name="MoveRelative">
<x>-20</x>
<y>0</y>
</action>
</keybind>
<keybind key="W-Up">
<action name="MoveRelative">
<x>0</x>
<y>-20</y>
</action>
</keybind>
<keybind key="W-Down">
<action name="MoveRelative">
<x>0</x>
<y>20</y>
</action>
</keybind>
<!-- Resize -->
<keybind key="W-S-Right">
<action name="ResizeRelative">
<right>20</right>
</action>
</keybind>
<keybind key="W-S-Left">
<action name="ResizeRelative">
<right>-20</right>
</action>
</keybind>
<keybind key="W-S-Down">
<action name="ResizeRelative">
<bottom>20</bottom>
</action>
</keybind>
<keybind key="W-S-Up">
<action name="ResizeRelative">
<bottom>-20</bottom>
</action>
</keybind>
<keybind key="S-W-Left">
<action name="SendToDesktopLeft"/>
</keybind>
@ -387,7 +257,7 @@
<command>exo-open --launch TerminalEmulator</command>
</action>
</keybind>
<keybind key="W-Enter">
<keybind key="W-Return">
<action name="Execute">
<command>exo-open --launch TerminalEmulator</command>
</action>
@ -448,7 +318,7 @@
<keybind key="C-S-BackSpace">
<action name="Restart"/>
</keybind>
<keybind key="C-S-Enter">
<keybind key="C-S-Return">
<action name="Reconfigure"/>
</keybind>
<keybind key="W-Escape">
@ -480,7 +350,7 @@
<keybind key="A-m">
<action name="Move"/>
</keybind>
<keybind key="S-W-q">
<keybind key="W-q">
<action name="Close"/>
</keybind>
<keybind key="W-space">
@ -653,7 +523,6 @@
<maximizedvertical>yes</maximizedvertical>
<then>
<action name="Unmaximize"/>
<direction>vertical</direction>
<action name="MoveResizeTo">
<x>center</x>
<y>current</y>

View File

@ -5,6 +5,8 @@ runtime! archlinux.vim
" additional settings
set modeline " enable vim modelines
set hlsearch " highlight search items
set incsearch " searches are performed as you type
set clipboard^=unnamedplus " system clipboard (requires +clipboard)
set number " enable line numbers
set confirm " ask confirmation for some things, like save before quit, etc.
@ -36,15 +38,11 @@ endif
syntax enable
if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256
let g:jinx_colors = 'night' " night or day (shift-t to change on the fly)
set termguicolors " true colors in the terminal
try
" true colors in the terminal
set termguicolors
let g:jinx_colors = 'night' " night or day, 'T' to change on the fly
colorscheme jinx
catch
set nocursorline
set notermguicolors
colorscheme evening
endtry
@ -54,8 +52,6 @@ if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256
let &term = 'xterm-256color'
endif
else
set nocursorline
set notermguicolors
try
colorscheme jinx
catch
@ -63,7 +59,7 @@ else
endtry
endif
" change cursor shape for different editing modes (nvim does this by default)
" change cursor shape for different editing modes, neovim does this by default
if !has('nvim')
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\"
@ -76,20 +72,31 @@ if !has('nvim')
endif
endif
set linebreak
set breakindent
set list listchars=tab:>>,trail:~
set linebreak " wrap lines at full words rather than the last character to fit
set breakindent " wrapped lines match the same indent level
if has('multi_byte')
set list listchars=tab:>>,trail:~
if has('multi_byte') && $DISPLAY !=? ''
set listchars=tab:»»,trail:•
set fillchars=vert:┃ showbreak=
endif
" ------ commands ------
command! D Explore
command! R call <SID>ranger()
command! Q call <SID>quitbuffer()
command! -nargs=1 B :call <SID>bufferselect("<args>")
command! W execute 'silent w !sudo tee % >/dev/null' | edit!
" ------ basic maps ------
" open ranger as a file chooser using the function below
nnoremap <leader>r :call <SID>ranger()<CR>
" match string to switch buffer
nnoremap <Leader>b :let b:buf = input('Match: ')<Bar>call <SID>bufferselect(b:buf)<CR>
" paste while in insert mode
inoremap <silent><C-v> <Esc>:set paste<CR>a<C-r>+<Esc>:set nopaste<CR>a
@ -114,16 +121,42 @@ vnoremap < <gv
nnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
nnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
" open a terminal in $PWD
nnoremap <silent> <Leader>tt :terminal<CR>
" tab control
nnoremap <silent> <M-j> :tabmove -1<CR>
nnoremap <silent> <M-k> :tabmove +1<CR>
nnoremap <silent> <Leader>te :tabnew<CR>
nnoremap <silent> <Leader>tn :tabnext<CR>
nnoremap <silent> <Leader>tf :tabfirst<CR>
nnoremap <silent> <Leader>tp :tabprevious<CR>
" close current buffer and/or tab
nnoremap <silent> <Leader>q :B<CR>:silent tabclose<CR>gT
nnoremap <silent> <Leader>tl :execute "tabn ".g:lasttab<CR>
" open a new tab in the current directory with netrw
nnoremap <silent> <Leader>- :tabedit <C-R>=expand("%:p:h")<CR><CR>
" split the window vertically and horizontally
nnoremap _ <C-W>s<C-W><Down>
nnoremap <Bar> <C-W>v<C-W><Right>
" ------ autocmd ------
let g:lasttab = 1
augroup save_last_tab
autocmd!
autocmd TabLeave * let g:lasttab = tabpagenr()
augroup END
" Reload changes if file changed outside of vim requires autoread
augroup load_changed_file
autocmd!
autocmd FocusGained,BufEnter * if mode() !=? 'c' | checktime | endif
autocmd FileChangedShellPost * echo "Changes loaded from file"
autocmd FileChangedShellPost * echo "Changes loaded from source file"
augroup END
" when quitting a file, save the cursor position
@ -132,33 +165,38 @@ augroup save_cursor_position
autocmd BufReadPost * call setpos(".", getpos("'\""))
augroup END
" enable cursorline in the currently active window
augroup cursorline
autocmd!
autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline
augroup END
" when not running in a console or a terminal that doesn't support 256 colors
" enable cursorline in the currently active window and disable it in inactive ones
if $DISPLAY !=? '' && &t_Co == 256
augroup cursorline
autocmd!
autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline
augroup END
endif
" ------ adv maps ------
" toggle line numbers
" toggle line numbers, nn (no number)
nnoremap <silent> <Leader>nn
\ :if &number <Bar>
\ set nonumber
\ set nonumber
\ <Bar> echo 'Line numbers disabled'
\ <Bar> else <Bar>
\ set number
\ set number
\ <Bar> echo 'Line numbers enabled'
\ <Bar> endif<CR>
" strip trailing whitespace
" strip trailing whitespace, ss (strip space)
nnoremap <silent> <Leader>ss
\ :let _p = getpos(".") <Bar>
\ let _s = (@/ != '') ? @/ : '' <Bar>
\ :let b:_p = getpos(".") <Bar>
\ let b:_s = (@/ != '') ? @/ : '' <Bar>
\ %s/\s\+$//e <Bar>
\ let @/ = _s <Bar>
\ let @/ = b:_s <Bar>
\ nohlsearch <Bar>
\ unlet _s <Bar>
\ call setpos('.', _p) <Bar>
\ unlet _p <CR>
\ unlet b:_s <Bar>
\ call setpos('.', b:_p) <Bar>
\ unlet b:_p <CR>
" global replace
vnoremap <Leader>sw "hy
@ -190,17 +228,20 @@ nnoremap <Leader>cw
\ unlet b:sub <Bar>
\ endif <CR>
" highlight long lines
let w:longlines = matchadd('ColorColumn', '\%'.&tw.'v', &tw)
" highlight long lines, ll (long lines)
let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth)
nnoremap <silent> <Leader>ll
\ :if exists('w:longlines') <Bar>
\ silent! call matchdelete(w:longlines) <Bar>
\ unlet w:longlines <Bar>
\ echo 'Long line highlighting disabled'
\ <Bar> unlet w:longlines <Bar>
\ elseif &textwidth > 0 <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) <Bar>
\ else <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%80v', 80) <Bar>
\ endif <CR>
\ echo 'Long line highlighting enabled'
\ <Bar> else <Bar>
\ let w:longlines = matchadd('ColorColumn', '\%80v', 81) <Bar>
\ echo 'Long line highlighting enabled'
\ <Bar> endif <CR>
" local keyword jump
nnoremap <Leader>fw
@ -211,10 +252,62 @@ nnoremap <Leader>fw
\ endif <CR>
" quit the current buffer and switch to the next
" without this vim will leave you on an empty buffer after quiting the current
function! <SID>quitbuffer() abort
let l:bf = bufnr('%')
let l:pb = bufnr('#')
if buflisted(l:pb)
buffer #
else
bnext
endif
if bufnr('%') == l:bf
new
endif
if buflisted(l:bf)
execute('bdelete! ' . l:bf)
endif
endfunction
" switch active buffer based on pattern matching
" if more than one match is found then list the matches to choose from
function! <SID>bufferselect(pattern) abort
let l:bufcount = bufnr('$')
let l:currbufnr = 1
let l:nummatches = 0
let l:matchingbufnr = 0
" walk the buffer count
while l:currbufnr <= l:bufcount
if (bufexists(l:currbufnr))
let l:currbufname = bufname(l:currbufnr)
if (match(l:currbufname, a:pattern) > -1)
echo l:currbufnr.': '.bufname(l:currbufnr)
let l:nummatches += 1
let l:matchingbufnr = l:currbufnr
endif
endif
let l:currbufnr += 1
endwhile
" only one match
if (l:nummatches == 1)
execute ':buffer '.l:matchingbufnr
elseif (l:nummatches > 1)
" more than one match
let l:desiredbufnr = input('Enter buffer number: ')
if (strlen(l:desiredbufnr) != 0)
execute ':buffer '.l:desiredbufnr
endif
else
echoerr 'No matching buffers'
endif
endfunction
" open ranger as a file chooser
function! <SID>ranger()
let l:temp = tempname()
execute 'silent !st -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
execute 'silent !xterm -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
if !filereadable(temp)
redraw!
return

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
NAME=$(basename "$0")
VER="0.3"
VER="0.4"
usage() {
cat <<- EOF
@ -33,14 +33,8 @@ EOF
for arg in "$@"; do
case $arg in
-h|--help)
usage
exit 0
;;
-v|--version)
echo -e "$NAME -- Version $VER"
exit 0
;;
-h|--help) usage; exit 0 ;;
-v|--version) echo -e "$NAME -- Version $VER"; exit 0 ;;
-r|--run)
rofi -modi run,drun -show drun -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar \
@ -50,26 +44,24 @@ for arg in "$@"; do
rofi -modi window -show window -hide-scrollbar -padding 50 -line-padding 4
;;
-q|--qalculate)
! hash qalc &>/dev/null && { echo "Requires 'libqalculate' installed"; exit 1; }
hash qalc &>/dev/null || { echo "Requires 'libqalculate' installed"; exit 1; }
rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \
-show "calc:qalc +u8 -nocurrencies" -line-padding 4 \
-hide-scrollbar
;;
-c|--clipboard)
! hash greenclip &>/dev/null && { echo "Requires 'greenclip' installed"; exit 1; }
hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; }
rofi -modi "clipboard:greenclip print" -padding 50 \
-line-padding 4 -show "clipboard:greenclip print" \
-hide-scrollbar
;;
-b|--browser)
! hash surfraw &>/dev/null && { echo "Requires 'surfraw' installed"; exit 1; }
hash surfraw &>/dev/null || { echo "Requires 'surfraw' installed"; exit 1; }
surfraw -browser="$BROWSER" $(sr -elvi |
awk -F'-' '{print $1}' |
sed '/:/d' |
awk '{$1=$1};1' |
surfraw -browser="$BROWSER" $(sr -elvi | awk -F'-' '{print $1}' |
sed '/:/d' | awk '{$1=$1};1' |
rofi -hide-scrollbar -kb-row-select 'Tab' \
-kb-row-tab 'Control+space' -dmenu \
-mesg 'Tab for Autocomplete' -i -p 'Web Search' \

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
NAME=$(basename "$0")
VER="0.3"
VER="0.4"
usage() {
cat <<- EOF
@ -37,9 +37,8 @@ toggle_polybar() {
fi
}
toggle_compton() {
if (( $opt == 1 )); then
if (( opt == 1 )); then
if [[ $(pidof compton) ]]; then
al-compositor --stop
else
@ -59,9 +58,8 @@ toggle_compton() {
done
}
toggle_redshift() {
if (( $opt == 1 )); then
if (( opt == 1 )); then
if [[ $(pidof redshift) ]]; then
pkill redshift
else
@ -87,7 +85,6 @@ toggle_redshift() {
done
}
toggle_caffeine() {
if (( $opt == 1 )); then
if [[ $(pidof caffeine) ]]; then
@ -109,18 +106,11 @@ toggle_caffeine() {
done
}
# Catch command line options
case $1 in
-h|--help)
usage
;;
-v|--version)
echo -e "$NAME -- Version $VER"
;;
-p|--polybar)
toggle_polybar
;;
-h|--help) usage ;;
-v|--version) echo -e "$NAME -- Version $VER" ;;
-p|--polybar) toggle_polybar ;;
-c|--compton)
[[ $2 =~ (-t|--toggle) ]] && opt=1
toggle_compton
@ -133,8 +123,7 @@ case $1 in
[[ $2 =~ (-t|--toggle) ]] && opt=1
toggle_caffeine
;;
*)
echo -e "Option does not exist: $1" && usage && exit 1
*) echo -e "Option does not exist: $1" && usage && exit 1
esac
exit 0