blob: 2db87ace39d4c1ca0d65e655cbfd669bb8269ed6 (
plain)
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
|
;; Time-stamp: <2020-02-08 13:07:24 (tslil@bison)>
(use-package fortune
:config
(setq fortune-dir "/usr/share/fortune/"
fortune-program "fortune"
fortune-file "/usr/share/fortune/cookie"
fortune-program-options '("-s" "tao" "wisdom"))
(defun dashboard-fortune (n)
(insert
(if (evenp (random 2))
(with-temp-buffer
(let ((fortune-buffer-name (current-buffer)))
(fortune-in-buffer t)
(buffer-string)))
(shell-command-to-string "shuf -n 1 ~/store/quotes")))))
(use-package dashboard
:ensure t
:config
(add-to-list 'dashboard-item-generators '(fortune . dashboard-fortune))
(setq dashboard-center-content t
dashboard-set-init-info t
dashboard-set-footer nil
dashboard-banners-directory (expand-file-name "~/.emacs.d/banners/")
dashboard-startup-banner 5
dashboard-items '((recents . 5)
(projects . 5)
(fortune . 0))
dashboard-init-info (format "Welcome ~%s!" (user-login-name)))
(dashboard-setup-startup-hook))
|