diff --git a/.Xresources b/.Xresources index 4cf13ec..f7c5637 100644 --- a/.Xresources +++ b/.Xresources @@ -38,7 +38,7 @@ urxvt.iso14755_52: false urxvt.perl-ext-common: default,clipboard,vtwheel,font-size urxvt.keysym.Shift-Control-C: perl:clipboard:copy urxvt.keysym.Shift-Control-V: perl:clipboard:paste -urxvt.url-launcher: /usr/bin/google-chrome-stable +urxvt.url-launcher: /usr/bin/chromium urxvt.matcher.button: 1 urxvt.keysym.C-Up: font-size:increase @@ -94,25 +94,3 @@ urxvt*colorMode: on *.color6: #10aeba *.color14: #5ddae2 - -!----------------------------- -! Rofi config - -! State: 'bg', 'fg', 'bgalt' 'hlbg', 'hlfg' -rofi.color-window: #F2383C4A, #2F343F -rofi.color-normal: #00383C4A, #D3DAE3, #00383C4A, #5294E2, #ECEFF1 -rofi.bc: #CC383C4A -rofi.bw: 5 -rofi.padding: 8 -rofi.lines: 12 -rofi.width: 40 -rofi.font: Noto Sans 14 -rofi.line-margin: 6 -rofi.sep: | -rofi.prompt: > -rofi.ssh-command: {terminal} -e "{ssh-client} {host}" -rofi.separator-style: solid - -rofi.matching: glob -rofi.tokenize: true -rofi.normal-window: true diff --git a/.config/rofi/config b/.config/rofi/config new file mode 100644 index 0000000..d563b04 --- /dev/null +++ b/.config/rofi/config @@ -0,0 +1,26 @@ +!----------------------------- +! Rofi config +!----------------------------- + +! State: 'bg', 'fg', 'bgalt' 'hlbg', 'hlfg' +rofi.color-window: #F2383C4A, #2F343F +rofi.color-normal: #00383C4A, #D3DAE3, #00383C4A, #5294E2, #ECEFF1 +rofi.bc: #CC383C4A +rofi.bw: 5 +rofi.padding: 8 +rofi.lines: 12 +rofi.width: 40 +rofi.font: Noto Sans 14 +rofi.line-margin: 6 +rofi.sep: | +rofi.prompt: > +rofi.ssh-command: {terminal} -e "{ssh-client} {host}" +rofi.separator-style: solid +rofi.kb-row-tab: Shift+Tab +rofi.kb-row-select: Tab + +rofi.matching: glob +rofi.tokenize: true +rofi.normal-window: true + +! vim: ft=xdefaults diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 9eca9ec..75f7e06 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -35,22 +35,32 @@ set scrolloff=6 set nojoinspaces set updatetime=500 " reduce delay from 4s default +" te seems like the correct shorthand, not tabe +cmap te tabedit + +let mapleader="\" + " Autosave settings function! SaveIfExist() - if @% != "" && filereadable(@%) && !&readonly + if @% != "" && filereadable(@%) && !&readonly && &modified write endif endfunction set autowrite -autocmd CursorHold,CursorHoldI,InsertLeave,FocusLost * call SaveIfExist() +autocmd CursorHold,CursorHoldI,InsertLeave,FocusGained,FocusLost * call SaveIfExist() " Search options set hlsearch set ignorecase set smartcase +set magic + +" More natural splits +set splitbelow " Horizontal split below current. +set splitright " Vertical split to right of current. " GVim settings -set guifont=Sauce\ Code\ Pro\ 10.5 +set guifont=Sauce\ Code\ Pro\ 9 set guioptions= " Whitespace highlight settings @@ -64,6 +74,10 @@ if exists('+colorcolumn') autocmd filetype c,h,cpp,hpp match ErrorMsg '\%>80v.\+' endif +" Highlight line and column of cursor +set cul cuc +highlight CursorLine cterm=NONE ctermbg=8 +highlight CursorColumn cterm=NONE ctermbg=8 " set the runtime path to include Vundle and initialize set rtp+=~/.config/vim/bundle/Vundle.vim @@ -90,6 +104,7 @@ Plugin 'chr4/nginx.vim' Plugin 'PotatoesMaster/i3-vim-syntax' Plugin 'lervag/vimtex' Plugin 'JamshedVesuna/vim-markdown-preview' +Plugin 'junegunn/fzf.vim' call vundle#end() @@ -135,6 +150,12 @@ let g:tagbar_show_linenumbers = 1 let g:tagbar_singleclick = 1 let g:tagbar_autopreview = 1 +" NERDTree configuration +map :NERDTreeToggle + +" FZF configurationn +map :Files + " Disable mouse set mouse=nicr nnoremap @@ -144,7 +165,6 @@ nnoremap inoremap inoremap -let mapleader="\" " Unbind arrow keys for prefix in ['n', 'v'] for key in ['', '', '', ''] @@ -232,14 +252,18 @@ if (exists("g:use_dvorak") && g:use_dvorak == 1) \ 'x': ['tsd', 'tsD'], \} + let NERDTreeMapOpenInTab='\t' + endif " Save aliases. -noremap q :wq com! W w com! Q q com! Wq wq com! WQ wq +com! Wqa wqa +com! WQa wqa +com! WQA wqa " Write with sudo cmap w!! w !sudo tee > /dev/null % diff --git a/aliases b/aliases index cfbd5d8..8b73914 100644 --- a/aliases +++ b/aliases @@ -58,6 +58,8 @@ alias make="make -j$(nproc)" alias dd='dd status=progress' alias env='env | sort' alias ssh="ssh -tt" +alias vim="vim --servername vim -p" +alias vi=vim alias grip='grip --user=frebib --pass=$GRIP_API_KEY' alias acme.sh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log' alias acmesh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log' diff --git a/scripts/dock-displays b/scripts/dock-displays index ac7244f..421f396 100755 --- a/scripts/dock-displays +++ b/scripts/dock-displays @@ -15,3 +15,7 @@ MODENAME=${MODELINE%% *} xrandr --newmode $MODELINE 2>/dev/null || true xrandr --addmode $OUTPUT $MODENAME 2>/dev/null || true xrandr --output $OUTPUT --mode $MODENAME + +if [ -f ~/.fehbg -a -x ~/.fehbg ]; then + ~/.fehbg +fi