summary refs log tree commit diff
path: root/emacs/custom/fcuny-ui.el
blob: 06141a023be555f47e587b9dcfd3802cb567aec9 (plain) (blame)
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
(use-package fringe
  :custom
  (left-fringe-width 0)
  (right-fringe-width 0)
  (fringes-outside-margins nil)
  (indicate-buffer-boundaries nil)
  (indicate-empty-lines nil)
  (overflow-newline-into-fringe t))

(use-package scroll-bar
  :config
  (scroll-bar-mode -1))

(use-package tool-bar
  :config
  (tool-bar-mode -1))

(use-package menu-bar
  :config
  (menu-bar-mode -1))

(use-package diminish
  :ensure t)

(use-package modus-themes
  :ensure t
  :init
  (setq modus-themes-italic-constructs t
        modus-themes-bold-constructs t
        modus-themes-lang-checkers '(text-also background)
        modus-themes-mode-line '(3d intense)
        modus-themes-diffs '(desaturated)
        modus-themes-fringes nil
        modus-themes-paren-match '(intense)
        modus-themes-syntax '(yellow-comments green-strings)
        modus-themes-hl-line '(accented intense)
        modus-themes-prompts '(italic)
        modus-themes-region '(bg-only no-extend)
        modus-themes-org-blocks '(tinted-background)
        modus-themes-org-agenda '((event . (accented italic))
                                  (scheduled . uniform))
        modus-themes-headings '((1 . (background))
                                (2 . (rainbow))
                                (3 . (rainbow no-bold)))
        modus-themes-variable-pitch-ui nil
        modus-themes-variable-pitch-headings nil
        modus-themes-scale-headings nil)

  ;; Load the theme files before enabling a theme (else you get an error).
  (modus-themes-load-themes)
  :config
  (setq modus-themes-operandi-color-overrides
        '((bg-main . "#fffff8")))
  (modus-themes-load-operandi))

(use-package frame
  :config
  (blink-cursor-mode -1)
  (setq frame-title-format '("%b@" (:eval (or (file-remote-p default-directory 'host) system-name))))
  (when (memq window-system '(mac ns))
    (set-frame-font "Source Code Pro-14")
    (add-to-list 'default-frame-alist '(fullscreen . maximized))
    (add-to-list 'default-frame-alist '(ns-appearance . nil))
    (add-to-list 'default-frame-alist '(ns-transparent-titlebar . nil))
    (when (boundp 'ns-use-native-fullscreen)
      (setq ns-use-native-fullscreen nil))
    (when (boundp 'mac-allow-anti-aliasing)
      (setq mac-allow-anti-aliasing t)))
  (when (memq window-system '(x))
    (set-frame-font "Source Code Pro-11")
    (set-face-attribute 'mode-line nil :font "Source Code Pro-10")
    ;; this is a fall back in the case we have Unicode characters.
    ;; For example, with this settings, the following source is
    ;; rendered correctly 😇 😀 and 🤢
    (set-fontset-font "fontset-default" nil
                      (font-spec :name "Noto Color Emoji"))))

(require 'time)
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-format "%a %e %b, %H:%M")
(setq display-time-interval 60)
(setq display-time-default-load-average nil)
(setq zoneinfo-style-world-list
      '(("UTC" "UTC")
        ("America/Los_Angeles" "Berkeley")
        ("America/Denver" "Mountain Time")
        ("America/Chicago" "Central Time")
        ("America/New_York" "New York")
        ("Europe/London" "London")
        ("Europe/Paris" "Paris")
        ("Asia/Calcutta" "Bangalore")
        ("Asia/Tokyo" "Tokyo")))

;; the following setup only works with emacs >=28 I think
(when (boundp 'world-clock-list)
  (setq world-clock-list t))

(when (boundp 'world-clock-time-format)
  (setq world-clock-time-format "%R %z  %A %d %B"))

(when (boundp 'world-clock-timer-enable)
  (setq world-clock-timer-enable t))

(when (boundp 'world-clock-timer-second)
  (setq world-clock-timer-second 60))

(display-time-mode t)

(use-package powerline
  :ensure t
  :config
  (setq powerline-default-separator 'arrow)
  (setq powerline-display-buffer-size nil)
  (setq powerline-display-mule-info t)
  (setq powerline-display-hud nil)
  (powerline-default-theme)
  (remove-hook 'after-focus-change-function 'powerline-unset-selected-window))

;; Disable help mouse-overs for mode-line as they provide little to no benefits
(setq mode-line-default-help-echo nil
      show-help-function nil)

(use-package hl-line
  :hook ((prog-mode text-mode conf-mode special-mode) . hl-line-mode)
  :custom
  ;; Not having to render the hl-line overlay in multiple buffers offers a tiny
  ;; performance boost. I also don't need to see it in other buffers.
  (hl-line-sticky-flag nil)
  (global-hl-line-sticky-flag nil))

(use-package uniquify
  :defer 5
  :config
  ;; don't muck with special buffers
  (setq uniquify-ignore-buffers-re "^\\*")
  (setq uniquify-buffer-name-style 'forward)
  (setq uniquify-separator "/"))

;; required for dap-mode and dap-ui-mode
(use-package posframe
  :ensure t)

(setq display-buffer-alist
      `(
        ("\\*\\(.* # Help.*\\|Help\\)\\*"    ; See the hooks for `visual-line-mode'
         (display-buffer-reuse-mode-window display-buffer-in-side-window)
         (window-width . 0.35)
         (side . left)
         (slot . 0))
        ("\\*\\(wclock\\).*"
           (display-buffer-in-side-window)
           (window-width . 0.35)
           (side . left)
           (slot . 0))))

(add-hook 'help-mode-hook #'visual-line-mode)

(provide 'fcuny-ui)