Fix scrolling behaviour in Emacs
- Author
- Maarten Vangeneugden
- Date
- July 24, 2024, 12:04 p.m.
- Hash
- b5b1d4e848b7aa0491a2f2619370925205d87198
- Parent
- 9a4fc719619aae20808026a8471a3c42bc6db3ce
- Modified files
- download-changes.sh
- init.el
- upload-changes.sh
download-changes.sh ¶
6 additions and 6 deletions.
View changes Hide changes
1 |
- | rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/shared/planning/ planning |
2 |
- | |
+ |
1 |
#rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/shared/planning/ planning |
+ |
2 |
|
3 |
3 |
echo -e "Retrieving weekly folder from HQ:" |
4 |
- | rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/shared/weekly/ weekly |
5 |
- | |
+ |
4 |
#rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/shared/weekly/ weekly |
+ |
5 |
|
6 |
6 |
echo -e "Retrieving IDLab folder from HQ:" |
7 |
- | rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/IDLab/ IDLab |
8 |
- | |
+ |
7 |
#rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 maarten@maartenv.be:/home/maarten/backup/IDLab/ IDLab |
+ |
8 |
|
9 |
9 |
echo -e "Updating all repositories: " |
10 |
10 |
cd ~/repositories |
11 |
11 |
for directory in */ ; do |
12 |
12 |
cd $directory |
13 |
13 |
git pull |
14 |
14 |
cd .. |
15 |
15 |
done |
16 |
16 |
|
17 |
17 |
cd ~ |
18 |
18 |
init.el ¶
14 additions and 6 deletions.
View changes Hide changes
1 |
1 |
;; Copyright © 2018-2022 Maarten Vangeneugden |
2 |
2 |
;; Author: Maarten Vangeneugden <contact_me@maartenv.be> |
3 |
3 |
;; URL: https://maartenv.be |
4 |
4 |
;; |
5 |
5 |
;; Welcome to Ghent Emacs. |
6 |
6 |
;; |
7 |
7 |
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative |
8 |
8 |
;; developed in the city of Ghent, Belgium, by a student of Engineering |
9 |
9 |
;; Informatics at Ghent University. |
10 |
10 |
;; |
11 |
11 |
;; License: GPLv3+ |
12 |
12 |
|
13 |
13 |
;; USAGE: |
14 |
14 |
;; This configuration file uses the use-package declaration, that means the |
15 |
15 |
;; settings are a bit different from what you'd normally do in a GNU Emacs |
16 |
16 |
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how |
17 |
17 |
;; to correctly write package configuration. |
18 |
18 |
|
19 |
19 |
(eval-when-compile |
20 |
20 |
(require 'use-package)) |
21 |
21 |
;(require 'diminish) ;; if you use :diminish |
22 |
22 |
(require 'bind-key) ;; if you use any :bind variant |
23 |
23 |
|
24 |
24 |
(custom-set-variables |
25 |
25 |
;; custom-set-variables was added by Custom. |
26 |
26 |
;; If you edit it by hand, you could mess it up, so be careful. |
27 |
27 |
;; Your init file should contain only one such instance. |
28 |
28 |
;; If there is more than one, they won't work right. |
29 |
29 |
'(custom-safe-themes |
30 |
30 |
'("78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default)) |
31 |
- | '(inhibit-startup-screen t) |
+ |
31 |
'(inhibit-startup-screen t) |
32 |
32 |
;; Font settings, ligatures and symbol config. set-frame-font has to be called |
33 |
- | ;; here, because (for unknown reasons), if it's loaded in the old position, it |
34 |
- | ;; will not set the font on my server's Emacs. (But it /will/ do so when |
35 |
- | ;; inhibit-startup-screen is set to f, so I really have no clue how that works). |
36 |
- | (set-frame-font "Hack 11" nil t) |
37 |
- | '(package-selected-packages |
+ |
33 |
'(package-selected-packages |
38 |
34 |
'(company-fuzzy web-mode use-package undo-tree srefactor spacemacs-theme spaceline solarized-theme smooth-scrolling rainbow-delimiters pretty-mode page-break-lines monokai-theme helm general evil dashboard dante company-ycmd company-flx company-anaconda clang-format cider auto-package-update auctex a)) |
39 |
35 |
'(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
40 |
36 |
'(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline")) |
41 |
37 |
;(custom-set-faces |
42 |
38 |
;; custom-set-faces was added by Custom. |
43 |
39 |
;; If you edit it by hand, you could mess it up, so be careful. |
44 |
40 |
;; Your init file should contain only one such instance. |
45 |
41 |
;; If there is more than one, they won't work right. |
46 |
42 |
;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238"))))) |
47 |
43 |
|
48 |
44 |
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE |
49 |
45 |
(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) |
50 |
46 |
backup-by-copying t ; Don't delink hardlinks |
51 |
47 |
version-control t ; Use version numbers on backups |
52 |
48 |
delete-old-versions t ; Automatically delete excess backups |
53 |
49 |
kept-new-versions 20 ; how many of the newest versions to keep |
54 |
50 |
kept-old-versions 5 ; and how many of the old |
55 |
51 |
) |
56 |
52 |
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs |
57 |
53 |
|
58 |
54 |
;; Disables the use of tabs, replaces them with spaces |
59 |
55 |
(setq-default indent-tabs-mode nil) |
60 |
56 |
|
61 |
57 |
;; Activate UTF-8 throughout Ghent Emacs |
62 |
58 |
(prefer-coding-system 'utf-8) |
63 |
59 |
(set-default-coding-systems 'utf-8) |
64 |
60 |
(set-terminal-coding-system 'utf-8) |
65 |
61 |
(set-keyboard-coding-system 'utf-8) |
66 |
62 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
67 |
63 |
|
68 |
64 |
;; Line numbering config |
69 |
65 |
(global-display-line-numbers-mode) |
70 |
66 |
(setq display-line-numbers-mode t) |
71 |
67 |
(setq display-line-numbers-widen t) |
72 |
68 |
(setq display-line-numbers-type 'relative) |
73 |
69 |
(setq display-line-numbers-current-absolute t) |
74 |
70 |
|
75 |
71 |
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) |
76 |
72 |
(setq scroll-step 1) |
77 |
73 |
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left |
78 |
74 |
|
79 |
75 |
;; Enable line breaks in all modes at column 80 |
80 |
76 |
(setq-default auto-fill-function 'do-auto-fill) |
81 |
77 |
(setq-default fill-column 80) |
82 |
78 |
|
83 |
79 |
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT |
84 |
80 |
|
85 |
81 |
;; Setup packages |
86 |
82 |
;(package-initialize) |
87 |
83 |
(require 'package) |
88 |
84 |
(setq package-enable-at-startup nil) |
89 |
85 |
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) |
90 |
86 |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) |
91 |
87 |
(unless (package-installed-p 'use-package) |
92 |
88 |
(package-refresh-contents) |
93 |
89 |
(package-install 'use-package)) |
94 |
90 |
|
95 |
91 |
|
96 |
92 |
|
97 |
93 |
|
98 |
94 |
;; Next two lines allow foregoing :ensure t on all packages |
99 |
95 |
;; :ensure t simply makes sure that, if a package isn't installed on this |
100 |
96 |
;; machine, it's automatically fetched and installed. |
101 |
97 |
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that |
102 |
98 |
(require 'use-package-ensure) |
103 |
99 |
(setq use-package-always-ensure t) |
104 |
100 |
|
105 |
101 |
;; Package for automatic updating of all the other packages |
106 |
102 |
(use-package auto-package-update |
107 |
103 |
:config |
108 |
104 |
(setq auto-package-update-delete-old-versions t) |
109 |
105 |
(setq auto-package-update-hide-results t) |
110 |
106 |
(auto-package-update-maybe)) |
111 |
107 |
|
112 |
108 |
;; Easier keybindings so we can do more lazy loading |
113 |
109 |
(use-package general |
114 |
110 |
:config |
115 |
111 |
(general-create-definer my-leader-def |
116 |
112 |
;; :prefix my-leader |
117 |
113 |
:prefix "SPC") |
118 |
114 |
(general-create-definer local-leader-def |
119 |
115 |
;; :prefix local-leader |
120 |
116 |
:prefix ",")) |
121 |
117 |
|
122 |
118 |
(use-package dashboard |
123 |
119 |
:init |
124 |
120 |
(setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text. |
125 |
121 |
(setq dashboard-startup-banner "~/ghent-emacs.png") |
126 |
122 |
:config |
127 |
123 |
(dashboard-setup-startup-hook)) |
128 |
124 |
|
129 |
125 |
;; AUCTeX configuration |
130 |
126 |
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/ |
131 |
127 |
;;;;(use-package auctex |
132 |
128 |
;;:init |
133 |
129 |
;;(setq TeX-auto-save t) |
134 |
130 |
;;(setq TeX-parse-self t) |
135 |
131 |
;;(setq Tex-save-query nil) |
136 |
132 |
;;) |
137 |
133 |
|
138 |
134 |
;; Updates all packages automatically |
139 |
135 |
(use-package auto-package-update |
140 |
136 |
:config |
141 |
137 |
(setq auto-package-update-delete-old-versions t) |
142 |
138 |
(setq auto-package-update-hide-results t) |
143 |
139 |
(auto-package-update-maybe)) |
144 |
140 |
|
145 |
141 |
;; UI settings |
146 |
142 |
(tool-bar-mode -1) |
147 |
143 |
(menu-bar-mode -1) |
148 |
144 |
(toggle-scroll-bar -1) |
149 |
145 |
|
150 |
146 |
;; Tabs and width |
151 |
147 |
(setq-default tab-width 4) |
152 |
148 |
(setq-default c-basic-offset 4) |
153 |
149 |
|
154 |
150 |
(use-package spaceline |
155 |
151 |
:init |
156 |
152 |
(setq frame-char-height 35) |
157 |
153 |
(setq powerline-height 35) |
158 |
154 |
:custom |
159 |
155 |
(spaceline-toggle-buffer-size-off) |
160 |
156 |
;(setq powerline-height 21) |
161 |
157 |
(spaceline-inflation 1) |
162 |
158 |
(powerline-default-separator 'slant) |
163 |
159 |
:config |
164 |
160 |
(spaceline-spacemacs-theme) |
165 |
161 |
(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) |
166 |
162 |
|
167 |
163 |
|
168 |
164 |
(use-package monokai-theme |
169 |
165 |
:config |
170 |
166 |
(load-theme 'monokai) |
171 |
167 |
(setq monokai-variable-pitch-mode t)) |
172 |
168 |
;; When using solarized as theme, put in :config |
173 |
169 |
;; (setq x-underline-at-descent-line t) |
174 |
170 |
;; Which will block an ugly line being drawn trhough the modeline. |
175 |
171 |
|
176 |
172 |
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) |
177 |
173 |
;(add-hook 'org-mode-hook 'auto-fill-mode) |
178 |
174 |
;; (Programming) languages |
179 |
175 |
|
180 |
176 |
|
181 |
177 |
|
182 |
178 |
(use-package dante |
183 |
179 |
:after haskell-mode |
184 |
180 |
:commands 'dante-mode |
185 |
181 |
:init |
186 |
182 |
(add-hook 'haskell-mode-hook 'dante-mode) |
187 |
183 |
(add-hook 'haskell-mode-hook 'flycheck-mode)) |
188 |
184 |
|
189 |
185 |
|
190 |
186 |
;; HTML/CSS/Django |
191 |
187 |
(use-package web-mode |
192 |
188 |
:mode "\\.html?\\.djhtml\\'" |
193 |
189 |
:init |
194 |
190 |
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) |
195 |
191 |
(setq web-mode-markup-indent-offset 4) |
196 |
192 |
(setq web-mode-css-indent-offset 4) |
197 |
193 |
(setq web-mode-code-indent-offset 4) |
198 |
194 |
;(setq web-mode-engines-alist |
199 |
195 |
; '(("django" . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why. |
200 |
196 |
:custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for |
201 |
197 |
(web-mode-enable-auto-pairing nil) |
202 |
198 |
(web-mode-enable-auto-closing nil) |
203 |
199 |
(web-mode-enable-auto-expanding nil) |
204 |
200 |
(web-mode-enable-auto-opening nil) |
205 |
201 |
(web-mode-enable-auto-quoting nil)) |
206 |
202 |
|
207 |
203 |
|
208 |
204 |
;;(use-package ycmd-mode |
209 |
205 |
;;:ensure ycmd |
210 |
206 |
;;;:hook (after-init . global-ycmd-mode) |
211 |
207 |
;;:hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM |
212 |
208 |
;;; needs to kick in |
213 |
209 |
;;:init |
214 |
210 |
;;; Old paths |
215 |
211 |
;;;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/"))) |
216 |
212 |
;;;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py") |
217 |
213 |
;;(set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd"))) |
218 |
214 |
;;(set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py")) |
219 |
215 |
;;(set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes, |
220 |
216 |
;;; not only those in ycmd-file-type-map |
221 |
217 |
;;;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*")) |
222 |
218 |
;;:config |
223 |
219 |
;;(setq url-show-status nil) ; Makes those FUCKING annoying messages SHUT THE HELL UP |
224 |
220 |
;;(setq request-message-level -1) |
225 |
221 |
|
226 |
222 |
;;(use-package flycheck-ycmd |
227 |
223 |
;;:ensure t |
228 |
224 |
;;:commands (flycheck-ycmd-setup) |
229 |
225 |
;;:hook (ycmd-mode . flycheck-ycmd-setup) |
230 |
226 |
;;:init |
231 |
227 |
;;(setq flycheck-clang-language-standard "c++11") |
232 |
228 |
;;(when (not (display-graphic-p)) |
233 |
229 |
;;(setq flycheck-indication-mode nil)))) |
234 |
230 |
|
235 |
231 |
(use-package company |
236 |
232 |
:hook (after-init . global-company-mode) |
237 |
233 |
:init |
238 |
234 |
(company-tng-configure-default) ; Use <TAB> to scroll in completion options |
239 |
235 |
(setq company-minimum-prefix-length 2) |
240 |
236 |
(setq company-idle-delay 0.0)) |
241 |
237 |
;:config |
242 |
238 |
;;(use-package company-ycmd-mode |
243 |
239 |
;;:ensure company-ycmd |
244 |
240 |
;;:commands (company-ycmd-setup) |
245 |
241 |
;;:hook (ycmd-mode . company-ycmd-setup)) |
246 |
242 |
;;(use-package company-flx |
247 |
243 |
;;:ensure t |
248 |
244 |
;;:config |
249 |
245 |
;;(company-flx-mode +1))) |
250 |
246 |
;; |
251 |
247 |
(use-package company-fuzzy |
252 |
248 |
:hook (company-mode . company-fuzzy-mode) |
253 |
249 |
:init |
254 |
250 |
(setq company-fuzzy-sorting-backend 'flx |
255 |
251 |
company-fuzzy-prefix-on-top nil |
256 |
252 |
company-fuzzy-history-backends '(company-yasnippet) |
257 |
253 |
company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@"))) |
258 |
254 |
|
259 |
255 |
(global-company-fuzzy-mode 1) |
260 |
256 |
|
261 |
257 |
(use-package clang-format |
262 |
258 |
:general |
263 |
259 |
(local-leader-def |
264 |
260 |
:states 'normal |
265 |
261 |
:modes '(c-mode-map c++-mode-map) |
266 |
262 |
"b" '(:ignore t :which-key "clang") |
267 |
263 |
"bf" 'clang-format-buffer) |
268 |
264 |
:init |
269 |
265 |
(setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}")) |
270 |
266 |
|
271 |
267 |
;; eViL-mode |
272 |
268 |
(use-package evil |
273 |
269 |
:hook (after-init . evil-mode) |
274 |
270 |
:bind (:map evil-normal-state-map ;; Scrolls over lines correctly |
275 |
271 |
("j" . evil-next-visual-line) |
276 |
272 |
("k" . evil-previous-visual-line)) |
277 |
273 |
:general |
278 |
274 |
(my-leader-def |
279 |
275 |
:states 'normal |
280 |
276 |
"b" '(:ignore t :which-key "buffer") |
281 |
277 |
"g" '(:ignore t :which-key "magit") |
282 |
278 |
"f" '(:ignore t :which-key "files") |
283 |
279 |
"bk" 'kill-this-buffer |
284 |
280 |
"bd" 'kill-other-buffers |
285 |
281 |
"bh" 'switch-to-home-buffer |
286 |
282 |
"br" 'revert-buffer |
287 |
283 |
"h" 'split-window-vertically |
288 |
284 |
"v" 'split-window-horizontally) |
289 |
285 |
(local-leader-def |
290 |
286 |
:states 'normal |
291 |
287 |
;; General lang options |
292 |
288 |
"c" 'compile) |
293 |
289 |
:init |
294 |
290 |
(setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF |
295 |
291 |
(setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a |
296 |
292 |
;; weird 2020 patch) |
297 |
293 |
(setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above. |
298 |
294 |
|
299 |
295 |
;; About smooth-scrolling: I'd normally just use some variables for scrolling |
300 |
296 |
;; but they all fail with org-mode. This package fixes everything that's wrong for me. |
301 |
297 |
(use-package smooth-scrolling |
302 |
298 |
:config |
303 |
299 |
(smooth-scrolling-mode 1)) |
304 |
300 |
|
305 |
301 |
(use-package org |
306 |
302 |
:pin "org" |
307 |
303 |
; FIXME This causes some errors with bind-keys or what have you. Commented |
308 |
304 |
; until it is fixed. |
309 |
305 |
;:bind (:bind-keymap |
310 |
306 |
; ("C-c x" . org-todo-state-map) |
311 |
307 |
; :map org-todo-state-map |
312 |
308 |
; ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED"))) |
313 |
309 |
; ("d" . #'(lambda nil (interactive) (org-todo "DONE"))) |
314 |
310 |
; ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED"))) |
315 |
311 |
; ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED"))) |
316 |
312 |
; ("s" . #'(lambda nil (interactive) (org-todo "STARTED"))) |
317 |
313 |
; ("w" . #'(lambda nil (interactive) (org-todo "WAITING")))) |
318 |
314 |
; :map org-mode-map |
319 |
315 |
; ("C-c x" . org-todo-state-map)) |
320 |
316 |
:init |
321 |
317 |
(define-key mode-specific-map [?a] 'org-agenda) |
322 |
318 |
:custom |
323 |
319 |
;; Because I use XeLaTeX (it's objectively better), some variables need to be |
324 |
320 |
;; set so org-mode knows what to call. |
325 |
321 |
|
326 |
322 |
;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up |
327 |
323 |
;; the editor completely, but for one reason or another, you MUST set the |
328 |
324 |
;; async-debug to nil. Otherwise it will constantly "exit abnormally" without |
329 |
325 |
;; reason. This fixes it, who knows why. |
330 |
326 |
(org-export-async-debug nil) |
331 |
327 |
|
332 |
328 |
(org-latex-compiler 'xelatex) ; Makes sure the XeLaTeX compiler is used |
333 |
329 |
|
334 |
330 |
; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format |
335 |
331 |
(org-preview-latex-default-process 'dvisvgm) |
336 |
332 |
|
337 |
333 |
; This edits the preview process so it works correctly with XeLaTeX. |
338 |
334 |
; Changes: |
339 |
335 |
; - "latex" to "xelatex" |
340 |
336 |
; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF. |
341 |
337 |
; - change input type from dvi to xdv |
342 |
338 |
; - Only leave the dvisvgm option because I don't need the others |
343 |
339 |
(org-preview-latex-process-alist |
344 |
340 |
(quote |
345 |
341 |
((dvisvgm :programs |
346 |
342 |
("xelatex" "dvisvgm") |
347 |
343 |
:description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust |
348 |
344 |
(1.7 . 1.5) |
349 |
345 |
:latex-compiler |
350 |
346 |
("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f") |
351 |
347 |
:image-converter |
352 |
348 |
("dvisvgm %f -n -b min -c %S -o %O"))))) |
353 |
349 |
|
354 |
350 |
;; Sets the formatting options. I only changed :scale to 1.6, but I don't know |
355 |
351 |
;; how to change only thát, so for now I'm configuring the entire variable |
356 |
352 |
(org-format-latex-options (quote |
357 |
353 |
(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers |
358 |
354 |
("begin" "$1" "$" "$$" "\\(" "\\[")))) |
359 |
355 |
|
360 |
356 |
;; Sets the directory in which the preview fragments are stored to the /tmp |
361 |
357 |
;; folder. Otherwise it clutters up the folder in which the source resides |
362 |
358 |
;; with what are essentially cache files. |
363 |
359 |
(org-preview-latex-image-directory "/tmp/ltximg/") |
364 |
360 |
|
365 |
361 |
;; Following customizations are in regard to org-agenda configuration. |
366 |
362 |
(org-agenda-files (quote ("~/shared/planning/planning.org"))) |
367 |
363 |
(org-default-notes-file "~/shared/planning/notes.org") |
368 |
364 |
(org-agenda-span 62) |
369 |
365 |
(org-deadline-warning-days 14) |
370 |
366 |
(org-agenda-show-all-dates t) |
371 |
367 |
(org-agenda-skip-deadline-if-done t) |
372 |
368 |
(org-agenda-skip-scheduled-if-done t) |
373 |
369 |
(org-agenda-start-on-weekday nil) |
374 |
370 |
(org-reverse-note-order t) |
375 |
371 |
(org-fast-tag-selection-single-key (quote expert)) |
376 |
372 |
(org-agenda-custom-commands |
377 |
373 |
(quote (("d" todo "DELEGATED" nil) |
378 |
374 |
("c" todo "DONE|DEFERRED|CANCELED" nil) |
379 |
375 |
("w" todo "WAITING" nil) |
380 |
376 |
("W" agenda "" ((org-agenda-ndays 21))) |
381 |
377 |
("A" agenda "" |
382 |
378 |
((org-agenda-skip-function |
383 |
379 |
(lambda nil |
384 |
380 |
(org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) |
385 |
381 |
(org-agenda-ndays 1) |
386 |
382 |
(org-agenda-overriding-header "Today's Priority #A tasks: "))) |
387 |
383 |
("u" alltodo "" |
388 |
384 |
((org-agenda-skip-function |
389 |
385 |
(lambda nil |
390 |
386 |
(org-agenda-skip-entry-if (quote scheduled) (quote deadline) |
391 |
387 |
(quote regexp) "\n]+>"))) |
392 |
388 |
(org-agenda-overriding-header "Unscheduled TODO entries: ")))))) |
393 |
389 |
(org-capture-store-without-prompt t) |
394 |
390 |
(org-capture-templates |
395 |
391 |
(quote ((116 "* TODO %?\n %u" "~/Repositories/private/org/planning.org" "Tasks") |
396 |
392 |
(110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes")))) |
397 |
393 |
(capture-annotation-functions (quote (org-capture-annotation))) |
398 |
394 |
(capture-handler-functions (quote (org-capture-handler)))) |
399 |
395 |
|
400 |
396 |
;:general |
401 |
397 |
;(local-leader-def |
402 |
398 |
; :states 'normal |
403 |
399 |
; :keymaps 'org-mode-map |
404 |
400 |
; "e" 'org-export-dispatch |
405 |
401 |
; "x" 'org-table-export |
406 |
402 |
; "." 'org-time-stamp |
407 |
403 |
; "t" 'org-twbs-export-to-html |
408 |
404 |
; "s" 'org-schedule |
409 |
405 |
; "d" 'org-deadline |
410 |
406 |
; "'" 'org-edit-special) |
411 |
407 |
; :config |
412 |
408 |
; ;; log todo items with timestamp |
413 |
409 |
; (setq org-log-done 'time)) |
414 |
410 |
|
415 |
411 |
(use-package helm |
416 |
412 |
:hook (after-init . helm-mode) |
417 |
413 |
:commands (helm-autoresize-mode) |
418 |
414 |
:init |
419 |
415 |
;; (defvar helm-google-suggest-use-curl-p) |
420 |
416 |
(defvar helm-ff-search-library-in-sexp) |
421 |
417 |
(defvar helm-echo-input-in-header-line) |
422 |
418 |
(defvar helm-ff-file-name-history-use-recentf) |
423 |
419 |
:general |
424 |
420 |
(general-define-key |
425 |
421 |
"M-x" 'helm-M-x |
426 |
422 |
"M-:" 'helm-eval-expression |
427 |
423 |
"C-c h" 'helm-command-prefix) |
428 |
424 |
(general-define-key |
429 |
425 |
:keymaps 'helm-map |
430 |
426 |
"<tab>" 'helm-execute-persistent-action |
431 |
427 |
"C-i" 'helm-execute-persistent-action |
432 |
428 |
"C-z" 'helm-select-action) |
433 |
429 |
(my-leader-def |
434 |
430 |
:states 'normal |
435 |
431 |
"bb" 'helm-buffers-list |
436 |
432 |
"ff" 'helm-find-files |
437 |
433 |
"p" 'helm-show-kill-ring) |
438 |
434 |
:config |
439 |
435 |
(setq helm-split-window-inside-p t ; open helm buffer inside current window, not occupy whole other window |
440 |
436 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. |
441 |
437 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. |
442 |
438 |
helm-scroll-amount 8 ; scroll 8 lines other window using m-<next>/m-<prior> |
443 |
439 |
helm-ff-file-name-history-use-recentf t |
444 |
440 |
helm-echo-input-in-header-line t) |
445 |
441 |
|
446 |
442 |
;; hide some autogenerated files from helm |
447 |
443 |
(setq helm-ff-skip-boring-files t) |
448 |
444 |
;; (add-to-list 'helm-boring-file-regexp-list "\\~$") |
449 |
445 |
|
450 |
446 |
(setq helm-autoresize-max-height 0) |
451 |
447 |
(setq helm-autoresize-min-height 20) |
452 |
448 |
(helm-autoresize-mode 1)) |
453 |
449 |
|
454 |
450 |
|
455 |
451 |
(use-package rainbow-delimiters |
456 |
452 |
:hook (prog-mode . rainbow-delimiters-mode)) |
457 |
453 |
|
458 |
454 |
|
459 |
455 |
;; Settings for having an LaTeX beamer class export tool |
460 |
456 |
(unless (boundp 'org-export-latex-classes) |
461 |
457 |
(setq org-export-latex-classes nil)) |
462 |
458 |
(add-to-list 'org-export-latex-classes |
463 |
459 |
;; beamer class, for presentations |
464 |
460 |
'("beamer" |
465 |
461 |
"\\documentclass[11pt]{beamer}\n |
466 |
462 |
\\mode<{{{beamermode}}}>\n |
467 |
463 |
\\usetheme{{{{beamertheme}}}}\n |
468 |
464 |
\\usecolortheme{{{{beamercolortheme}}}}\n |
469 |
465 |
\\beamertemplateballitem\n |
470 |
466 |
\\setbeameroption{show notes} |
471 |
467 |
\\usepackage[utf8]{inputenc}\n |
472 |
468 |
\\usepackage[T1]{fontenc}\n |
473 |
469 |
\\usepackage{hyperref}\n |
474 |
470 |
\\usepackage{color} |
475 |
471 |
\\usepackage{listings} |
476 |
472 |
\\lstset{numbers=none,language=[ISO]C++,tabsize=4, |
477 |
473 |
frame=single, |
478 |
474 |
basicstyle=\\small, |
479 |
475 |
showspaces=false,showstringspaces=false, |
480 |
476 |
showtabs=false, |
481 |
477 |
keywordstyle=\\color{blue}\\bfseries, |
482 |
478 |
commentstyle=\\color{red}, |
483 |
479 |
}\n |
484 |
480 |
\\usepackage{verbatim}\n |
485 |
481 |
\\institute{{{{beamerinstitute}}}}\n |
486 |
482 |
\\subject{{{{beamersubject}}}}\n" |
487 |
483 |
|
488 |
484 |
("\\section{%s}" . "\\section*{%s}") |
489 |
485 |
|
490 |
486 |
("\\begin{frame}[fragile]\\frametitle{%s}" |
491 |
487 |
"\\end{frame}" |
492 |
488 |
"\\begin{frame}[fragile]\\frametitle{%s}" |
493 |
489 |
"\\end{frame}"))) |
494 |
490 |
|
495 |
491 |
;; Adds a letter class, for formal letters |
496 |
492 |
|
497 |
493 |
(add-to-list 'org-export-latex-classes |
498 |
494 |
|
499 |
495 |
'("letter" |
500 |
496 |
"\\documentclass[11pt]{letter}\n |
501 |
497 |
\\usepackage[utf8]{inputenc}\n |
502 |
498 |
\\usepackage[T1]{fontenc}\n |
503 |
499 |
\\usepackage{color}" |
504 |
500 |
|
505 |
501 |
("\\section{%s}" . "\\section*{%s}") |
506 |
502 |
("\\subsection{%s}" . "\\subsection*{%s}") |
507 |
503 |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") |
508 |
504 |
("\\paragraph{%s}" . "\\paragraph*{%s}") |
509 |
505 |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) |
510 |
506 |
|
511 |
507 |
|
512 |
508 |
(custom-set-faces |
513 |
509 |
;; custom-set-faces was added by Custom. |
514 |
510 |
;; If you edit it by hand, you could mess it up, so be careful. |
515 |
511 |
;; Your init file should contain only one such instance. |
516 |
512 |
;; If there is more than one, they won't work right. |
517 |
513 |
) |
518 |
514 |
|
+ |
515 |
|
+ |
516 |
;; This is to fix the retarded scrolling behaviour in Emacs as much as possible: |
+ |
517 |
(setq redisplay-dont-pause t |
+ |
518 |
scroll-margin 1 |
+ |
519 |
scroll-step 1 |
+ |
520 |
scroll-conservatively 10000 |
+ |
521 |
scroll-preserve-screen-position 1) |
+ |
522 |
;; Stops Emacs from accelerating my scroll: |
+ |
523 |
(setq mouse-wheel-progressive-speed nil) |
+ |
524 |
;; Makes scrolling do 5 lines at a time, otherwise it's pretty slow |
+ |
525 |
(setq mouse-wheel-scroll-amount '(5)) |
+ |
526 |
upload-changes.sh ¶
2 additions and 2 deletions.
View changes Hide changes
1 |
1 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 shared/planning/ maarten@maartenv.be:/home/maarten/backup/shared/planning |
2 |
- | |
+ |
2 |
|
3 |
3 |
echo -e "Sending weekly folder to HQ: " |
4 |
4 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 shared/weekly/ maarten@maartenv.be:/home/maarten/backup/shared/weekly |
5 |
- | |
+ |
5 |
|
6 |
6 |
echo -e "Sending IDLab folder to HQ: " |
7 |
7 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 IDLab/ maarten@maartenv.be:/home/maarten/backup/IDLab |
8 |
8 |
|
9 |
9 |
echo -e "Checking all repositories for outstanding commits...\n" |
10 |
10 |
cd ~/repositories |
11 |
11 |
for directory in */ ; do |
12 |
12 |
cd $directory |
13 |
13 |
echo -e "Checking $directory...\n" |
14 |
14 |
files="$(git status -s)" |
15 |
15 |
if [ "${files:0:2}" == " M" ]; then |
16 |
16 |
echo -e "Repository $directory has uncommitted modifications!" |
17 |
17 |
else |
18 |
18 |
git push # Pushing the changes to the upstream repo if applicable |
19 |
19 |
fi |
20 |
20 |
cd .. # Returning to Repositories |
21 |
21 |
done |
22 |
22 |
|
23 |
23 |
cd ~ |
24 |
24 |