Emacs: Reformat appearance.el.
This commit is contained in:
parent
fe81e9cec6
commit
7d156ec586
|
@ -1,34 +1,35 @@
|
|||
;;; appearance.el --- Configure appearance. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-08T10:42:28+0100>
|
||||
;; Time-stamp: <2020-03-08T10:50:44+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; * Helpful visualizations.
|
||||
;; * Colors and theme.
|
||||
;; * Icon font.
|
||||
;; * Modeline stuff.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'basics/global-variables)
|
||||
|
||||
(use-package emacs
|
||||
:ensure nil
|
||||
|
||||
:custom
|
||||
;; If 2 files have the same name, append directory name after the filename.
|
||||
(uniquify-after-kill-buffer-p t)
|
||||
(uniquify-buffer-name-style 'post-forward)
|
||||
(uniquify-strip-common-suffix t)
|
||||
|
||||
: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)))
|
||||
)
|
||||
:custom ((uniquify-after-kill-buffer-p t)
|
||||
(uniquify-buffer-name-style 'post-forward)
|
||||
(uniquify-strip-common-suffix t))
|
||||
:config (progn
|
||||
(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
|
||||
|
@ -42,20 +43,14 @@
|
|||
;; See <https://github.com/domtronn/all-the-icons.el/issues/58>.
|
||||
:config (when (and (window-system)
|
||||
(not (my/font-installed-p "all-the-icons")))
|
||||
(all-the-icons-install-fonts t))
|
||||
)
|
||||
(all-the-icons-install-fonts t)))
|
||||
|
||||
(unless slow-computer
|
||||
(use-package doom-themes
|
||||
:after (all-the-icons)
|
||||
|
||||
:config
|
||||
(load-theme 'doom-molokai t)
|
||||
(doom-themes-visual-bell-config) ; Flash modeline on error.
|
||||
|
||||
:custom-face
|
||||
(font-lock-comment-face ((t (:foreground "#667755"))))
|
||||
)
|
||||
:config (progn (load-theme 'doom-molokai t)
|
||||
(doom-themes-visual-bell-config)) ; Flash modeline on error.
|
||||
:custom-face (font-lock-comment-face ((t (:foreground "#667755")))))
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Neat modeline.
|
||||
|
@ -66,19 +61,14 @@
|
|||
(doom-modeline-buffer-file-name-style 'truncate-except-project)
|
||||
(mode-line-percent-position nil) ; Don't display percentage.
|
||||
(doom-modeline-buffer-state-icon nil)) ; Don't display save icon.
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
)
|
||||
:hook (after-init . doom-modeline-mode))
|
||||
|
||||
;; 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 ()
|
||||
(display-line-numbers-mode -1))
|
||||
|
||||
(global-display-line-numbers-mode)
|
||||
)
|
||||
:config (progn (defun my/disable-line-numbers ()
|
||||
(display-line-numbers-mode -1))
|
||||
(global-display-line-numbers-mode)))
|
||||
|
||||
(provide 'basics/appearance)
|
||||
;;; appearance.el ends here
|
||||
|
|
Loading…
Reference in New Issue
Block a user