.emacs.d/init/basics/appearance.el

87 lines
2.4 KiB
EmacsLisp
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; appearance.el --- Configure appearance. -*- lexical-binding: t; -*-
;; Time-stamp: <2019-11-09T18:27:53+00:00>
;;; Commentary:
;;; Code:
(require 'basics/global-variables)
(use-package emacs
:ensure nil
:config
(tool-bar-mode -1) ; Hide toolbar.
(if (display-graphic-p)
(set-scroll-bar-mode 'right)) ; Put scrollbar to the right side.
(add-to-list 'default-frame-alist ; Set default font.
'(font . "Source Code Pro-10"))
(global-hl-line-mode t) ; Highlight current line.
(show-paren-mode t) ; Visualize matching parens.
(setq frame-title-format ; Show filename in frame title.
'(multiple-frames
"%b" ("" invocation-name "@" system-name " " buffer-file-truename)))
)
;; Icon font (required by doom and others).
(use-package all-the-icons
:config
(unless (file-exists-p "~/.local/share/fonts/all-the-icons.ttf")
(all-the-icons-install-fonts t))
)
;; Themes for doom-modeline.
(unless slow-computer
(use-package doom-themes
:after (all-the-icons)
:config
(load-theme 'doom-molokai t)
:custom-face
(font-lock-comment-face ((t (:inherit font-lock-comment-face
:foreground "#667755"))))
)
) ; unless slow-computer.
;; Neat modeline.
(use-package doom-modeline
:after (all-the-icons)
:init
(column-number-mode t) ; Show column numbers in modeline.
(size-indication-mode) ; Buffer size display in the modeline.
:config
(setq doom-modeline-minor-modes nil
;; doom-modeline-buffer-file-name-style 'relative-to-project
doom-modeline-buffer-file-name-style 'truncate-except-project)
:hook
(after-init . doom-modeline-mode)
)
;; If 2 files have the same name, append directory name after the filename.
(use-package uniquify
:ensure nil ; Builtin.
:custom
(uniquify-after-kill-buffer-p t)
(uniquify-buffer-name-style 'post-forward)
(uniquify-strip-common-suffix t)
)
;; Show line numbers on the left side of the buffer.
(use-package display-line-numbers
:if (>= emacs-major-version 26)
:config
(defun my/disable-line-numbers (&optional dummy)
(display-line-numbers-mode -1))
(global-display-line-numbers-mode)
)
(provide 'basics/appearance)
;;; appearance.el ends here