-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinterface.el
75 lines (58 loc) · 1.88 KB
/
interface.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
(setq default-major-mode 'text-mode)
(setq-default fill-column 66)
(setq inhibit-startup-echo-area-message t)
(setq inhibit-startup-message t)
(setq sentence-end-double-space nil)
;; Global auto revert mode
(global-auto-revert-mode t)
;; Show paren-mode
(show-paren-mode)
;; No toolbar, no scroll bar
(tool-bar-mode -1)
(scroll-bar-mode -1)
;; Color
(load-theme 'wombat)
(set-background-color "black")
;; Font size
(set-face-attribute 'default nil :height 180)
(global-set-key [(super +)] 'text-scale-increase )
(global-set-key [(super -)] 'text-scale-decrease )
;; Window size
(global-set-key [(control super up)] 'enlarge-window)
(global-set-key [(control super down)] 'shrink-window)
(global-set-key [(control super right)] 'enlarge-window-horizontally)
(global-set-key [(control super left)] 'shrink-window-horizontally)
;; Global whitespace-mode
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; smex
(global-set-key "\M-x" 'smex)
; Shell Modeline Dirtrack
(defun add-mode-line-dirtrack ()
(add-to-list
'mode-line-buffer-identification
'(:propertize (" " default-directory " ") face dired-directory)))
(add-hook 'shell-mode-hook 'add-mode-line-dirtrack)
; Uniquify buffernames
(require 'uniquify)
;; Workgroups
(require 'workgroups)
(workgroups-mode 1)
(wg-load "~/.emacs.d/wg")
(add-hook 'kill-emacs-hook 'wg-update-all-workgroups-and-save)
;; Recent files
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(defun recentf-ido-find-file ()
"Find a recent file using Ido."
(interactive)
(let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))
(when file
(find-file file))))
(global-set-key "\C-x\C-r" 'recentf-ido-find-file)
(setq display-time-day-and-date t
display-time-24hr-format t)
(display-time)