diff --git a/.Xresources b/.Xresources index 8bdd848..5dc4e6a 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: 14 -rofi.width: 40 -rofi.font: Noto Sans 18 -rofi.line-margin: 4 -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/i3/config b/.config/i3/config index 9abfb8f..ad63950 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -128,7 +128,7 @@ for_window [title="^rofi$"] floating enable new_window pixel 5 new_float none -gaps inner 11 +gaps inner 9 gaps outer 1 #smart_gaps on diff --git a/.config/rofi/config b/.config/rofi/config new file mode 100644 index 0000000..568f7df --- /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: 14 +rofi.width: 40 +rofi.font: Noto Sans 18 +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 4e016a3..36294f6 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -18,6 +18,7 @@ set smartindent set number set linebreak set autoindent +set breakindent set laststatus=2 set encoding=utf-8 set background=dark @@ -34,27 +35,34 @@ set scrolloff=6 set nojoinspaces set updatetime=500 " reduce delay from 4s default +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 set list -set listchars=eol:$,space:.,tab:>-,trail:~,extends:>,precedes:< +set listchars=eol:$,space:·,tab:>-,trail:◦,extends:▶,precedes:◀ highlight SpecialKey ctermfg=8 if exists('+colorcolumn') @@ -63,6 +71,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 @@ -89,6 +101,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() @@ -103,6 +116,7 @@ endif let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme "let g:vimtex_view_method='zathura' let g:tex_flavor='latex' +let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying autocmd FileType tex silent VimtexCompile autocmd FileType tex setlocal spell autocmd FileType tex TagbarOpen @@ -134,6 +148,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 @@ -143,7 +163,6 @@ nnoremap inoremap inoremap -let mapleader="\" " Unbind arrow keys for prefix in ['n', 'v'] for key in ['', '', '', ''] @@ -231,14 +250,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/.zshrc b/.zshrc index 4849327..5d7ca21 100644 --- a/.zshrc +++ b/.zshrc @@ -5,9 +5,10 @@ CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" ZSH_DIR="$CONFIG_DIR/zsh" ZSH_CACHE_DIR="$CONFIG_DIR/oh-my-zsh/cache" ADOTDIR="$ZSH_DIR/antigen" # Antigen directory -ANTIGEN_LOG="$ADOTDIR/log/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log" +LOG_DIR="$ZSH_DIR/log" +ANTIGEN_LOG="$LOG_DIR/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log" -mkdir -p "$ZSH_CACHE_DIR" "$ZSH_DIR" "$ADOTDIR/log" +mkdir -p "$ZSH_CACHE_DIR" "$ZSH_DIR" "$LOG_DIR" HISTFILE="$ZSH_DIR/histfile" HISTSIZE=999999 @@ -43,14 +44,9 @@ zstyle ':compinstall' filename "$HOME/.zshrc" # Load antigen & plugins -antigen_src="$ZSH_DIR/antigen.zsh" +antigen_src="$ADOTDIR/antigen.zsh" if [ ! -f "$antigen_src" ]; then - if exists curl; then - getcmd='curl -L' - else - getcmd='wget -qO-' - fi - eval $getcmd git.io/antigen > "$antigen_src" + git clone https://github.com/zsh-users/antigen.git "$ADOTDIR" fi source "$antigen_src" 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 new file mode 100755 index 0000000..421f396 --- /dev/null +++ b/scripts/dock-displays @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +SCALE=${1:-1.4} +OUTPUT=eDP1 +NWIDTH=2160 +NHEIGHT=1440 + +WIDTH="$(bc <<< "$NWIDTH / $SCALE")" # $(($NWIDTH / $SCALE)) +HEIGHT="$(bc <<< "$NHEIGHT / $SCALE")" # $(($NHEIGHT / $SCALE)) + +MODELINE=$(cvt $WIDTH $HEIGHT | sed -n 's/Modeline\s*//p' | tr -d \") +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