Update bspwm & sxhkd dots
[~bandali/configs] / spacemacs / .spacemacs
1 ;; -*- mode: emacs-lisp -*-
2 ;; This file is loaded by Spacemacs at startup.
3 ;; It must be stored in your home directory.
4
5 (defun dotspacemacs/layers ()
6 "Configuration Layers declaration.
7 You should not put any user code in this function besides modifying the variable
8 values."
9 (setq-default
10 ;; Base distribution to use. This is a layer contained in the directory
11 ;; `+distribution'. For now available distributions are `spacemacs-base'
12 ;; or `spacemacs'. (default 'spacemacs)
13 dotspacemacs-distribution 'spacemacs
14 ;; If non-nil layers with lazy install support are lazy installed.
15 ;; (default nil)
16 dotspacemacs-enable-lazy-installation nil
17 ;; List of additional paths where to look for configuration layers.
18 ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
19 dotspacemacs-configuration-layer-path '()
20 ;; List of configuration layers to load. If it is the symbol `all' instead
21 ;; of a list then all discovered layers will be installed.
22 dotspacemacs-configuration-layers
23 '(
24 ;; ----------------------------------------------------------------
25 ;; Example of useful layers you may want to use right away.
26 ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
27 ;; <M-m f e R> (Emacs style) to install them.
28 ;; ----------------------------------------------------------------
29 spacemacs-helm
30 auto-completion
31 ;; better-defaults
32 emacs-lisp
33 git
34 latex
35 markdown
36 org
37 rust
38 (shell :variables
39 shell-default-height 30
40 shell-default-position 'bottom)
41 spell-checking
42 syntax-checking
43 ;; version-control
44 )
45 ;; List of additional packages that will be installed without being
46 ;; wrapped in a layer. If you need some configuration for these
47 ;; packages, then consider creating a layer. You can also put the
48 ;; configuration in `dotspacemacs/user-config'.
49 dotspacemacs-additional-packages '()
50 ;; A list of packages and/or extensions that will not be install and loaded.
51 dotspacemacs-excluded-packages '()
52 ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
53 ;; are declared in a layer which is not a member of
54 ;; the list `dotspacemacs-configuration-layers'. (default t)
55 dotspacemacs-delete-orphan-packages t))
56
57 (defun dotspacemacs/init ()
58 "Initialization function.
59 This function is called at the very startup of Spacemacs initialization
60 before layers configuration.
61 You should not put any user code in there besides modifying the variable
62 values."
63 ;; This setq-default sexp is an exhaustive list of all the supported
64 ;; spacemacs settings.
65 (setq-default
66 ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
67 ;; possible. Set it to nil if you have no way to use HTTPS in your
68 ;; environment, otherwise it is strongly recommended to let it set to t.
69 ;; This variable has no effect if Emacs is launched with the parameter
70 ;; `--insecure' which forces the value of this variable to nil.
71 ;; (default t)
72 dotspacemacs-elpa-https t
73 ;; Maximum allowed time in seconds to contact an ELPA repository.
74 dotspacemacs-elpa-timeout 5
75 ;; If non nil then spacemacs will check for updates at startup
76 ;; when the current branch is not `develop'. (default t)
77 dotspacemacs-check-for-update t
78 ;; One of `vim', `emacs' or `hybrid'. Evil is always enabled but if the
79 ;; variable is `emacs' then the `holy-mode' is enabled at startup. `hybrid'
80 ;; uses emacs key bindings for vim's insert mode, but otherwise leaves evil
81 ;; unchanged. (default 'vim)
82 dotspacemacs-editing-style 'vim
83 ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
84 dotspacemacs-verbose-loading nil
85 ;; Specify the startup banner. Default value is `official', it displays
86 ;; the official spacemacs logo. An integer value is the index of text
87 ;; banner, `random' chooses a random text banner in `core/banners'
88 ;; directory. A string value must be a path to an image format supported
89 ;; by your Emacs build.
90 ;; If the value is nil then no banner is displayed. (default 'official)
91 dotspacemacs-startup-banner 'official
92 ;; List of items to show in the startup buffer. If nil it is disabled.
93 ;; Possible values are: `recents' `bookmarks' `projects' `agenda' `todos'.
94 ;; (default '(recents projects))
95 dotspacemacs-startup-lists '(recents projects)
96 ;; Number of recent files to show in the startup buffer. Ignored if
97 ;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
98 dotspacemacs-startup-recent-list-size 5
99 ;; Default major mode of the scratch buffer (default `text-mode')
100 dotspacemacs-scratch-mode 'text-mode
101 ;; List of themes, the first of the list is loaded when spacemacs starts.
102 ;; Press <SPC> T n to cycle to the next theme in the list (works great
103 ;; with 2 themes variants, one dark and one light)
104 dotspacemacs-themes '(spacemacs-dark
105 spacemacs-light
106 solarized-light
107 solarized-dark
108 leuven
109 monokai
110 zenburn)
111 ;; If non nil the cursor color matches the state color in GUI Emacs.
112 dotspacemacs-colorize-cursor-according-to-state t
113 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
114 ;; size to make separators look not too crappy.
115 dotspacemacs-default-font '("Source Code Pro"
116 :size 14
117 :weight normal
118 :width normal
119 :powerline-scale 1.6)
120 ;; The leader key
121 dotspacemacs-leader-key "SPC"
122 ;; The leader key accessible in `emacs state' and `insert state'
123 ;; (default "M-m")
124 dotspacemacs-emacs-leader-key "M-m"
125 ;; Major mode leader key is a shortcut key which is the equivalent of
126 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
127 dotspacemacs-major-mode-leader-key ","
128 ;; Major mode leader key accessible in `emacs state' and `insert state'.
129 ;; (default "C-M-m)
130 dotspacemacs-major-mode-emacs-leader-key "C-M-m"
131 ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
132 ;; (default "SPC")
133 dotspacemacs-emacs-command-key "SPC"
134 ;; These variables control whether separate commands are bound in the GUI to
135 ;; the key pairs C-i, TAB and C-m, RET.
136 ;; Setting it to a non-nil value, allows for separate commands under <C-i>
137 ;; and TAB or <C-m> and RET.
138 ;; In the terminal, these pairs are generally indistinguishable, so this only
139 ;; works in the GUI. (default nil)
140 dotspacemacs-distinguish-gui-tab nil
141 ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
142 dotspacemacs-remap-Y-to-y$ nil
143 ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
144 ;; (default nil)
145 dotspacemacs-ex-substitute-global nil
146 ;; Name of the default layout (default "Default")
147 dotspacemacs-default-layout-name "Default"
148 ;; If non nil the default layout name is displayed in the mode-line.
149 ;; (default nil)
150 dotspacemacs-display-default-layout nil
151 ;; If non nil then the last auto saved layouts are resume automatically upon
152 ;; start. (default nil)
153 dotspacemacs-auto-resume-layouts nil
154 ;; Location where to auto-save files. Possible values are `original' to
155 ;; auto-save the file in-place, `cache' to auto-save the file to another
156 ;; file stored in the cache directory and `nil' to disable auto-saving.
157 ;; (default 'cache)
158 dotspacemacs-auto-save-file-location 'cache
159 ;; Maximum number of rollback slots to keep in the cache. (default 5)
160 dotspacemacs-max-rollback-slots 5
161 ;; If non nil then `ido' replaces `helm' for some commands. For now only
162 ;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
163 ;; `find-contrib-file' (SPC f e c) are replaced. (default nil)
164 dotspacemacs-use-ido nil
165 ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
166 dotspacemacs-helm-resize nil
167 ;; if non nil, the helm header is hidden when there is only one source.
168 ;; (default nil)
169 dotspacemacs-helm-no-header nil
170 ;; define the position to display `helm', options are `bottom', `top',
171 ;; `left', or `right'. (default 'bottom)
172 dotspacemacs-helm-position 'bottom
173 ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
174 ;; several times cycle between the kill ring content. (default nil)
175 dotspacemacs-enable-paste-transient-state nil
176 ;; Which-key delay in seconds. The which-key buffer is the popup listing
177 ;; the commands bound to the current keystroke sequence. (default 0.4)
178 dotspacemacs-which-key-delay 0.4
179 ;; Which-key frame position. Possible values are `right', `bottom' and
180 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
181 ;; right; if there is insufficient space it displays it at the bottom.
182 ;; (default 'bottom)
183 dotspacemacs-which-key-position 'bottom
184 ;; If non nil a progress bar is displayed when spacemacs is loading. This
185 ;; may increase the boot time on some systems and emacs builds, set it to
186 ;; nil to boost the loading time. (default t)
187 dotspacemacs-loading-progress-bar t
188 ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
189 ;; (Emacs 24.4+ only)
190 dotspacemacs-fullscreen-at-startup nil
191 ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
192 ;; Use to disable fullscreen animations in OSX. (default nil)
193 dotspacemacs-fullscreen-use-non-native nil
194 ;; If non nil the frame is maximized when Emacs starts up.
195 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
196 ;; (default nil) (Emacs 24.4+ only)
197 dotspacemacs-maximized-at-startup nil
198 ;; A value from the range (0..100), in increasing opacity, which describes
199 ;; the transparency level of a frame when it's active or selected.
200 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
201 dotspacemacs-active-transparency 90
202 ;; A value from the range (0..100), in increasing opacity, which describes
203 ;; the transparency level of a frame when it's inactive or deselected.
204 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
205 dotspacemacs-inactive-transparency 90
206 ;; If non nil show the titles of transient states. (default t)
207 dotspacemacs-show-transient-state-title t
208 ;; If non nil show the color guide hint for transient state keys. (default t)
209 dotspacemacs-show-transient-state-color-guide t
210 ;; If non nil unicode symbols are displayed in the mode line. (default t)
211 dotspacemacs-mode-line-unicode-symbols t
212 ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
213 ;; scrolling overrides the default behavior of Emacs which recenters point
214 ;; when it reaches the top or bottom of the screen. (default t)
215 dotspacemacs-smooth-scrolling t
216 ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
217 ;; derivatives. If set to `relative', also turns on relative line numbers.
218 ;; (default nil)
219 dotspacemacs-line-numbers nil
220 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
221 ;; (default nil)
222 dotspacemacs-smartparens-strict-mode nil
223 ;; Select a scope to highlight delimiters. Possible values are `any',
224 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
225 ;; emphasis the current one). (default 'all)
226 dotspacemacs-highlight-delimiters 'all
227 ;; If non nil advises quit functions to keep server open when quitting.
228 ;; (default nil)
229 dotspacemacs-persistent-server nil
230 ;; List of search tool executable names. Spacemacs uses the first installed
231 ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
232 ;; (default '("ag" "pt" "ack" "grep"))
233 dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
234 ;; The default package repository used if no explicit repository has been
235 ;; specified with an installed package.
236 ;; Not used for now. (default nil)
237 dotspacemacs-default-package-repository nil
238 ;; Delete whitespace while saving buffer. Possible values are `all'
239 ;; to aggressively delete empty line and long sequences of whitespace,
240 ;; `trailing' to delete only the whitespace at end of lines, `changed'to
241 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
242 ;; (default nil)
243 dotspacemacs-whitespace-cleanup nil
244 ;; Disable setting the cursor color according to states
245 ;; dotspacemacs-colorize-cursor-according-to-state nil
246 ))
247
248 (defun dotspacemacs/user-init ()
249 "Initialization function for user code.
250 It is called immediately after `dotspacemacs/init'. You are free to put almost
251 any user code here. The exception is org related code, which should be placed
252 in `dotspacemacs/user-config'."
253 )
254
255 (defun dotspacemacs/user-config ()
256 "Configuration function for user code.
257 This function is called at the very end of Spacemacs initialization after
258 layers configuration. You are free to put any user code."
259 (setq powerline-default-separator 'slant)
260
261 ;; (setq undo-tree-auto-save-history t
262 ;; undo-tree-history-directory-alist
263 ;; `(("." . ,(concat spacemacs-cache-directory "undo"))))
264 ;; (unless (file-exists-p (concat spacemacs-cache-directory "undo"))
265 ;; (make-directory (concat spacemacs-cache-directory "undo")))
266
267 ;; Use pdflatex instead of latex
268 (setq TeX-PDF-mode t)
269
270 ;; Support zathura in TeX mode
271 (setq TeX-view-program-selection
272 '(((output-dvi style-pstricks)
273 "dvips and gv")
274 (output-dvi "xdvi")
275 (output-pdf "zathura")
276 (output-html "xdg-open")))
277 (setq TeX-view-program-list
278 '(("zathura"
279 ("zathura" (mode-io-correlate "-sync.sh")
280 " "
281 (mode-io-correlate "%n:1:%t ")
282 "%o"))))
283
284 ;; Swap : and ;
285 (define-key evil-motion-state-map ";" 'evil-ex)
286 (define-key evil-motion-state-map ":" 'evil-repeat-find-char)
287
288 ;; Set the erc nick completion postfix to ", "
289 ;; (setq erc-pcomplete-nick-postfix ", ")
290 )
291
292 ;; Do not write anything past this comment. This is where Emacs will
293 ;; auto-generate custom variable definitions.
294 (custom-set-variables
295 ;; custom-set-variables was added by Custom.
296 ;; If you edit it by hand, you could mess it up, so be careful.
297 ;; Your init file should contain only one such instance.
298 ;; If there is more than one, they won't work right.
299 '(package-selected-packages
300 (quote
301 (toml-mode rustfmt racer flycheck-rust company-auctex auctex-latexmk auctex xterm-color toc-org shell-pop org-repo-todo org-present org-pomodoro org-plus-contrib org-bullets multi-term mmm-mode markdown-toc markdown-mode htmlize helm-flyspell helm-company helm-c-yasnippet gnuplot gh-md flycheck-pos-tip flycheck eshell-z eshell-prompt-extras esh-help company-statistics company-quickhelp company auto-yasnippet auto-dictionary ac-ispell smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger evil-magit ws-butler window-numbering which-key volatile-highlights vi-tilde-fringe use-package spacemacs-theme spaceline smooth-scrolling restart-emacs rainbow-delimiters quelpa popwin persp-mode pcre2el paradox page-break-lines open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint leuven-theme info+ indent-guide ido-vertical-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido fill-column-indicator fancy-battery f expand-region exec-path-from-shell evil-visualstar evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-jumper evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu elisp-slime-nav define-word clean-aindent-mode buffer-move bracketed-paste auto-highlight-symbol auto-compile aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line))))
302 (custom-set-faces
303 ;; custom-set-faces was added by Custom.
304 ;; If you edit it by hand, you could mess it up, so be careful.
305 ;; Your init file should contain only one such instance.
306 ;; If there is more than one, they won't work right.
307 '(company-tooltip-common ((t (:inherit company-tooltip :weight bold :underline nil))))
308 '(company-tooltip-common-selection ((t (:inherit company-tooltip-selection :weight bold :underline nil)))))