diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/custom/my-ui.el | 76 |
1 files changed, 31 insertions, 45 deletions
diff --git a/emacs/custom/my-ui.el b/emacs/custom/my-ui.el index 4bb3254..35bcc6b 100644 --- a/emacs/custom/my-ui.el +++ b/emacs/custom/my-ui.el @@ -1,47 +1,37 @@ -;;; my-ui.el --- configure UI elements +;;; my-ui.el --- configure UI elements -*- lexical-binding: t -*- + ;;; Commentary: ;;; Code: + (eval-and-compile (require 'use-package)) -(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 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)) - (add-to-list 'default-frame-alist '(font . "Source Code Pro-15")) - (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 pgtk)) - ;; if using `set-frame-font`, when opening a new frame with - ;; emacsclient, the font will not be used. Instead, use - ;; `default-frame-alist` to have the same font with emacsclient. - (add-to-list 'default-frame-alist '(font . "Source Code Pro-11")) - ;; 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 t 'symbol "Noto Color Emoji" nil 'append))) +;; cleaning up the UI +(scroll-bar-mode -1) +(tool-bar-mode -1) +(menu-bar-mode -1) +(blink-cursor-mode -1) + +(when (memq window-system '(mac ns)) + (add-to-list 'default-frame-alist '(font . "Source Code Pro-15")) + (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 pgtk)) + ;; if using `set-frame-font`, when opening a new frame with + ;; emacsclient, the font will not be used. Instead, use + ;; `default-frame-alist` to have the same font with emacsclient. + (add-to-list 'default-frame-alist '(font . "Source Code Pro-11")) + ;; 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 t 'symbol "Noto Color Emoji" nil 'append)) (use-package modus-themes :ensure t @@ -98,13 +88,9 @@ (setq mode-line-default-help-echo nil show-help-function 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 "/")) +(setq uniquify-ignore-buffers-re "^\\*" + uniquify-buffer-name-style 'forward + uniquify-separator "/") (setq display-buffer-alist `( |