;;; init-ui-config.el --- -*- lexical-binding: t -*- ;; ;; Filename: init-ui-config.el ;; Description: Initialize UI Configurations ;; Author: Mingde (Matthew) Zeng ;; Copyright (C) 2019 Mingde (Matthew) Zeng ;; Created: Thu Mar 14 16:12:56 2019 (-0400) ;; Version: 2.0.0 ;; Last-Updated: Sat Dec 28 18:48:31 2019 (+0100) ;; By: Mikaƫl Capelle ;; URL: https://github.com/MatthewZMD/.emacs.d ;; Keywords: M-EMACS .emacs.d ui ;; Compatibility: emacs-version >= 26.1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; This initializes prettify-symbols-mode and other UI configurations ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or (at ;; your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (eval-when-compile (require 'init-const)) ;; PreSym ;; (global-prettify-symbols-mode 1) ;; (defun add-pretty-lambda () ;; "Make some word or string show as pretty Unicode symbols. See https://unicodelookup.com for more." ;; (setq prettify-symbols-alist ;; '( ;; ("lambda" . 955) ;; ("delta" . 120517) ;; ("epsilon" . 120518) ;; ("->" . 8594) ;; ("<=" . 8804) ;; (">=" . 8805) ;; ))) ;; (add-hook 'prog-mode-hook 'add-pretty-lambda) ;; (add-hook 'org-mode-hook 'add-pretty-lambda) ;; ;; -PreSym ;; TitleBar (setq-default frame-title-format '("M-EMACS - " user-login-name "@" system-name " - %b")) ;; -TitleBar ;; YorN (fset 'yes-or-no-p 'y-or-n-p) ;; -YorN ;; StartupScreen (setq inhibit-startup-screen t) (setq initial-major-mode 'text-mode) (setq initial-scratch-message "Present Day, Present Time...\n") ;; -StartupScreen ;; DisLineNum ;; Hook line numbers to only when files are opened, also use linum-mode for emacs-version< 26 (if (version< emacs-version "26") (global-linum-mode) (add-hook 'text-mode-hook #'display-line-numbers-mode) (add-hook 'prog-mode-hook #'display-line-numbers-mode)) ;; Display column numbers in modeline (column-number-mode 1) ;; -DisLineNum ;; Whitespace (setq-default fill-column 95) (setq-default whitespace-line-column 95) (add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 100))) (add-hook 'LaTeX-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'markdown-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'web-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'text-mode-hook #'whitespace-mode) (add-hook 'prog-mode-hook #'whitespace-mode) (add-hook 'before-save-hook 'whitespace-cleanup) ;; -Whitespace ;; DisTimeBat (display-time-mode 1) (display-battery-mode 1) ;; -DisTimeBat (provide 'init-ui-config) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; init-ui-config.el ends here