This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrhb_interface_config.el
128 lines (106 loc) · 3.47 KB
/
rhb_interface_config.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
(provide 'rhb_interface_config)
;; Turn off the UI
(if (fboundp 'scroll-bar-mode)
(scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode)
(tool-bar-mode -1))
(if (fboundp 'menu-bar-mode)
(menu-bar-mode -1))
;; Turn of the bell
(setq ring-bell-function 'ignore)
;; Turn off splash screen on startup
(setq inhibit-splash-screen t)
;; Turn on highlighting of selected region
(setq transient-mark-mode t)
;; Turn on highlighting of matching parens
(show-paren-mode t)
;; Show column number with line number
(setq column-number-mode t)
;; Turn off backups
(setq make-backup-files nil)
;; Set up Emacs to run bash as its primary shell.
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
;; Turn on the clock
(display-time)
;; Color scheme similar to vibrant ink from TextMate
(defun set-theme-to-vibrant-ink()
"http://github.com/smtlaissezfaire/emacs-extensions/tree/master/vibrant-ink.el"
(setq font-lock-maximum-decoration t)
;; Set colors
(set-background-color "black")
(set-foreground-color "white")
(set-cursor-color "yellow")
(set-face-foreground font-lock-type-face "white")
(set-face-foreground font-lock-comment-face "magenta4")
(set-face-foreground font-lock-keyword-face "orange red")
(set-face-foreground font-lock-function-name-face "orange")
(set-face-foreground font-lock-string-face "green"))
;; Default color scheme
;(set-theme-to-vibrant-ink)
; Use color-theme instead
(require 'color-theme)
(setq color-theme-load-all-themes nil)
(add-to-list 'load-path (concat emacs-dir "themes"))
(require 'color-theme-tangotango)
(color-theme-tangotango)
;(color-theme-initialize)
;(color-theme-midnight)
;(color-theme-charcoal-black)
;(color-theme-clarity)
;; Zenburn requires color-theme
;(require 'zenburn)
;(color-theme-zenburn)
;(require 'color-theme-solarized)
;(color-theme-solarized-dark)
;(load (concat emacs-dir "themes/color-theme-rlx"))
;(color-theme-rlx)
;; highlight the current line
(global-hl-line-mode t)
(set-face-background 'hl-line "#282828")
(require 'framemove)
(windmove-default-keybindings)
(setq framemove-hook-into-windmove t)
(require 'ansi-color)
(defun colorize-compilation-buffer()
(toggle-read-only)
(ansi-color-apply-on-region (point-min) (point-max))
(toggle-read-only))
(add-hook 'compliation-filter-hook 'colorize-compilation-buffer)
(put 'downcase-region 'disabled nil)
;; Make WoMan not open a new frame
(setq woman-use-own-frame nil)
;; Swap windows (stolen from Steve Yegge)
(defun swap-windows()
"If you have 2 windows, it swaps them."
(interactive)
(cond ((not (= (count-windows) 2))
(message "You need exactly 2 windows to do this."))
(t
(let*
((w1 (first (window-list)))
(w2 (second (window-list)))
(b1 (window-buffer w1))
(b2 (window-buffer w2))
(s1 (window-start w1))
(s2 (window-start w2)))
(set-window-buffer w1 b2)
(set-window-buffer w2 b1)
(set-window-start w1 s2)
(set-window-start w2 s1)))))
(defun find-file-next-frame(filename)
"If there is a second frame, run find-file there"
(cond ((not multiple-frames)
(message "Only one frame is present."))
(t
(let ((f (next-frame)))
(select-frame f)
(x-focus-frame f)
(find-file filename)))))
(defun dired-find-file-next-frame ()
"In dired, visit this file or directory in another frame."
(interactive)
(find-file-next-frame (file-name-sans-versions (dired-get-filename) t)))