1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Merge branch 'master' into surface

This commit is contained in:
Joe Groocock 2018-04-04 12:00:11 +01:00
commit 9ee742294d
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
7 changed files with 85 additions and 39 deletions

View File

@ -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

View File

@ -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

26
.config/rofi/config Normal file
View File

@ -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

View File

@ -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="\<space>"
" 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 <leader><space> :NERDTreeToggle<CR>
" FZF configurationn
map <leader><tab> :Files<CR>
" Disable mouse
set mouse=nicr
nnoremap <LeftMouse> <nop>
@ -143,7 +163,6 @@ nnoremap <RightMouse> <nop>
inoremap <C-Space> <C-x><C-o>
inoremap <C-@> <C-Space>
let mapleader="\<space>"
" Unbind arrow keys
for prefix in ['n', 'v']
for key in ['<Up>', '<Down>', '<Left>', '<Right>']
@ -231,14 +250,18 @@ if (exists("g:use_dvorak") && g:use_dvorak == 1)
\ 'x': ['tsd', 'tsD'],
\}
let NERDTreeMapOpenInTab='\t'
endif
" Save aliases.
noremap <Leader>q :wq<CR>
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 %

14
.zshrc
View File

@ -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"

View File

@ -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'

21
scripts/dock-displays Executable file
View File

@ -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