2023-10-25 15:47:35 +01:00
|
|
|
;;; custom-ui-config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Copyright (C) 2023
|
|
|
|
;; SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
;; Author: System Crafters Community
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2023-10-27 08:03:51 +01:00
|
|
|
(setq use-dialog-box nil
|
2023-11-02 16:02:05 +00:00
|
|
|
fill-column 80
|
|
|
|
truncate-lines nil
|
|
|
|
truncate-partial-width-windows nil)
|
2023-10-27 08:03:51 +01:00
|
|
|
|
2023-11-03 07:03:40 +00:00
|
|
|
(menu-bar-mode -1)
|
2023-11-02 16:02:05 +00:00
|
|
|
(tab-bar-mode -1)
|
2023-10-27 08:03:51 +01:00
|
|
|
(tool-bar-mode -1)
|
|
|
|
(scroll-bar-mode -1)
|
2023-11-03 07:03:40 +00:00
|
|
|
(line-number-mode)
|
|
|
|
(global-display-line-numbers-mode -1)
|
2023-10-27 08:03:51 +01:00
|
|
|
(global-prettify-symbols-mode +1)
|
2023-11-02 16:02:05 +00:00
|
|
|
(global-visual-line-mode +1)
|
2023-11-05 05:55:52 +00:00
|
|
|
;; (set-frame-font "FiraCode Nerd Font-12")
|
|
|
|
;; (set-frame-parameter nil 'alpha-background 80)
|
2023-10-29 07:00:48 +00:00
|
|
|
|
|
|
|
;; Nerd-Icons modes
|
2023-11-01 08:37:30 +00:00
|
|
|
(when (require 'nerd-icons)
|
2023-11-05 05:55:52 +00:00
|
|
|
(nerd-icons-set-font "Symbols Nerd Font Mono")
|
2023-11-01 08:37:30 +00:00
|
|
|
(when (require 'nerd-icons-dired nil :noerror)
|
|
|
|
(add-hook 'dired-mode-hook #'nerd-icons-dired-mode))
|
2023-10-29 07:00:48 +00:00
|
|
|
|
2023-11-01 08:37:30 +00:00
|
|
|
(when (require 'nerd-icons-ibuffer nil :noerror)
|
|
|
|
(add-hook 'ibuffer-mode-hook #'nerd-icons-ibuffer-mode))
|
2023-10-29 07:00:48 +00:00
|
|
|
|
2023-11-01 08:37:30 +00:00
|
|
|
(when (require 'nerd-icons-completion nil :noerror)
|
|
|
|
(nerd-icons-completion-mode)
|
|
|
|
(when (require 'marginalia nil :noerror)
|
|
|
|
(add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))))
|
2023-10-29 07:00:48 +00:00
|
|
|
|
|
|
|
;; Doom-Modeline
|
2023-11-01 08:37:30 +00:00
|
|
|
(setq doom-modeline-icon t
|
2023-11-03 06:34:49 +00:00
|
|
|
doom-modeline-mu4e nil ;; Use mu4e own formatting
|
2023-11-01 08:37:30 +00:00
|
|
|
doom-modeline-modal nil
|
|
|
|
doom-modeline-modal-icon nil
|
|
|
|
doom-modeline-persp-name nil
|
|
|
|
doom-modeline-persp-icon nil)
|
2023-10-31 07:59:37 +00:00
|
|
|
(when (require 'doom-modeline nil :noerror)
|
2023-10-29 07:00:48 +00:00
|
|
|
(doom-modeline-mode +1))
|
2023-10-27 08:03:51 +01:00
|
|
|
|
2023-11-05 08:14:51 +00:00
|
|
|
(setq mu4e-use-fancy-chars t
|
|
|
|
mu4e-headers-thread-single-orphan-prefix '("─>" . "─▶")
|
|
|
|
mu4e-headers-thread-orphan-prefix '("┬>" . "┬▶")
|
|
|
|
mu4e-headers-thread-connection-prefix '("│ " . "│ ")
|
|
|
|
mu4e-headers-thread-first-child-prefix '("├>" . "├▶")
|
|
|
|
mu4e-headers-thread-child-prefix '("├>" . "├▶")
|
|
|
|
mu4e-headers-thread-last-child-prefix '("└>" . "╰▶")
|
|
|
|
mu4e-modeline-all-read '("R:" . ":")
|
|
|
|
mu4e-modeline-all-clear '("C:" . ":")
|
|
|
|
mu4e-modeline-new-items '("N:" . ":")
|
|
|
|
mu4e-modeline-unread-items '("U:" . ":")
|
|
|
|
mu4e-search-full-label '("F" . "")
|
|
|
|
mu4e-search-hide-label '("H" . "")
|
|
|
|
mu4e-search-related-label '("R" . "")
|
|
|
|
mu4e-search-skip-duplicates-label '("D" . "")
|
|
|
|
mu4e-search-threaded-label'("T" . "")
|
|
|
|
mu4e-alert-modeline-formatter 'mu4e-alert-default-mode-line-formatter)
|
|
|
|
|
2023-10-31 07:59:37 +00:00
|
|
|
;; Dashboard
|
2023-11-01 08:37:30 +00:00
|
|
|
(setq initial-buffer-choice 'dashboard-open
|
|
|
|
dashboard-icon-type 'nerd-icons
|
|
|
|
dashboard-set-heading-icons t
|
|
|
|
dashboard-set-file-icons t
|
|
|
|
dashboard-set-navigator t
|
|
|
|
dashboard-set-init-info t
|
|
|
|
dashboard-startup-banner 'ascii
|
|
|
|
dashboard-projects-backend 'project-el
|
|
|
|
dashboard-projects-switch-function 'project-switch-project
|
|
|
|
dashboard-projects-show-base t
|
|
|
|
dashboard-recentf-show-base 'align
|
2023-11-04 12:19:02 +00:00
|
|
|
dashboard-items '((recents . 5)
|
|
|
|
(agenda . 15))
|
|
|
|
dashboard-heading-icons '((recents . "nf-oct-history")
|
|
|
|
(agenda . "nf-oct-calendar"))
|
2023-11-01 08:37:30 +00:00
|
|
|
dashboard-banner-ascii (concat " .000000. \n"
|
|
|
|
" .0. .0. \n"
|
|
|
|
" .00. .00. \n"
|
|
|
|
" .000cl. .lc000. \n"
|
|
|
|
".0 0.\n"
|
|
|
|
"0. .o0000o. .0\n"
|
|
|
|
" 00 .0' '0. 00 \n"
|
|
|
|
" 00 .0 0. 00 \n"
|
|
|
|
" HHHHH HHHHHHHHHHHH HHHHH \n"
|
|
|
|
"HHHH HHH HHHHHHHHHHHHHH HHHH\n"
|
|
|
|
" HHHHHH HHHHHHHHH HHHHHHHH \n"
|
|
|
|
" HHH HHHH HHHHHHHHH HHHH \n"
|
|
|
|
" HHH HHHHHH \n"
|
|
|
|
" HHHHH HH \n"))
|
2023-11-04 12:19:02 +00:00
|
|
|
(when (require 'dashboard nil :noerror)
|
2023-11-04 12:23:46 +00:00
|
|
|
(keymap-global-set "C-c d" #'dashboard-open)
|
2023-11-04 12:19:02 +00:00
|
|
|
(add-hook 'dashboard-mode-hook #'khalel-import-events))
|
2023-10-31 07:59:37 +00:00
|
|
|
|
2023-10-27 08:03:51 +01:00
|
|
|
;; Extra minor-modes
|
2023-11-05 05:55:52 +00:00
|
|
|
(when (require 'git-gutter nil :noerror)
|
|
|
|
(global-git-gutter-mode +1))
|
|
|
|
|
2023-10-31 07:59:37 +00:00
|
|
|
(when (require 'which-key nil :noerror)
|
2023-10-29 07:00:48 +00:00
|
|
|
(which-key-mode +1))
|
|
|
|
|
2023-11-01 08:37:30 +00:00
|
|
|
(when (require 'page-break-lines nil :noerror)
|
2023-10-29 07:00:48 +00:00
|
|
|
(global-page-break-lines-mode +1))
|
2023-10-27 07:18:16 +01:00
|
|
|
|
2023-10-25 15:47:35 +01:00
|
|
|
;;;; Help Buffers
|
|
|
|
|
|
|
|
;; Make `describe-*' screens more helpful
|
2023-10-31 07:59:37 +00:00
|
|
|
(when (require 'helpful nil :noerror)
|
2023-10-25 15:47:35 +01:00
|
|
|
(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
|