nixos/home/emacs/modules/custom-ui-config.el
Evie Litherland-Smith 32436bb052 Switch emacs package definitions to use use-package
First pass, think I got everything but may need tweaking with use and testing
2023-10-31 07:45:39 +00:00

107 lines
2.8 KiB
EmacsLisp

;;; custom-ui-config.el -*- lexical-binding: t; -*-
;; Copyright (C) 2023
;; SPDX-License-Identifier: MIT
;; Author: System Crafters Community
;;; Code:
(setq use-dialog-box nil
display-line-numbers 'relative
fill-column 80)
(defun my/set-frame-alpha () (set-frame-parameter nil 'alpha-background 80))
(tool-bar-mode -1)
(scroll-bar-mode -1)
(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font-12"))
(global-prettify-symbols-mode +1)
(global-word-wrap-whitespace-mode +1)
(set-frame-parameter nil 'alpha-background 80)
(add-hook 'server-after-make-frame-hook (lambda () (set-frame-parameter nil 'alpha-background 80)))
(use-package doom-themes
:ensure t
:config
(load-theme 'doom-tokyo-night t))
;; Nerd-Icons modes
(use-package nerd-icons-dired
:requires nerd-icons
:ensure t
:config
(add-hook 'dired-mode-hook #'nerd-icons-dired-mode))
(use-package nerd-icons-ibuffer
:requires nerd-icons
:ensure t
:config
(add-hook 'ibuffer-mode-hook #'nerd-icons-ibuffer-mode))
(use-package nerd-icons-completion
:requires (nerd-icons marginalia)
:ensure t
:config
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))
;; Doom-Modeline
(use-package doom-modeline
:ensure t
:config
(setq doom-modeline-icon t
doom-modeline-mu4e t)
(display-battery-mode)
(doom-modeline-mode +1))
;; Extra minor-modes
(use-package which-key
:ensure t
:config
(which-key-mode +1))
(use-package page-break
:ensure t
:config
(global-page-break-lines-mode +1))
;; Weather in modeline
(use-package display-wttr
:ensure t
:config
(setq display-wttr-format 1)
(display-wttr-mode +1))
;;;; Help Buffers
;; Make `describe-*' screens more helpful
(use-package helpful
:ensure t
:config
(keymap-set helpful-mode-map "<remap> <revert-buffer>" #'helpful-update)
(keymap-global-set "<remap> <describe-command>" #'helpful-command)
(keymap-global-set "<remap> <describe-function>" #'helpful-callable)
(keymap-global-set "<remap> <describe-key>" #'helpful-key)
(keymap-global-set "<remap> <describe-symbol>" #'helpful-symbol)
(keymap-global-set "<remap> <describe-variable>" #'helpful-variable)
(keymap-global-set "C-h F" #'helpful-function))
;; Bind extra `describe-*' commands
(keymap-global-set "C-h K" #'describe-keymap)
;; add visual pulse when changing focus, like beacon but built-in
;; from from https://karthinks.com/software/batteries-included-with-emacs/
(defun pulse-line (&rest _)
"Pulse the current line."
(pulse-momentary-highlight-one-line (point)))
(dolist (command '(scroll-up-command
scroll-down-command
recenter-top-bottom
other-window))
(advice-add command :after #'pulse-line))
(provide 'custom-ui-config)
;;; custom-ui-config.el ends here