Emacs: move bell to mode-line

This commit is contained in:
Andrew Scott 2024-09-05 11:39:59 -04:00
parent b10d23a892
commit 654defc583
Signed by: a
GPG key ID: 7CD5A5977E4931C1

View file

@ -47,10 +47,10 @@
;; Restore `garbage-collect' and `file-name-handler-alist' settings
(add-hook 'elpaca-after-init-hook
(lambda ()
(setq file-name-handler-alist default-file-name-handler-alist
gc-cons-percentage 0.1
gc-cons-threshold (* 1024 1024 8))))
(lambda ()
(setq file-name-handler-alist default-file-name-handler-alist
gc-cons-percentage 0.1
gc-cons-threshold (* 1024 1024 8))))
;; Relocate `emacs-user-directory' to XDG_DATA_HOME
(setq user-emacs-directory
@ -88,12 +88,17 @@
;; Disable startup screen
(setq inhibit-startup-screen t)
;; Start in `fundamental-mode' instead of `lisp-interaction-mode' to avoid
;; loading unnecessary packages via hooks
;; Start in `fundamental-mode' to prevent loading of non-essential packages
(setq initial-major-mode 'fundamental-mode)
;; Visible bell only
(setq visible-bell t)
;; Visible bell in mode-line only
(setq ring-bell-function
(lambda ()
(let ((orig_fg (face-foreground 'mode-line)))
(set-face-foreground 'mode-line "#F2804F")
(run-with-idle-timer 0.1 nil
(lambda (fg) (set-face-foreground 'mode-line fg))
orig_fg))))
;; Fonts
{{- if eq .chezmoi.hostname "helix" }}
@ -102,18 +107,21 @@
(set-face-font 'fixed-pitch "Hack-24")
(set-face-font 'variable-pitch "DejaVu Sans-24")
{{- else }}
(push '(font . "Hack-12") default-frame-alist)
(set-face-font 'default "Hack-12")
(set-face-font 'fixed-pitch "Hack-12")
(set-face-font 'variable-pitch "DejaVu Sans-12")
(push '(font . "Hack-11") default-frame-alist)
(set-face-font 'default "Hack-11")
(set-face-font 'fixed-pitch "Hack-11")
(set-face-font 'variable-pitch "DejaVu Sans-11")
{{- end }}
;; Some GUI options
(push '(menu-bar-lines . 0) default-frame-alist)
(push '(tool-bar-lines . 0) default-frame-alist)
(push '(vertical-scroll-bars) default-frame-alist)
(push '(background-color . "#282828") default-frame-alist)
(push '(foreground-color . "#c6c6c6") default-frame-alist)
(let ((options '((undecorated . t)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(vertical-scroll-bars)
(background-color . "#282828")
(foreground-color . "#c6c6c6"))))
(dolist (option options)
(push option default-frame-alist)))
;; Make lsp-mode use plists
(setenv "LSP_USE_PLISTS" "true")