/
my-windows.el
85 lines (63 loc) · 2.63 KB
/
my-windows.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
;; Put scroll bar on the right side
(set-scroll-bar-mode 'right)
(set-scroll-bar-mode nil)
;; Remove graphical toolbar (if version 21 or higher)
(tool-bar-mode 0)
;; If Emacs "hangs" for a few seconds while starting, you might have
;; to comment out or change the following line that tries to set the
;; font to a fixed width font:
;;(set-default-font "fixed")
;;(set-default-font "9x15") ;; high resolution monitor, bigger fonts
;;(set-default-font "-xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-1")
;; don't show tooltips
(tooltip-mode 0)
;; use mouse wheel to scroll
(mouse-wheel-mode t)
;; Default: scroll with middle, page-up with left click, page down with right
;; Scroll with left mouse button
;; This only works with the plain scroll bar, not the Xaw3d variety
(global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag)
;; Page down with middle button
(global-set-key [vertical-scroll-bar mouse-2] 'scroll-bar-scroll-up)
(global-set-key [vertical-scroll-bar drag-mouse-2] 'scroll-bar-scroll-up)
(global-unset-key [vertical-scroll-bar down-mouse-2])
;; Page up with right button
(global-set-key [vertical-scroll-bar mouse-3] 'scroll-bar-scroll-down)
(global-set-key [vertical-scroll-bar drag-mouse-3] 'scroll-bar-scroll-down)
;; basic colors
(setq default-frame-alist '((cursor-color . "RoyalBlue")
(cursor-type . box)
(foreground-color . "black")
(background-color . "white")))
;; modeline colors
(set-face-background 'mode-line "DarkOliveGreen2")
(set-face-foreground 'mode-line "black")
;; (mouse-avoidance-mode 'animate) ;; Cool...but annoying
(setq frame-title-format
'(:eval
(if buffer-file-name
(replace-regexp-in-string
(getenv "HOME") "~"
(concat (file-name-directory buffer-file-name) "%b") )
(buffer-name)
)))
(defun toggle-fullscreen (&optional f)
(interactive)
(let ((current-value (frame-parameter nil 'fullscreen)))
(set-frame-parameter nil 'fullscreen
(if (equal 'fullboth current-value)
(if (boundp 'old-fullscreen) old-fullscreen nil)
(progn (setq old-fullscreen current-value)
'fullboth)))))
(global-set-key (kbd "<f11>") 'toggle-fullscreen)
(setq display-buffer-function nil)
(setq display-buffer-reuse-frames t)
(setq pop-up-windows nil)
(require 'workgroups)
(workgroups-mode 1)
(setq wg-prefix-key (kbd "C-z"))
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)
(require 'midnight)
(clean-buffer-list)
(provide 'my-windows)