-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
748 lines (576 loc) · 23.7 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
;; -*- lexical-binding: t -*-
;; forbidden commands
(put 'narrow-to-region 'disabled nil)
(put 'set-goal-column 'disabled nil)
(put 'dired-find-alternate-file 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;; Proper start
(setq initial-scratch-message nil
inhibit-startup-message t
inhibit-startup-echo-area-message t
confirm-nonexistent-file-or-buffer nil
display-time-day-and-date t
display-time-24hr-format t
sentence-end-double-space nil ; period single space ends sentence
load-prefer-newer t
frame-resize-pixelwise t
x-underline-at-descent-line t
x-stretch-cursor t
use-system-tooltips nil
calc-multiplication-has-precedence nil
calc-kill-line-numbering nil
isearch-lazy-count t
display-raw-bytes-as-hex t
help-window-keep-selected t)
(setq-default major-mode 'text-mode
indent-tabs-mode nil)
(with-eval-after-load 'tool-bar
(tool-bar-mode -1))
(with-eval-after-load 'scroll-bar
(scroll-bar-mode -1))
(with-eval-after-load 'fringe
(set-fringe-mode '(0 . 0)))
(menu-bar-mode -1)
(show-paren-mode 1)
(column-number-mode 1)
(setq linum-format "%d ")
(size-indication-mode t)
(display-time)
(global-set-key (kbd "M-g") 'goto-line) ; M-g 'goto-line
(global-set-key (kbd "M-2") 'hippie-expand)
(require 'windmove) ; windmove
(windmove-default-keybindings 'shift)
(global-set-key (kbd "C-<left>") 'next-buffer) ; buffer move
(global-set-key (kbd "C-<right>") 'previous-buffer)
(global-set-key (kbd "<f5>") ; open ~/.emacs.d/init.el
(lambda ()
(interactive)
(find-file "~/.emacs.d/init.el")))
(global-set-key (kbd "<f6>")
(lambda ()
(interactive)
(find-file "~/org/rovancs.org")))
(global-set-key (kbd "<f9>") 'save-buffers-kill-emacs) ; hotkey for quit
(global-set-key (kbd "M-3") ; easy timestamp for rovancs.org
(lambda ()
(interactive)
(insert(format-time-string "%Y-%m-%d"))))
(unless (file-exists-p "~/.emacs.d/cache/") ; create default cache directory
(make-directory "~/.emacs.d/cache/"))
(defalias 'yes-or-no-p 'y-or-n-p) ; Useful aliases
(defalias 'perl-mode 'cperl-mode)
(defalias 'eb 'eval-buffer)
(defalias 'list-buffers 'ibuffer)
;; scrolling
(setq scroll-margin 0 ; do smooth scrolling, ...
scroll-conservatively 100000 ; ... the defaults ...
scroll-up-aggressively 0.0 ; ... are very ...
scroll-down-aggressively 0.0 ; ... annoying
scroll-preserve-screen-position t) ; preserve screen pos with C-v/M-v
(pixel-scroll-precision-mode)
;; some UTF-8 goodies
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-language-environment "UTF-8") ; prefer utf-8 for language settings
(set-input-method nil) ; no funky input for normal editing;
;; rectangles
(global-set-key (kbd "C-M-<return>") #'cua-rectangle-mark-mode)
;; savehist: save some history
(setq savehist-additional-variables ; also save...
'(search ring regexp-search-ring) ; ... my search entries ...
savehist-autosave-interval 60 ; save every minute (default: 5 min)
savehist-file "~/.emacs.d/cache/savehist") ; keep my home clean
(savehist-mode t) ; do customization before activation
;; autokill attached processess
(setq kill-buffer-query-functions
(remq 'process-kill-buffer-query-function
kill-buffer-query-functions)
confirm-kill-processes nil)
;; clipboard settings
(defun insert-from-primary-clipboard ()
"Insert the text from the current x-selection."
(interactive)
(when select-active-regions
(let (select-active-regions)
(deactivate-mark)))
(let ((primary
(cond
((eq system-type 'windows-nt)
;; MS-Windows emulates PRIMARY in x-get-selection, but not
;; in x-get-selection-value (the latter only accesses the
;; clipboard). So try PRIMARY first, in case they selected
;; something with the mouse in the current Emacs session.
(or (gui-get-selection 'PRIMARY)
(gui-get-primary-selection)))
((fboundp 'gui-get-primary-selection) ; MS-DOS and X.
;; On X, x-get-selection-value supports more formats and
;; encodings, so use it in preference to x-get-selection.
(or (gui-get-primary-selection)
(gui-get-selection 'PRIMARY)))
;; FIXME: What about xterm-mouse-mode etc.?
(t
(gui-get-selection 'PRIMARY)))))
(unless primary
(error "No selection is available"))
(push-mark (point))
(insert primary)))
(global-set-key (kbd "S-<insert>") 'insert-from-primary-clipboard)
(setq mouse-yank-at-point t)
;; zone-mode for .hu
(add-to-list 'auto-mode-alist '("\\.hu$" . zone-mode))
;; save hooks
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p) ; auto chmod scripts
;; configure autosave
(unless (file-exists-p "~/.autosaves")
(make-directory "~/.autosaves"))
(defun my-do-not-backup-pass-predicate (name)
(let ((case-fold-search nil))
(not
(string-match-p "/dev/shm/.*" name))))
(defun my-backup-predicate (name)
(and (normal-backup-enable-predicate name)
(my-do-not-backup-pass-predicate name)))
(setq backup-by-copying t ; don't clobber symlinks
backup-directory-alist
'(("." . "~/.autosaves")) ; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t ; use versioned backups
backup-enable-predicate #'my-backup-predicate)
(defun force-backup-of-buffer ()
(setq buffer-backed-up nil))
(add-hook 'before-save-hook 'force-backup-of-buffer)
;; smart shell start
(defun sh (name)
"Smart shell start"
(interactive "sShell name: ")
(shell name)
(delete-other-windows))
;; colorize shell and comint
(require 'ansi-color)
(defun colorize-compilation-buffer ()
(read-only-mode)
(ansi-color-apply-on-region (point-min) (point-max))
(read-only-mode))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;; configure ibuffer
(require 'ibuffer)
(setq ibuffer-saved-filter-groups
(quote (("Default"
("Dired" (mode . dired-mode))
("Perl" (mode . cperl-mode))
("Org" (or (mode . org-mode)
(name . "^\\*Calendar\\*$")))
("Magit" (name . "^\\*magit*"))
("Documentation" (or
(name . "^\\*WoMan*")
(mode . Info-mode)
(name . "^\\*Man*")
(name . "^\\*Help\\*$")))
("Elisp" (or
(mode . emacs-lisp-mode)))
("ERC" (or
(mode . erc-mode)))
("System" (or
(name . "^\\*scratch\\*$")
(name . "^\\*Messages\\*$")
(name . "^\\*Completions\\*$")
(mode . compilation-mode)
(name . "^\\*Shell*")
(mode . Custom-mode)))))))
(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-switch-to-saved-filter-groups "Default")))
;; configure tramp
(require 'tramp)
(setq shell-prompt-pattern "^[^a-zA-Z].*[~#$%>] *" ; we need a bit more funky pattern, as tramp will start $SHELL (sudo -s), ie., zsh for root user
tramp-default-method "sshx"
tramp-persistency-file-name "~/.emacs.d/cache/tramp")
;; yadm support
(add-to-list 'tramp-methods
'("yadm"
(tramp-login-program "yadm")
(tramp-login-args (("enter")))
(tramp-login-env (("SHELL") ("/bin/sh")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))))
;; Copy/Paste one line without selecting it
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive (if mark-active (list (region-beginning) (region-end))
(message "Copied line")
(list (line-beginning-position)
(line-beginning-position 2)))))
(defadvice kill-region (before slick-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
;; configure undo
(setq undo-limit 800000
undo-strong-limit 1200000
undo-outer-limit 120000000)
;; configure vc
(setq vc-follow-symlinks t) ; auto-follow version controlled symlinks
(add-hook 'log-edit-mode
(lambda ()
(flyspell-mode -1)))
;; configure diff
(setq diff-switches "-u")
;; configure ediff
(setq ediff-split-window-function 'split-window-horizontally
ediff-window-setup-function 'ediff-setup-windows-plain
ediff-keep-variants nil)
(setq-default ediff-auto-refine 'on)
;; configure SQL
(setq sql-sqlite-program "sqlite3")
;; configure dired
(require 'dired)
(setq dired-listing-switches "-alhX --time-style=long-iso") ; display size in human readable form
(setq image-dired-dir "~/.emacs.d/cache/image-dired/")
(setq dired-recursive-copies 'always
dired-recursive-deletes 'always
wdired-use-dired-vertical-movement t
wdired-allow-to-change-permissions t
dired-vc-rename-file t)
(setq dired-guess-shell-alist-user
'(("\\.avi\\|\\.flv\\|\\.mp4\\|\\.wmv\\|.mov" "mpv" "vlc")))
(require 'dired-aux)
(declare-function w32-shell-execute "w32fns.c")
(declare-function shell-command-guess "dired-aux" (files))
(defvar shell-command-guess-open "open")
(defun dired-do-open (&optional arg)
"Open the marked files or a file at click/point externally.
If files are marked, run the command from `shell-command-guess-open'
on each of marked files. Otherwise, run it on the file where
the mouse is clicked, or on the file at point."
(interactive "P" dired-mode)
(let ((files (if (mouse-event-p last-nonmenu-event)
(save-excursion
(mouse-set-point last-nonmenu-event)
(dired-get-marked-files nil arg))
(dired-get-marked-files nil arg)))
(command shell-command-guess-open))
(when (and (memq system-type '(windows-nt))
(equal command "start"))
(setq command "open"))
(when command
(dolist (file files)
(cond
((memq system-type '(gnu/linux))
(call-process command nil 0 nil file))
((memq system-type '(ms-dos))
(shell-command (concat command " " (shell-quote-argument file))))
((memq system-type '(windows-nt))
(w32-shell-execute command (convert-standard-filename file)))
((memq system-type '(cygwin))
(call-process command nil nil nil file))
((memq system-type '(darwin))
(start-process (concat command " " file) nil command file))
(t
(error "Open not supported on this system")))))))
;; configure woman
(require 'woman)
(setq woman-fontify t
woman-fill-frame t)
(set-face-attribute 'woman-bold nil
:inherit 'bold
:slant 'italic
:foreground "green")
;; configure help
(setq help-window-select t)
;; configure prog-mode
(add-hook 'prog-mode-hook 'subword-mode)
(add-hook 'prog-mode-hook 'prettify-symbols-mode)
;; configure winner-mode
(winner-mode 1)
;; configure calendar
(setq calendar-week-start-day 1)
;; spelling
(setq-default ispell-program-name "hunspell")
(ispell-change-dictionary "en_US" t)
;; turn off auto revert messages
(setq auto-revert-verbose nil)
;; recentf
(setq recentf-save-file "~/.emacs.d/cache/recentf.el")
(recentf-mode)
;; small utility functions which are needed for el-get initialization
(defun my--hostname-to-string ()
"insert the contents of /etc/hostname to a string"
(when (file-readable-p "/etc/hostname")
(with-temp-buffer
(insert-file-contents "/etc/hostname")
(buffer-string))))
(require 'subr-x)
;; Boostrap el-get
;; preinstall the following debian packages:
;; apt install hunspell hunspell-hu texinfo build-essential texlive
;; apt install global python3-pygments ripgrep install-info
;; apt install autoconf automake gcc libpng-dev libpoppler-dev
;; apt install libpoppler-glib-dev libz-dev make pkg-config zip
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el")
(goto-char (point-max))
(eval-print-last-sexp)))
;; configure elpa
(require 'package)
;; External libraries (with el-get)
(el-get-bundle el-get)
(el-get-bundle fixme
:type github
:pkgname "lewang/fic-mode"
:description "Show FIXME/TODO/BUG(...) in special face only in comments and strings"
(add-hook 'prog-mode-hook 'fic-mode))
(el-get-bundle org-mode
(with-eval-after-load 'org
(setq org-link-abbrev-alist
'(("RT" . "https://rt.info.ppke.hu/Ticket/Display.html?id=%s"))
org-return-follows-link t
org-CUA-compatible t
org-fontify-done-headline t
org-highlight-latex-and-related '(latex)
org-M-RET-may-split-line '((default . nil))
org-agenda-start-on-weekday 1
org-enforce-todo-checkbox-dependencies t)
(add-hook 'org-shiftup-final-hook 'windmove-up) ; Make windmove work in org-mode
(add-hook 'org-shiftleft-final-hook 'windmove-left)
(add-hook 'org-shiftdown-final-hook 'windmove-down)
(add-hook 'org-shiftright-final-hook 'windmove-right)
(defun myorg-update-parent-cookie ()
(when (equal major-mode 'org-mode)
(save-excursion
(ignore-errors
(org-back-to-heading)
(org-update-parent-todo-statistics)))))
(defadvice org-kill-line (after fix-cookies activate)
(myorg-update-parent-cookie))
(defadvice kill-whole-line (after fix-cookies activate)
(myorg-update-parent-cookie))
(eval-after-load 'org '(progn
(setq org-default-notes-file (concat org-directory "/notes.org"))))
;; plantuml
;; active Org-babel languages
(org-babel-do-load-languages
'org-babel-load-languages
'(;; other Babel languages
(plantuml . t)))
(setq org-plantuml-jar-path
(expand-file-name "~/bin/plantuml.jar"))
(defun my-org-confirm-babel-evaluate (lang body)
(not (string= lang "plantuml"))) ; don't ask for plantuml
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)))
(el-get-bundle emms
(with-eval-after-load 'emms
(emms-all)
(setq emms-cache-file "~/.emacs.d/cache/emms-cache"
emms-info-auto-update nil
emms-playlist-buffer-name "EMMS Playlist")
(if (file-readable-p "~/.emacs.d/cache/emms-cache")
(emms-cache-restore))
(require 'emms-player-mpd)
(setq emms-player-mpd-music-directory "~/Zene/"
emms-player-mpd-server-name "localhost"
emms-player-mpd-server-port "6600")
(setq emms-info-functions 'emms-info-mpd)
(add-to-list 'emms-player-list 'emms-player-mpd)
(emms-player-mpd-connect)))
(el-get-bundle mode-compile
(progn (autoload 'mode-compile "mode-compile"
"Command to compile current buffer file based on the major mode" t)
(global-set-key (kbd "C-c c") 'mode-compile)
(autoload 'mode-compile-kill "mode-compile"
"Command to kill a compilation launched by `mode-compile'" t)
(global-set-key (kbd "C-c k") 'mode-compile-kill)))
(el-get-bundle cperl-mode
(with-eval-after-load 'cperl-mode
(cperl-set-style "BSD")
(setq cperl-invalid-face nil
cperl-indent-parens-as-block t
cperl-tab-always-indent nil
cperl-highlight-variables-indiscriminately t
cperl-merge-trailing-else nil)
(define-key cperl-mode-map "{" 'nil))) ; smartparens fixup
(el-get-bundle haskell-mode
(progn (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(setq haskell-process-type 'cabal-repl)))
(el-get-bundle info+
(eval-after-load "info" '(require 'info+)))
(el-get-bundle solarized-emacs
(load-theme 'solarized-dark t))
(el-get-bundle dired+
:before (setq diredp-hide-details-initially-flag nil)
(progn (diredp-toggle-find-file-reuse-dir 1) ; reuse existing dired buffer
(setq dired-recursive-copies 'always ; recursive copy/delete
dired-recursive-deletes 'top
dired-dwim-target t
dired-omit-files (concat dired-omit-files "\\|^\\..+$"))
(define-key dired-mode-map (kbd "^") 'pasja-goto-up-in-dired)
(defun pasja-goto-up-in-dired ()
(interactive)
(let ((pasja-prev-dir-name (file-truename default-directory)))
(find-alternate-file "..")
(dired-goto-file pasja-prev-dir-name)))
(add-hook 'dired-mode-hook (lambda () (dired-omit-mode)))
(define-key dired-mode-map (kbd "j") #'dired-do-open)))
(el-get-bundle rainbow-delimiters
(outline-minor-mode t) ; TODO: https://github.com/sellout/emacs-color-theme-solarized/issues/165
(outline-minor-mode nil)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(el-get-bundle company-mode
(progn (global-company-mode)
(with-eval-after-load 'cperl-mode
(add-to-list 'company-dabbrev-code-modes 'cperl-mode))))
(el-get-bundle magit
(progn (global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "<f7>") (lambda ()
(interactive)
(magit-status "/yadm::")))
(with-eval-after-load 'magit
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1
magit-diff-refine-hunk t
magit-bury-buffer-function #'magit-restore-window-configuration))))
(el-get-bundle smartparens
(progn (require 'smartparens-config)
(smartparens-global-mode 1)))
(el-get-bundle replace+
(with-eval-after-load "replace"
'(require 'replace+)))
(el-get-bundle dired-sort-menu
(with-eval-after-load "dired"
'(require 'dired-sort-menu)))
(el-get-bundle dired-sort-menu+)
(el-get-bundle undo-tree
:before (setq undo-tree-history-directory-alist '(("." . "/tmp")))
(global-undo-tree-mode 1))
(el-get-bundle swiper
(progn (ivy-mode 1)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "C-c g") 'counsel-git)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-c r") 'counsel-rg)
(global-set-key (kbd "C-x 8") 'counsel-unicode-char)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)
(setq ivy-use-virtual-buffers t)))
(el-get-bundle ggtags
(progn
(add-hook 'prog-mode-hook #'ggtags-mode)))
(el-get-bundle beginend
:type github
:pkgname "DamienCassou/beginend"
:description "Redefine M-< and M-> (or any key bound to beginning-of-buffer or end-of-buffer) for some modes so that point moves to meaningful locations."
(beginend-global-mode))
(el-get-bundle ox-jira
:type github
:pkgname "stig/ox-jira.el"
:description "JIRA Backend for Org Export Engine")
(el-get-bundle markdown-mode)
(el-get-bundle php-mode)
(el-get-bundle s)
(el-get-bundle web-mode)
(el-get-bundle csv-mode)
(el-get-bundle apache-mode)
(el-get-bundle yaml-mode)
(el-get-bundle auctex)
(el-get-bundle alchemist)
(el-get-bundle dockerfile-mode)
(el-get-bundle grep+)
(el-get-bundle ffap-)
(el-get-bundle restclient)
(el-get-bundle yasnippet
(yas-global-mode 1))
(el-get-bundle image+
(with-eval-after-load 'image
'(require 'image+)))
(unless (string= (string-trim-right (my--hostname-to-string)) "hel")
(el-get-bundle! pdf-tools
:build (("make" "autobuild"))
(pdf-tools-install)))
(el-get-bundle x509-mode
:type github
:pkgname "jobbflykt/x509-mode"
:description "View certificates and CRLs using OpenSSL in Emacs")
(el-get-bundle erlang-mode)
(el-get-bundle lua-mode)
(el-get-bundle orgaggregate
:type github
:pkgname "tbanel/orgaggregate"
:description "Aggregating a table is creating a new table by computing sums, averages, and so on, out of material from the first table.")
(el-get-bundle posframe)
(el-get-bundle ivy-posframe
:type github
:pkgname "tumashu/ivy-posframe"
:description "ivy-posframe is a ivy extension, which let ivy use posframe to show its candidate menu."
(progn
(setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-center)))
(ivy-posframe-mode 1)))
(el-get-bundle prescient
:type github
:pkgname "radian-software/prescient.el"
:description "prescient.el is a library which sorts and filters lists of candidates, such as appear when you use a package like Ivy or Company."
(progn
(ivy-prescient-mode)
(company-prescient-mode)
(prescient-persist-mode)))
(el-get-bundle dired-rsync
:type github
:pkgname "stsquad/dired-rsync"
:description "This package adds a single command dired-rsync which allows the user to copy marked files in a dired buffer via rsync."
(define-key dired-mode-map (kbd "C-c C-r") 'dired-rsync))
(el-get-bundle! circe
(with-eval-after-load 'circe
(setq circe-reduce-lurker-spam t
circe-active-users-timeout 43200
circe-color-nicks-everywhere t
circe-highlight-nick-type 'occurence
circe-server-max-reconnect-attempts nil
circe-format-server-topic "*** Topic change by {origin}: {topic-diff}"
circe-format-self-say "<{nick}> {body}"
circe-new-buffer-behavior 'ignore)
(require 'circe-color-nicks)
(enable-circe-color-nicks)
(add-hook 'circe-chat-mode-hook 'my-circe-prompt)
(defun my-circe-prompt ()
(lui-set-prompt
(concat (propertize (concat (buffer-name) "")
'face 'circe-prompt-face)
" ")))
(require 'circe-lagmon)
(circe-lagmon-mode)
(require 'lui-autopaste)
(add-hook 'circe-channel-mode-hook 'enable-lui-autopaste)
(require 'lui-logging)
(setq lui-logging-directory "~/irclog/"
lui-logging-file-format "{buffer}@{network}"
lui-logging-format "[%Y-%m-%d %T] {text}")
(add-hook 'circe-chat-mode-hook 'enable-lui-logging)
(setq lui-time-stamp-position 'left
lui-time-stamp-format "%H:%M "
lui-fill-type nil)
(when (string= (string-trim-right (my--hostname-to-string)) "hel") ; autojoin
(when (string= (daemonp) "irc")
(add-to-list 'load-path "~/.emacs.d/secrets/")
(require 'ercidentities)
(enable-circe-new-day-notifier)
(add-to-list 'circe-format-not-tracked 'circe-new-day-notifier-format-message)))))
(el-get 'sync)
;; External libraries
(add-to-list 'load-path "~/.emacs.d/plugins")
(byte-recompile-directory "~/.emacs.d/plugins/" 0) ; auto byte-compile all of them
(mapc 'load-file
(directory-files "~/Emacsconfig/plugins" t ".elc$")) ; load them all!
;; Customize
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)