# -*- mode: conf -*-
set selection-clipboard clipboard

set incremental-search true
set search-hadjust true

set scroll-page-aware true
set statusbar-home-tilde true

set synctex-editor-command 'emacsclient -c'

set show-directories false

# Theme
set default-bg '#2e3440'
set default-fg '#eceff4'
set completion-bg '#2e3440'
set completion-fg '#eceff4'
set completion-group-bg '#2e3440'
set completion-group-fg '#eceff4'
set completion-highlight-bg '#8fbcbb'
set completion-highlight-fg '#eceff4'
set inputbar-bg '#2e3440'
set inputbar-fg '#eceff4'

set highlight-active-color '#5e81ac'
set highlight-color '#8fbcbb'

set render-loading-bg '#2e3440'
set render-loading-fg '#eceff4'
set statusbar-bg '#2e3440'
set statusbar-fg '#eceff4'
set scrollbar-bg '#2e3440'
set scrollbar-fg '#eceff4'

set recolor true
set recolor-darkcolor '#eceff4'
set recolor-lightcolor '#2e3440'
set recolor-keephue
set recolor-reverse-video

set guioptions ""

# keybindings
unmap <C-c>
unmap <C-d>
unmap <C-j>
unmap <C-k>
unmap <C-r>
unmap <C-t>
unmap <C-u>
unmap <C-y>
unmap <F5>
unmap H
unmap J
unmap K
unmap L
unmap R
unmap a
unmap h
unmap j
unmap k
unmap l
unmap r
unmap s
unmap t
unmap y

map c scroll left
map C scroll full-left
map <C-c> scroll half-left
map t scroll down
map T navigate next
map <C-t> scroll half-down
map <A-t> scroll page-bottom
map s scroll up
map S navigate previous
map <C-s> scroll half-up
map <A-s> scroll page-top
map r scroll right
map R scroll full-right
map <C-r> scroll half-right

map <C-g> abort
map <A-p> print
map w adjust_window width
map W adjust_window best-fit
map <F2> rotate rotate-ccw
map <F3> rotate rotate-cw
map <F4> recolor
map <F5> reload
map <F6> jumplist backward
map <F7> jumplist forward
map <F9> change_mode index
map <F10> change_mode presentation

# Presentation mode
unmap presentation <F5>
map presentation <F10> change_mode normal

# Fullscreen mode
unmap fullscreen J
unmap fullscreen K
map fullscreen s navigate previous
map fullscreen t navigate next
map fullscreen <F11> change_mode normal

# Index mode
unmap index h
unmap index H
unmap index j
unmap index k
unmap index l
unmap index L
map index c navigate_index collapse
map index C navigate_index collapse-al
map index r navigate_index expand
map index R navigate_index expand-all
map index s navigate_index up
map index t navigate_index down
map fullscreen <F9> change_mode normal
