Added (what I think are) all my dotfiles

Also, not sure why there was a license before.
This commit is contained in:
Alexander Schmidt 2016-09-21 19:36:01 -05:00
parent 3d37024fde
commit 6a7afd22e4
35 changed files with 1176 additions and 290 deletions

67
.Xresources Executable file
View File

@ -0,0 +1,67 @@
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
URxvt.font: xft:Roboto Mono:style=regular:size=10:antialias=true:hinting=hintfull
URxvt.boldFont: xft:Roboto Mono:stlye=bold:size=10:antialias=true:hinting=hintfull
URxvt.skipBuiltinGlyphs: true
URxvt.secondaryScreen: true
URxvt.secondaryScroll: false
URxvt.iso14755: false
URxvt.iso14755_52: false
URxvt.scrollBar: false
URxvt.scrollTtyOutput: false
URxvt.scrollWithBuffer: true
URxvt.scrollTtyKeypress: true
URxvt.cursorBlink: true
URxvt.urgentOnBell: true
URxvt.buffered: true
URxvt.saveLines: 1000
URxvt.depth: 32
! special
URxvt.foreground: #c5c8c6
URxvt.background: #1d1f21
URxvt.cursorColor: #c5c8c6
! black
URxvt.color0: #1d1f21
URxvt.color8: #969896
! red
URxvt.color1: #cc6666
URxvt.color9: #cc6666
! green
URxvt.color2: #b5bd68
URxvt.color10: #b5bd68
! yellow
URxvt.color3: #f0c674
URxvt.color11: #f0c674
! blue
URxvt.color4: #81a2be
URxvt.color12: #81a2be
! magenta
URxvt.color5: #b294bb
URxvt.color13: #b294bb
! cyan
URxvt.color6: #8abeb7
URxvt.color14: #8abeb7
! white
URxvt.color7: #c5c8c6
URxvt.color15: #ffffff
.colorIT: #87af5f
.colorBD: #d7d7d7
.colorUL: #87afd7

28
.config/cava/config Normal file
View File

@ -0,0 +1,28 @@
[general]
autosens = 1
bars = 0
bar_width = 3
bar_spacing = 1
[input]
method = fifo
source = /tmp/mpd.fifo
[output]
style = stereo
[color]
foreground = red
[smoothing]
# integral = 0.7
# monstercat = 1
# gravity = 1
# ignore = 0
[eq]
# 1 = 1 # bass
# 2 = 1
# 3 = 1 # midtone
# 4 = 1
# 5 = 1 # treble

28
.config/mpd/mpd.conf Normal file
View File

@ -0,0 +1,28 @@
music_directory "~/media/music"
playlist_directory "~/.config/mpd/playlists"
pid_file "~/.config/mpd/pid"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
db_file "~/.config/mpd/database"
log_file "~/.config/mpd/log"
restore_paused "yes"
# outputs
audio_output {
type "pulse"
name "PulseAudio"
mixer_type "software"
# use the equalizer+bs2b sink instead of defaul;
sink "crossfeed"
}
# output for ncmpcpp visualizer
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}

58
.config/ncmpcpp/config Normal file
View File

@ -0,0 +1,58 @@
# TODO: figure out what half this crap does (I forgot) and
# reconfig/remove/reorganize.
ncmpcpp_directory = ~/.config/ncmpcpp
mpd_host = localhost
mpd_port = 6600
mpd_connection_timeout = 5
mpd_music_dir = ~/media/music
mpd_crossfade_time = 0
visualizer_fifo_path = /tmp/mpd.fifo
visualizer_output_name = my_fifo
visualizer_in_stereo = yes
visualizer_sample_multiplier = .8
visualizer_sync_interval = 15
visualizer_type = spectrum
visualizer_look = -+
visualizer_color = blue, cyan, green, yellow, magenta, red
song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
song_library_format = {%n - }{%t}|{%f}
now_playing_suffix = $/b
song_columns_list_format = (20)[red]{a} (6f)[green]{NE} (50)[blue]{t|f:Title} (20)[yellow]{b} (7f)[magenta]{l}
browser_display_mode = columns
search_engine_display_mode = columns
playlist_editor_display_mode = columns
incremental_seeking = yes
autocenter_mode = yes
centered_cursor = yes
progressbar_boldness = yes
user_interface = classic
header_visibility = yes
statusbar_visibility = yes
titles_visibility = yes
header_text_scrolling = yes
display_volume_level = yes
display_bitrate = yes
mouse_support = no
colors_enabled = yes
header_window_color = white
volume_color = green
state_line_color = red
main_window_color = magenta
color1 = green
color2 = red
main_window_highlight_color = green
progressbar_color = black
progressbar_elapsed_color = green
statusbar_color = green
alternative_ui_separator_color = black
active_column_color = red
window_border_color = magenta
active_window_border = green
# vim: ft=conf

300
.config/nvim/init.vim Normal file
View File

@ -0,0 +1,300 @@
" I'm in the (slow) process of refactoring this, so it's a bit of a mess.
" What I plan to do is have it detect both what platform it's running on
" (windows, *nix, etc) and which version/fork of vim is being used
" (vim 7.x, vim 8.x, neovim) and use those to configure/disable/modify
" features for that specific platform. I'd also like to organize it a bit,
" possibly splitting up related functionality into separate files so it
" can be a bit more modular or at the very least, somewhat organized.
" determine the operating system vim is running on
if !exists("g:platform")
if has("win32") || has("win64")
let g:platform='windows'
else
let g:platform = tolower(substitute(system('uname'), '\n', '', ''))
endif
endif
" plugins
call plug#begin('~/.config/nvim/plugged')
Plug 'chriskempson/base16-vim'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-git'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'mattn/emmet-vim', { 'for': ['php','html','css','javascript'] }
Plug 'godlygeek/tabular', { 'on': 'Tab' }
Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' }
Plug 'deris/vim-shot-f'
Plug 'sheerun/vim-polyglot'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tacahiroy/ctrlp-funky'
Plug 'FelikZ/ctrlp-py-matcher'
Plug 'editorconfig/editorconfig-vim'
Plug 'itchyny/lightline.vim'
Plug 'daviesjamie/vim-base16-lightline'
if executable("tmux")
Plug 'edkolev/tmuxline.vim'
endif
Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] }
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" latex
Plug 'lervag/vimtex', { 'for': 'tex' }
" pandoc markdown
Plug 'vim-pandoc/vim-pandoc', { 'for': ['markdown'] }
Plug 'vim-pandoc/vim-pandoc-syntax', { 'for': ['markdown'] }
Plug 'junegunn/goyo.vim', { 'for': ['markdown'] }
" haskell
Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
if g:platform ==? "linux"
Plug 'rhysd/vim-clang-format'
endif
" doesn't work so well for me on Windows
if g:platform ==? "linux"
Plug 'Valloric/YouCompleteMe' " ,
Plug 'shawncplus/phpcomplete.vim', { 'for': ['php','html'] }
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
endif
if g:platform ==? "windows"
Plug 'ajh17/VimCompletesMe'
endif
" only use if running neovim and on Linux
if has("nvim") && g:platform ==? "linux"
Plug 'neomake/neomake'
endif
" check to see if executable exists before trying to use the plugin
if executable('ctags')
Plug 'majutsushi/tagbar', { 'on': 'TagbarToggle' }
endif
call plug#end()
if filereadable(expand("~/.vimrc_background"))
let base16colorspace=256
source ~/.vimrc_background
endif
if has("termguicolors")
set termguicolors
endif
if has("gui")
if g:platform ==? "windows"
set guifont=Consolas:h12
endif
set guioptions=
set guiheadroom=
endif
" if available, use ag in place of grep
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor
endif
let mapleader = ','
let maplocalleader = ","
colorscheme base16-tomorrow-night
" dark terminal
set background=dark
" TODO: configure errorformat for clang only inside a C++ buffer
" for clang errors
set errorformat=%f:%l:%c:\ %t%s:\ %m
set omnifunc=syntaxcomplete#Complete
set noautoread
set noautowrite
set noautowriteall
set nobackup
set breakindent
set colorcolumn=72
set completeopt=menu,menuone,longest
set copyindent
set pumheight=5
set diffopt=filler,icase,iwhite,vertical
set noerrorbells
set expandtab
set nofoldenable
set foldmethod=syntax
set foldcolumn=0
set gdefault
set hidden
set ignorecase
set magic
set number
set preserveindent
set shiftwidth=4
set showmatch
set smartcase
set smartindent
set softtabstop=4
set splitright
set splitbelow
set noswapfile
set virtualedit=onemore
set nowrap
set wrapscan
set novisualbell
set wildignore+=*./git/*,*.o,*.obj
set undodir=$HOME/.config/nvim/undo
set undofile
set undolevels=5000
" commands
" Create bulleted or number lists out of a range of lines
command! -nargs=0 -range=% NumberList <line1>,<line2>s/^\s*\zs/\=(line('.') - line("'<")+1).'. '
command! -nargs=0 -range=% BulletList <line1>,<line2>s/^\s*\zs/*
" bindings
" yank to end of line
nnoremap Y y$
" keep visual selecting when tabbing
vnoremap << <gv
vnoremap >> >gv
" toggle folds
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
vnoremap <Space> zf
" clear trailing whitespace (http://vi.stackexchange.com/a/2285)
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
nnoremap <F2> :TagbarToggle<CR>
nnoremap <F3> :UndotreeToggle<CR>
nnoremap <silent><C-p> :<C-u>CtrlP<CR>
nnoremap <silent><C-b> :<C-U>CtrlPBuffer<CR>
nnoremap <silent><leader>t :<C-u>CtrlPTag<CR>
nnoremap <silent><leader>qco :copen<cr>
nnoremap <silent><leader>qcc :cclose<cr>
nnoremap <silent><leader>lco :lopen<cr>
nnoremap <silent><leader>lcc :lclose<cr>
" autocommands
" C++ stuff
augroup cpp
autocmd!
autocmd FileType c,cpp nnoremap <buffer><leader>cf :<C-u>ClangFormat<CR>
autocmd FileType c,cpp vnoremap <buffer><leader>cf :ClangFormat<CR>
autocmd FileType c,cpp setlocal textwidth=72
augroup END
augroup tex
autocmd!
autocmd FileType tex setlocal textwidth=72
augroup END
" insert #! for current file type
inoreabbrev <expr>#!! '#!/usr/bin/env' . (empty(&filetype) ? '' : ' '.&filetype)
" plugin configuration
" ctrlp
if executable('ag')
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files . -co --exclude-standard'],
\ },
\ 'fallback': 'ag %s -l -f -S --nocolor --nogroup --hidden -g ""'
\ }
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.svn$\',
\ 'file': '\.so$\|'
\ }
let g:ctrlp_use_caching = 0
endif
let g:ctrlp_status_func = { 'main': 'CtrlPStatusFunc1', 'prog': 'CtrlPStatusFunc2' }
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
let g:ctrlp_extensions = ['tag', 'line']
let g:ctrlp_working_path_mode = 'ca'
let g:ctrlp_open_new_file = 'h'
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10'
" tagbar
" dont bother configuring if the plugin wasn't loaded/installed
if has("executable")
" change focus to tagbar when opening it
let g:tagbar_autofocus = 1
let g:tagbar_autclose = 1
endif
" haskell-vim
let g:haskell_enable_quantification=1
let g:haskell_enable_recursivedo=1
let g:haskell_enable_arrowsyntax=1
let g:haskell_enable_pattern_synonyms=1
let g:haskell_enable_typeroles=1
let g:haskell_enable_static_pointers=1
" polyglot
let g:polyglot_disabled=['haskell']
" YouCompleteMe
let g:ycm_path_to_python_interpreter = '/usr/bin/python3'
let g:ycm_confirm_extra_conf = 0
" vimtex
let g:tex_indent_brace = 0
let g:tex_flavor = 'latex'
let g:vimtex_indent_enabled = 0
let g:vimtex_latexmk_enabled=1
" TODO: rework this so it works a little better
" let g:vimtex_view_general_viewer = 'qpdfview'
" let g:vimtex_view_general_options = '--unique @pdf\#src:@tex:@line:@col'
" let g:vimtex_view_general_options_latexmk = '--unique'
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = [
\ 're!\\[A-Za-z]*cite[A-Za-z]*(\[[^]]*\]){0,2}{[^}]*',
\ 're!\\[A-Za-z]*ref({[^}]*|range{([^,{}]*(}{)?))',
\ 're!\\hyperref\[[^]]*',
\ 're!\\includegraphics\*?(\[[^]]*\]){0,2}{[^}]*',
\ 're!\\(include(only)?|input){[^}]*',
\ 're!\\\a*(gls|Gls|GLS)(pl)?\a*(\s*\[[^]]*\]){0,2}\s*\{[^}]*',
\ 're!\\includepdf(\s*\[[^]]*\])?\s*\{[^}]*',
\ 're!\\includestandalone(\s*\[[^]]*\])?\s*\{[^}]*',
\ ]
" vim-clang-format
let g:clang_format#style_options = {
\ "BreakBeforeBraces" : "Stroustrup",
\ "AllowShortIfStatementsOnASingleLine" : "false",
\ "IndentWidth" : "4",
\ "ColumnLimit" : "72",
\ "Standard" : "C++11"
\ }
" vim-lightline
let g:lightline = {
\ 'colorscheme': 'base16'
\ }

17
.config/pulse/default.pa Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/pulseaudio -nF
# include all the pulseaudio defaults so we don't have to do all that
# work ourselves.
.include /etc/pulse/default.pa
# load equalizer sink
load-module module-equalizer-sink sink_name=equalizer
load-module module-dbus-protocol
# load bs2b ladspa sink using the equalizer as its master so that we
# have the equalizer and bs2b active on on a single sink
load-module module-ladspa-sink sink_name=crossfeed master=equalizer plugin=bs2b label=bs2b control=650,9.5
# prevent laptop from being loud if headphones are accidentially
# unplugged.
load-module module-switch-on-port-available

54
.config/termite/config Executable file
View File

@ -0,0 +1,54 @@
[options]
font = Roboto Mono 10
scroll_on_output = false
scroll_on_keystroke = true
allow_bold = true
dynamic_title = true
clickable_url = true
scrollback_lines = 1000
search_wrap = true
cursor_blink = on
cursor_shape = block
[colors]
# special
foreground = #c5c8c6
foreground_bold = #c5c8c6
cursor = #c5c8c6
# use rgba for transparency
background = rgba(29, 31, 33, 0.95)
# black
color0 = #1d1f21
color8 = #969896
# red
color1 = #cc6666
color9 = #cc6666
# green
color2 = #b5bd68
color10 = #b5bd68
# yellow
color3 = #f0c674
color11 = #f0c674
# blue
color4 = #81a2be
color12 = #81a2be
# magenta
color5 = #b294bb
color13 = #b294bb
# cyan
color6 = #8abeb7
color14 = #8abeb7
# white
color7 = #c5c8c6
color15 = #ffffff
# vim: ft=conf

56
.emacs.d/config/appearance.el Executable file
View File

@ -0,0 +1,56 @@
;; load and set the color theme
(use-package color-theme-sanityinc-tomorrow
:init (load-theme 'sanityinc-tomorrow-night t))
;; show number of search matches in the mode line
(use-package anzu
:diminish anzu-mode
:config (global-anzu-mode +1))
;; enable relative line numbers
(use-package linum-relative
:diminish linum-relative-mode)
(use-package vi-tilde-fringe
:diminish vi-tilde-fring-mode
:config (global-vi-tilde-fringe-mode))
(use-package powerline
:config (powerline-vim-theme))
(setq-default cursor-type 'bar)
;; amount of line spacing in a buffer
(setq-default line-spacing 0.2)
;; shorter confirmation prompts
(fset 'yes-or-no-p 'y-or-n-p)
;; show matching parens
(setq show-paren-delay 0)
(show-paren-mode t)
;; give a visual indication of an empty line
(setq indicate-empty-lines t)
;; show the column number in the mode line
(setq-default column-number-mode t)
(when (fboundp 'global-prettify-symbols-mode)
(global-prettify-symbols-mode))
;; don't wrap long lines
(setq-default truncate-lines t)
(setq-default truncate-partial-width-windows t)
;; allow the emacs window to be resized nicely
(setq frame-resize-pixelwise t)
(setq window-combination-resize t)
; ;; set the editor font
(set-face-attribute 'default nil
:family "Roboto Mono"
:height 100
:weight 'normal)
(setq indent-guide-char "|")

9
.emacs.d/config/calendar.el Executable file
View File

@ -0,0 +1,9 @@
; (use-package calfw
; :config
; (progn
; (require 'calfw-ical)
; ))
; (use-package calfw-gcal
; :after calfw)

46
.emacs.d/config/company.el Executable file
View File

@ -0,0 +1,46 @@
(use-package company
:demand
:commands company-mode
:init (global-company-mode)
:config
(progn
(setq company-show-numbers t)
(setq company-idle-delay 0.2)
(setq company-tooltip-limit 20)
(setq company-require-match nil)
(setq company-minimum-prefix-length 1)
(setq company-tooltip-align-annotations t)
(setq company-tooltip-flip-when-above t)
(setq company-global-modes '(not term-mode)))
:diminish company-mode)
(use-package company-quickhelp
:after company
:config
(progn
(setq company-quickhelp-delay 1)
(company-quickhelp-mode)))
(use-package company-statistics
:after company
:config (company-statistics-mode))
(use-package company-math
:after company
:config
(progn
(add-to-list 'company-backends 'company-math-symbols-unicode)
(add-to-list 'company-backends 'company-math-symbols-latex)))
(use-package company-auctex
:after company
:config (company-auctex-init))

50
.emacs.d/config/core.el Executable file
View File

@ -0,0 +1,50 @@
;; start the emacs server if it's not already running
(use-package server
:ensure server
:config (unless (server-running-p) (server-start)))
(use-package indent-guide
:config (indent-guide-global-mode))
;; http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
(defun my-minibuffer-setup-hook ()
(setq gc-cons-threshold most-positive-fixnum))
(defun my-minibuffer-exit-hook ()
(setq gc-cons-threshold 800000))
(add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook)
(add-hook 'minibuffer-exit-hook #'my-minibuffer-setup-exit-hook)
;; strip trailing whitespace when saving a file
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; scrolling settings
(setq scroll-margin 5
scroll-conservatively 999
scroll-step 1)
;; require a newline at the end of every file
(setq require-final-newline)
;; ignore case when searching
(setq-default case-fold-search t)
;; don't insert tabs
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)
;; don't make backup files
(setq-default make-backup-files nil)
(setq compilation-ask-about-save nil)
;; week starts on monday
(setq calendar-week-start-day 1)
;; spell checking
(setq ispell-program-name "aspell")
(setq ispell-dictionary "english")

6
.emacs.d/config/emmet.el Executable file
View File

@ -0,0 +1,6 @@
(use-package emmet-mode
:config
(progn
(add-hook 'sgml-mode-hook 'emmet-mode)
(add-hook 'css-mode-hook 'emmet-mode)
))

59
.emacs.d/config/evil.el Executable file
View File

@ -0,0 +1,59 @@
(use-package evil
:config
(progn
(setq evil-default-cursor t)
(setq evil-want-fine-undo t)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(define-key evil-ex-map "e " 'ido-find-file)
(define-key evil-ex-map "b " 'ido-switch-buffer)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
(define-key minibuffer-local-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-ns-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-completion-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-must-match-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-isearch-map [escape] 'abort-recursive-edit)
(setq-default evil-insert-state-cursor 'bar)
;; activate evil-mode
(evil-mode t)))
(use-package evil-leader
:after evil
:config
(progn
(setq evil-leader/in-all-states t)
(evil-leader/set-leader ",")
(evil-leader/set-key
"T" 'eshell
"k" 'kill-buffer
"K" 'kill-this-buffer
"b" 'ido-switch-buffer
"w" 'save-buffer
"o" 'helm-occur)
(global-evil-leader-mode)))
(use-package evil-matchit
:after evil
:config (global-evil-matchit-mode t))
(use-package evil-surround
:after evil
:config (global-evil-surround-mode t))
(use-package evil-commentary
:diminish evil-commentary-mode
:config (evil-commentary-mode))
(use-package evil-snipe
:after evil
:diminish evil-snipe-mode
:diminish evil-snipe-local-mode
:config (evil-snipe-mode t))

8
.emacs.d/config/flycheck.el Executable file
View File

@ -0,0 +1,8 @@
(use-package flycheck
:diminish flycheck-mode
:init
(progn
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(global-flycheck-mode)))

1
.emacs.d/config/flymake.el Executable file
View File

@ -0,0 +1 @@
;; TODO: flymake?

6
.emacs.d/config/haskell.el Executable file
View File

@ -0,0 +1,6 @@
(use-package haskell-mode
:config
(progn
(setq-default haskell-stylish-on-save t)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)))

37
.emacs.d/config/helm.el Executable file
View File

@ -0,0 +1,37 @@
(use-package helm
:config
(progn
(require 'helm)
(require 'helm-config)
(setq helm-candidate-number-limit 100)
(setq helm-autoresize-min-height 10)
(setq helm-autoresize-min-height 20)
(helm-autoresize-mode 1)))
(use-package helm-descbinds
:after helm
:config (helm-descbinds-mode))
(use-package helm-flx
:after helm
:config (helm-flx-mode t))
(use-package helm-fuzzier
:after helm
:config (helm-fuzzier-mode t))
(use-package helm-ag
:after helm
:config (setq helm-ag-fuzzy-match t))
(use-package helm-swoop
:after helm
:config
(progn
(setq helm-swoop-pre-input-function #'ignore)
(setq helm-swoop-use-line-number-face t)
(setq helm-swoop-split-with-multiple-windows t)
(setq helm-swoop-speed-or-color t)
(setq helm-swoop-use-fuzzy-match t)))

39
.emacs.d/config/ido.el Executable file
View File

@ -0,0 +1,39 @@
(use-package ido
:config
(progn
(setq ido-enable-prefix nil)
(setq ido-use-virtual-buffers t)
(setq ido-use-url-at-point t)
(setq ido-max-prospects 10)
(setq ido-create-new-buffer 'always)
(setq ido-use-filename-at-point 'guess)
(setq ido-save-directory-list-file "~/.emacs.d/ido.last")
(ido-mode t)
(ido-everywhere t)))
(use-package ido-ubiquitous
:after ido
:config (ido-ubiquitous-mode t))
(use-package flx-ido
:after ido
:config
(progn
(setq ido-enable-flex-matching t)
(flx-ido-mode t)))
(use-package ido-vertical-mode
:after ido
:config
(progn
(ido-vertical-mode)
(setq ido-vertical-show-count t)))
(use-package smex
:init
(progn
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)))

1
.emacs.d/config/js.el Executable file
View File

@ -0,0 +1 @@
(use-package js2-mode)

7
.emacs.d/config/magit.el Executable file
View File

@ -0,0 +1,7 @@
(use-package magit
:bind ("C-x g" . magit-status))
(use-package gist
:after magit
:config (global-git-gutter-mode t)
:diminish git-gutter-mode)

1
.emacs.d/config/org.el Executable file
View File

@ -0,0 +1 @@
(use-package org)

6
.emacs.d/config/pandoc.el Executable file
View File

@ -0,0 +1,6 @@
(use-package pandoc-mode
:init
(progn
(add-hook 'markdown-mode-hook 'pandoc-mode)
(add-hook 'pandoc-mode-hook 'pandoc-load-default-settings)
))

2
.emacs.d/config/php.el Executable file
View File

@ -0,0 +1,2 @@
(use-package php-mode
:diminish php-mode)

20
.emacs.d/config/tex.el Executable file
View File

@ -0,0 +1,20 @@
(use-package tex
:ensure auctex
:config
(progn
(setq TeX-save-query nil)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-PDF-mode t)
(setq-default TeX-master nil)
(setq-default TeX-engine 'xetex)
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq font-latex-fontify-sectioning 'color)
(setq font-latex-script-display nil)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)))

3
.emacs.d/config/undo-tree.el Executable file
View File

@ -0,0 +1,3 @@
(use-package undo-tree
:diminish undo-tree-mode
:init (global-undo-tree-mode))

10
.emacs.d/config/unicode.el Executable file
View File

@ -0,0 +1,10 @@
;; use utf-8
(set-language-environment 'utf-8)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system (if (eq system-type 'windows-nt) 'utf-16-le 'utf-8))
(prefer-coding-system 'utf-8)
;; treat clipboard input as a utf-8 string
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

39
.emacs.d/init.el Normal file
View File

@ -0,0 +1,39 @@
;; init.el
;; Yeah, my emacs config is a mess from me experimenting the operating
;; sys-- I mean editor. Please ignore the horrible elisp I wrote (still
;; learning) and it's also probably safe to assume nothing works. I'll
;; improve this eventually and rewrite it all so that it makes sense.
;; disable a few annoying things before initializing
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
(when (fboundp mode) (funcall mode -1)))
(setq inhibit-default-init t
inhibit-startup-screen t
ring-bell-function #'ignore)
;; packages
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/")
'("org" . "http://orgmode.org/elpa/"))
(package-initialize)
;; bootstrap use-package
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile (require 'use-package))
(setq use-package-always-ensure t)
(setq load-prefer-newer t)
(mapc 'load (file-expand-wildcards "~/.emacs.d/config/*.el"))
(diminish 'indent-guide-mode "")

19
.xmonad/xmobarrc Executable file
View File

@ -0,0 +1,19 @@
Config { font = "xft:Roboto Mono:style=medium:size=10,FontAwesome:size=10"
, additionalFonts = ["xft:FontAwesome-10"]
, bgColor = "#1D1F21"
, fgColor = "#C5C8C6"
, position = Top
, alpha = 200
, commands =
[ Run UnsafeStdinReader
, Run Date "%H:%M:%S - %y/%m/%d" "date" 10
, Run MultiCpu ["-t","Cpu: <total0> <total1> <total2> <total3>","-L","30","-H","60","-h","#FFB6B0","-l","#CEFFAC","-n","#FFFFCC","-w","3"] 10
, Run Battery [ "--template" , "<left>%"
] 60
]
, sepChar = "%"
, alignSep = "}{"
, template = " %UnsafeStdinReader% }{ <fn=1></fn>%battery% | <fc=#C5C8C6>%date%</fc> "
}
-- vim: ft=haskell

149
.xmonad/xmonad.hs Executable file
View File

@ -0,0 +1,149 @@
-- xmonad.hs
import System.IO
import System.Exit
import XMonad
import XMonad.Core
import XMonad.Layout.Spacing
import XMonad.Layout.Grid
import XMonad.Layout.NoBorders
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.SimplestFloat
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.Place
import XMonad.Actions.CycleWS
import XMonad.Actions.GridSelect
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeysP)
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- config
myTerminal = "/usr/bin/termite"
myModMask = mod4Mask
myBorderWidth = 2
myNormalBorderColor = "#282A2E"
myFocusedBorderColor = "#373B41"
myWorkspaces = clickable $ map show [1..9]
where clickable l = [ "<action=`xdotool key super+" ++ show (n) ++ "`>" ++ ws ++ "</action>" | (i,ws) <- zip [1..9] l, let n = i ]
-- layouts
myLayouts = tiled ||| Mirror tiled ||| Grid ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of the screen occupied by the master pane
ratio = 1/2
-- Percent of the screen to increment by when resizing panes
delta = 2/100
-- layout to use for the workspace containing chat clients
imLayout = withIM (25/100) (ClassName "telegram-desktop") Grid
-- combine everything together to make the layoutHook
myLayoutHook = avoidStruts
$ smartSpacing 10
$ smartBorders
$ onWorkspace (myWorkspaces !! 7) imLayout
$ myLayouts
-- TODO: Make this section a little (and by a little I mean a lot) neater
myManageHook = (composeAll . concat $
[ [ manageHook defaultConfig
, className =? "chromium" --> doShift (myWorkspaces !! 0)
, className =? "google-chrome" --> doShift (myWorkspaces !! 0)
, className =? "qutebrowser" --> doShift (myWorkspaces !! 0)
, className =? "emacs" --> doShift (myWorkspaces !! 2)
, className =? "gvim" --> doShift (myWorkspaces !! 2)
, className =? "telegram-desktop" --> doShift (myWorkspaces !! 7)
, className =? "Slack" --> doShift (myWorkspaces !! 7)
, className =? "discord" --> doShift (myWorkspaces !! 6)
]
, [ className =? c --> doFullFloat | c <- myFullFloats ]
-- Google Chrome app windows
, [ title =? t --> doFloat | t <- myChromeApps ]
-- misc.
, [ isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
, manageDocks
]
])
where
myFullFloats = [ "mpv" , "Vlc" ]
myChromeApps = [ "Authy" ]
-- GridSelect configuration
myGSConfig = defaultGSConfig
{ gs_cellheight = 128
, gs_cellwidth = 256
, gs_cellpadding = 5
}
-- TODO: I'd eventually like to use lemonbar and/or dzen2 instead of
-- xmobar so it can be more easily configured and customized.
myLogHook h = dynamicLogWithPP $ xmobarPP
{ ppTitle = xmobarColor "#c5c8c6" "" . shorten 80
, ppOutput = hPutStrLn h
}
myAdditionalKeys =
[ ("<XF86MonBrightnessUp>", spawn "light -A 10")
, ("<XF86MonBrightnessDown>", spawn "light -U 10")
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume 1 +2%")
, ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume 1 -2%")
, ("<XF86AudioMute>", spawn "pactl set-sink-mute 1 toggle")
, ("<XF86AudioPlay>", spawn "mpc toggle")
, ("<XF86AudioNext>", spawn "mpc next")
, ("<XF86AudioPrev>", spawn "mpc prev")
, ("<XF86AudioStop>", spawn "mpc stop")
, ("M-p", spawn "dmenu_run -fn 'Roboto Mono-10:medium' -o .85 -q -i -h 20")
, ("M-b", sendMessage ToggleStruts)
, ("M-]", nextWS)
, ("M-[", prevWS)
, ("M-g", goToSelected $ myGSConfig)
]
main = do
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmonad/xmobarrc"
xmonad $ ewmh defaultConfig
{ terminal = myTerminal
, modMask = myModMask
, borderWidth = myBorderWidth
, normalBorderColor = myNormalBorderColor
, focusedBorderColor = myFocusedBorderColor
-- hooks and layouts
, manageHook = myManageHook
, handleEventHook = docksEventHook <+> handleEventHook defaultConfig
, logHook = myLogHook xmproc
, layoutHook = myLayoutHook
, focusFollowsMouse = False
-- Custom workspaces
, workspaces = myWorkspaces
} `additionalKeysP` myAdditionalKeys

13
.xsession Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
# TODO: rewrite this as a series of bash scripts that the various
# window managers I have installed execute upon startup so that they
# can each have different options.
# load Xresources
[[ -f ~/.Xresources ]] && xrdb ~/.Xresources
# notifications daemon
dunst &
# load wallpapers
nitrogen --restore

37
.zshenv Normal file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env zsh
export RANGER_LOAD_DEFAULT_RC=false
export PATH="$PATH:/home/alex/bin"
export EDITOR=nvim
export LANG=en_US.UTF-8
export RC_ALL=en_US.UTF-8
# export KEYTIMEOUT=1
# export TERM=xterm-256color
export RANGER_LOAD_DEFAULT_RC=false
export GDK_SCALE=1
export QT_SCALE_FACTOR=1
export BROWSER="chromium"
export NVIM_LISTEN_ADDRESS=/tmp/nvim.socket
# if [[ $TERM == xterm-termite ]]; then
# . /etc/profile.d/vte.sh
# __vte_osc7
# fi
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_DEFAULT_OPTS="--color=dark --inline-info --multi --ansi"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export _JAVA_AWT_WM_NONREPARENTING=1

View File

View File

@ -1,8 +0,0 @@
Copyright (c) 2016 Alexander Schmidt
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1 +0,0 @@
;; init.el

View File

@ -1,281 +0,0 @@
" https://github.com/zyeri/dotfiles
call plug#begin('~/.config/nvim/plugged')
" plugins
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-git'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/syntastic'
Plug 'bling/vim-airline' | Plug 'bling/vim-bufferline'
Plug 'Valloric/YouCompleteMe'
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
Plug 'mhinz/vim-startify'
Plug 'mhinz/vim-grepper'
Plug 'godlygeek/tabular'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tacahiroy/ctrlp-funky'
Plug 'FelikZ/ctrlp-py-matcher'
Plug 'deris/vim-shot-f'
Plug 'mbbill/undotree'
Plug 'majutsushi/tagbar'
Plug 'sheerun/vim-polyglot'
Plug 'rhysd/committia.vim'
Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }
Plug 'mtth/scratch.vim'
Plug 'Valloric/ListToggle'
Plug 'junegunn/fzf', { 'do': 'yes \| ./install' }
" colorschemes
Plug 'w0ng/vim-hybrid'
Plug 'chriskempson/base16-vim'
call plug#end()
let mapleader = ','
let maplocalleader = ','
let g:mapleader = ','
let g:maplocalleader = ','
try
" enable 24-bit TRUE COLOR for neovim
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
let g:hybrid_custom_term_colors=1
set background=dark
colorscheme hybrid
catch /:E185:/
" silently ignore colorscheme not found error
endtry
" don't reload a file when it has been edited outside of vim
set noautoread
" never autowrite a file
set noautowrite
set noautowriteall
" don't keep a backup of any files currently being edited
set nobackup
" preserve indent on line breaks
set breakindent
" show a vertical column on the 79th column
set colorcolumn=72
" show a popup menu for insert completion matches
set completeopt=menu,menuone,longest
" copy existing indent when autoindenting a new line
set copyindent
" diff display options
set diffopt=filler,icase,iwhite,vertical
" no error bells
set noerrorbells
" use spaces instead of the tab character
set expandtab
set nofoldenable foldmethod=syntax foldcolumn=0
" use g flag for :s by default
set gdefault
" if available, use ag in place of grep
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor
endif
" don't destroy hidden buffers
set hidden
" ignore case while searching
set ignorecase
" enable the magic
set magic
" enable line numbering
set number
" preserve insent structure
set preserveindent
" use four spaces for each autoindent
set shiftwidth=4
" jump to matching bracket when inserted
set showmatch
" intelligently ignore case
set smartcase
" autoindent on newline
set smartindent
" number of spaces to use when tabbing during editing operations
set softtabstop=4
" always split new windows to the bottom right
set splitright
set splitbelow
" disable swap file
set noswapfile
" don't highlight past 256 columns
set synmaxcol=256
" number of spaces to use for tabs
set tabstop=4
" where to store undo files
set undodir=$HOME/.config/nvim/undo
" enable persistent undo
set undofile
" keep 2500 changes for undos
set undolevels=2500
" allow cursor to be placed one character after the end of line
set virtualedit=onemore
" disable visualbells
set novisualbell
" ignore certain file patterns
set wildignore+=*./git/*,*.o,*.obj
" disable softwrapping by default; enable via autocommand or modeline
set nowrap
" searches wrap around the end of file
set wrapscan
" commands
" Create bulleted or number lists out of a range of lines
command! -nargs=0 -range=% NumberList <line1>,<line2>s/^\s*\zs/\=(line('.') - line("'<")+1).'. '
command! -nargs=0 -range=% BulletList <line1>,<line2>s/^\s*\zs/*
" bindings
" move between windows
nnoremap <C-h> <C-w><C-h>
nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-l> <C-w><C-l>
" yank to end of line
nnoremap Y y$
" keep visual selecting when tabbing
vnoremap << <gv
vnoremap >> >gv
" toggle folds
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
vnoremap <Space> zf
" clear trailing whitespace (http://vi.stackexchange.com/a/2285)
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
nnoremap <F1> :NERDTreeToggle<CR>
nnoremap <F2> :TagbarToggle<CR>
nnoremap <F3> :UndotreeToggle<CR>
nnoremap <silent><C-p> :<C-u>CtrlP<CR>
nnoremap <silent><C-b> :<C-U>CtrlPBuffer<CR>
nnoremap <silent><leader>t :<C-u>CtrlPTag<CR>
" insert #! for current file type
inoreabbrev <expr>#!! '#!/usr/bin/env' . (empty(&filetype) ? '' : ' '.&filetype)
" plugin configuration
" scratch.vim
let g:scratch_autohide = 1
let g:scratch_top = 0
let g:scratch_persistence_file = '/tmp/scratch.vim'
" airline
let g:bufferline_echo = 0
let g:airline_inactive_collapse=1
let g:airline_powerline_fonts=0
if !exists('g:airline_symbols')
let g:airline_symbols = { }
endif
let g:airline_left_sep = ""
let g:airline_right_sep = ""
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
let g:airline_symbols.whitespace = 'Ξ'
" ctrlp
if executable('ag')
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files . -co --exclude-standard'],
\ },
\ 'fallback': 'ag %s -l -f -S --nocolor --nogroup --hidden -g ""'
\ }
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.svn$\',
\ 'file': '\.so$\|'
\ }
let g:ctrlp_use_caching = 0
endif
let g:ctrlp_status_func = { 'main': 'CtrlPStatusFunc1', 'prog': 'CtrlPStatusFunc2' }
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
let g:ctrlp_extensions = ['tag', 'line']
let g:ctrlp_working_path_mode = 'ca'
let g:ctrlp_open_new_file = 'h'
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10'
" tagbar
" change focus to tagbar when opening it
let g:tagbar_autofocus = 1
let g:tagbar_autclose = 1
" haskell-vim
let g:haskell_enable_quantification=1
let g:haskell_enable_recursivedo=1
let g:haskell_enable_arrowsyntax=1
let g:haskell_enable_pattern_synonyms=1
let g:haskell_enable_typeroles=1
let g:haskell_enable_static_pointers=1
" polyglot
let g:polyglot_disabled=['haskell']
" vim-plug
let g:plug_threads = 40
" syntastic
let g:syntastic_always_populate_loc_list = 1
" ListToggle
let g:lt_location_list_toggle_map = '<leader>tl'
let g:lt_quickfix_list_toggle_map = '<leader>tq'
" YouCompleteMe
let g:ycm_path_to_python_interpreter = '/usr/bin/python3'