aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/init-gui.el
blob: 86f0177bbb5e2d34f146d9c294f5ffa297d76f93 (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
36
37
38
39
40
41
42
43
44
45
;;-----------------------
;; Remove some GUI stuff
;;-----------------------
(setq use-file-dialog nil)
(setq use-dialog-box nil)
(setq inhibit-startup-screen t)
(setq inhibit-startup-echo-area-message t)
(tool-bar-mode 0)
(set-scroll-bar-mode nil)
(menu-bar-mode 0)
(setq make-backup-files nil)

;;----------------------------------------------------------------------------
;; Editor configuration
;;----------------------------------------------------------------------------
(setq indicate-empty-lines t)

(let ((no-border '(internal-border-width . 0)))
  (add-to-list 'default-frame-alist no-border)
  (add-to-list 'initial-frame-alist no-border))

(setq frame-title-format
      '((:eval (if (buffer-file-name)
                   (abbreviate-file-name (buffer-file-name))
                 "%b"))))
;; Non-zero values for `line-spacing' can mess up ansi-term and co,
;; so we zero it explicitly in those cases.
(add-hook 'term-mode-hook
	  (lambda ()
	    (setq line-spacing 0)))

;;----------------------------------------------------------------------------
;; Configure keys
;;----------------------------------------------------------------------------
(global-unset-key (kbd "C-z"))		; Stops C-z from minimizing window
(global-set-key (kbd "M-<down>") (lambda () (interactive) (sanityinc/adjust-opacity nil -2))) ; M-down less visibility
(global-set-key (kbd "M-<up>") (lambda () (interactive) (sanityinc/adjust-opacity nil 2))) ; M-up more visibility
(global-set-key (kbd "M-0") (lambda () (interactive) (modify-frame-parameters nil '((alpha . 100))))) ; M-0 standard visibility
(global-set-key (kbd "<f11>") 'myemacs/toggle-fullscreen) ; F11 FullScreen
(global-set-key (kbd "s-C-+") 'sacha/increase-font-size)	; C-+ increase font size
(global-set-key (kbd "s-C--") 'sacha/decrease-font-size)	; C-- decrease font size
(global-set-key (kbd "<f12>") 'revert-buffer-no-confirm)
(global-set-key (kbd "s-h") 'global-hl-line-mode)	; Highlight current line

(provide 'init-gui)