From aef87d31ea8a2e0f95c5f1e5ebb2fa0030dd2907 Mon Sep 17 00:00:00 2001 From: Julian Teu Date: Sat, 3 Feb 2018 00:19:10 +0100 Subject: Added dashboard with fortune and stuff to emacs. Added zone to emacs, and added paren mode --- .emacs | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.emacs b/.emacs index cc56937..89a1f7a 100644 --- a/.emacs +++ b/.emacs @@ -91,7 +91,7 @@ (setq c-default-style "k&r" c-basic-offset 4) -(add-hook 'c-mode-common-hook '(lambda () (c-toggle-auto-state 1))) +;;(add-hook 'c-mode-common-hook '(lambda () (c-toggle-auto-state 1))) (add-to-list 'auto-mode-alist '("\\.ino\\'" . c++-mode)) @@ -172,3 +172,33 @@ (global-set-key (kbd "M-p h") 'mc/mark-all-like-this) +(require 'dashboard) +(dashboard-setup-startup-hook) + +(require 'fortune) +(setq fortune-dir "/usr/share/games/fortunes") +(setq fortune-file "/usr/share/games/fortunes/fortunes") + +(defun dashboard-fortune (hej) + (insert "Fortune:\n") + (insert (with-temp-buffer + (shell-command "fortune" t) + (buffer-string))) + ) + + +(add-to-list 'dashboard-item-generators '(custom . dashboard-fortune)) + +(setq dashboard-items '((recents . 5) + (bookmarks . 5) + (custom . 3) + )) + +(require 'zone) +(zone-when-idle 120) + +(show-paren-mode 1) + + + + -- cgit v1.2.3