-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path+ui.el
135 lines (108 loc) · 5.35 KB
/
+ui.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
129
130
131
132
133
134
135
;;; +ui.el -*- lexical-binding: t; -*-
;; Change the theme
(setq doom-theme 'doom-palenight)
;; Default font scale
(setq resolution-factor 2)
;; When on my desktop, increase the font size
(when (string= (downcase (system-name)) "korriban")
(setq resolution-factor 1.5))
(when (string= (downcase (system-name)) "kashyyk")
(setq resolution-factor 1.5))
;; JetBrains Mono has been my favourite font since first learning to program
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size (eval (round (* 13 resolution-factor)))))
(setq doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size (eval (round (* 18 resolution-factor)))))
(setq +modeline-height (eval (round (* 14 resolution-factor))))
(setq doom-font-increment 1)
;; Update window divider in terminal
;; https://www.reddit.com/r/emacs/comments/3u0d0u/how_do_i_make_the_vertical_window_divider_more/
(unless (display-graphic-p)
(defun my-change-window-divider ()
(ignore-errors
(let ((display-table (or buffer-display-table standard-display-table)))
(set-display-table-slot display-table 5 ?│))))
;; (set-window-display-table (selected-window) display-table)
(add-hook 'window-configuration-change-hook #'my-change-window-divider))
(after! doom-modeline
(setq doom-modeline-buffer-file-name-style 'truncate-with-project
doom-modeline-major-mode-icon t
;; My mac vsplit screen won't fit
doom-modeline-window-width-limit (- fill-column 10)))
;;;;;;;;;;;;;;;;
;; Workspaces ;;
;;;;;;;;;;;;;;;;
(after! persp-mode
(setq persp-emacsclient-init-frame-behaviour-override "main")
(setq +workspaces-on-switch-project-behavior nil)
;; see documentation for other possible values
(setq persp-add-buffer-on-after-change-major-mode t)
;; above setting will not discriminate and bring ephemeral buffers e.g.
;; *magit* which you probably don't want. You can filter them out.
(add-hook 'persp-common-buffer-filter-functions
;; there is also `persp-add-buffer-on-after-change-major-mode-filter-functions'
#'(lambda (b) (string-prefix-p "*" (buffer-name b))))
(shut-up
(run-with-idle-timer 10 t #'doom/quicksave-session))
(add-hook 'after-make-frame-functions #'doom/quickload-session)
(add-hook 'delete-frame-functions #'doom/quicksave-session))
(remove-hook 'doom-init-ui-hook #'blink-cursor-mode)
;; I actually have grown to really appreciate line numbers
(setq display-line-numbers-type t)
(defface breakpoint-enabled '((t)) "Breakpoint face.")
(when (featurep :system 'macos)
;; enable ligatures support
;; details here: https://github.com/tonsky/FiraCode/wiki/Emacs-instructions
(ignore-errors
(mac-auto-operator-composition-mode)))
(after! ibuffer
(setq-hook! 'ibuffer-hook ibuffer-formats
'((mark modified read-only locked " "
(name 50 18 :left :elide)
" "
(size 9 -1 :right)
" "
(mode 16 16 :left :elide)
" " filename-and-process)
(mark " "
(name 16 -1)
" " filename))))
(use-package! all-the-icons-ibuffer
:after ibuffer
:init (all-the-icons-ibuffer-mode 1))
(add-hook! 'process-menu-mode-hook
(setq-local tabulated-list-format [("Process" 30 t)
("PID" 7 t)
("Status" 7 t)
("Buffer" 15 t)
("TTY" 12 t)
("Command" 0 t)]))
(after! centered-window
(setq cwm-centered-window-width 160))
;; Replace splash screen so people stop asking why I am playing a game
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
(remove-hook '+doom-dashboard-mode-hook #'(lambda () (hl-line-mode -1)))
(add-hook '+doom-dashboard-mode-hook 'hide-mode-line-mode)
(defun doom-dashboard-draw-ascii-emacs-banner-fn ()
(let* ((banner
'(" ___ ___ ___ ___ ___ "
" /\\__\\ /\\ \\ /\\ \\ /\\__\\ /\\__\\"
" /:/ _/_ |::\\ \\ /::\\ \\ /:/ / /:/ _/_"
" /:/ /\\__\\ |:|:\\ \\ /:/\\:\\ \\ /:/ / /:/ /\\ \\"
" /:/ /:/ _/_ __|:|\\:\\ \\ /:/ /::\\ \\ /:/ / ___ /:/ /::\\ \\"
" /:/_/:/ /\\__\\/::::|_\\:\\__\\/:/_/:/\\:\\__\\/:/__/ /\\__\\/:/_/:/\\:\\__\\"
" \\:\\/:/ /:/ /\\:\\~~\\ \\/__/\\:\\/:/ \\/__/\\:\\ \\ /:/ /\\:\\/:/ /:/ /"
" \\::/_/:/ / \\:\\ \\ \\::/__/ \\:\\ /:/ / \\::/ /:/ /"
" \\:\\/:/ / \\:\\ \\ \\:\\ \\ \\:\\/:/ / \\/_/:/ /"
" \\::/ / \\:\\__\\ \\:\\__\\ \\::/ / /:/ /"
" \\/__/ \\/__/ \\/__/ \\/__/ \\/__/"))
(longest-line (apply #'max (mapcar #'length banner))))
(put-text-property
(point)
(dolist (line banner (point))
(insert (+doom-dashboard--center
+doom-dashboard--width
(concat
line (make-string (max 0 (- longest-line (length line)))
32)))
"\n"))
'face 'doom-dashboard-banner)))
(setq +doom-dashboard-ascii-banner-fn #'doom-dashboard-draw-ascii-emacs-banner-fn)