From 89e1104811314fa4aae451bdd5039bc325e9abcd Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 18 Oct 2023 13:16:57 +0200 Subject: [PATCH] Update Emacs configuration --- .emacs.d/early-init.el | 3 +-- .emacs.d/init.el | 45 ------------------------------------- .emacs.d/theme/esy-theme.el | 24 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 47 deletions(-) diff --git a/.emacs.d/early-init.el b/.emacs.d/early-init.el index d938b7d..1598597 100644 --- a/.emacs.d/early-init.el +++ b/.emacs.d/early-init.el @@ -5,7 +5,6 @@ (tool-bar-mode -1) (set-scroll-bar-mode nil) -(setq mode-line-format nil) (setq package-enable-at-startup nil) @@ -13,7 +12,7 @@ ('gnu/linux (menu-bar-mode -1) (setq initial-frame-alist '((fullscreen . fullboth) - (alpha-background . 85)))) + (alpha-background . 92)))) ('android (setenv "PATH" (format "%s:%s" "/data/data/com.termux/files/usr/bin" (getenv "PATH"))) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 52a4322..b860e1a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -140,7 +140,6 @@ (elpaca gnu-elpa-keyring-update) (elpaca graphql-mode) (elpaca htmlize) -(elpaca ialign) (elpaca keycast) (elpaca kubernetes) (elpaca (oauth2 @@ -1487,50 +1486,6 @@ as the initial input for completion, and return that directory." (insert-image (esy/plot-eur-to-ils-rates 300 500)) (insert "\n"))) -(defvar esy/mode-line-format - '(" %+ " - (:eval (when-let (project (project-current)) - (list - (propertize (concat (project-name project) "/ ") - 'face 'italic)))) - (:propertize "%b" face mode-line-buffer-id) - " (%[" - mode-name mode-line-process minor-mode-alist - (:eval (when (window-dedicated-p) - " Dedicated")) - "%n%])" - (vc-mode vc-mode) - mode-line-format-right-align - (:eval (when (mode-line-window-selected-p) - (list - (let* ((last-rate (cdar esy/eur-to-ils-rates)) - (face-arrw (cond - ((< esy/eur-to-ils-average-rate last-rate) - '("↑" . error)) - ((< last-rate esy/eur-to-ils-average-rate) - '("↓" . success)) - (t - '("→" . warning)))) - (arrw (car face-arrw)) - (face (cdr face-arrw))) - (propertize (concat "€" arrw - (number-to-string last-rate) "₪") - 'face face)) - " " - 'display-time-string - 'battery-mode-line-string - " "))) - "%5l" - (4 "|%c") - " " - (-3 "%p") - "/%I ")) - -(add-hook 'after-init-hook - (lambda () - (setq-default mode-line-format esy/mode-line-format) - (force-mode-line-update t))) - (with-eval-after-load 'elisp-mode (setq elisp-flymake-byte-compile-load-path (cons "./" load-path))) diff --git a/.emacs.d/theme/esy-theme.el b/.emacs.d/theme/esy-theme.el index 82218c7..1314be4 100644 --- a/.emacs.d/theme/esy-theme.el +++ b/.emacs.d/theme/esy-theme.el @@ -28,5 +28,29 @@ '(font-lock-doc-face ((t :inherit font-lock-string-face :slant italic))) '(elisp-shorthand-font-lock-face ((t :inherit font-lock-keyword-face :slant italic)))) +(custom-theme-set-variables + 'esy + '(mode-line-format + '(" %+ " + (:eval (when-let (project (project-current)) + (list + (propertize (concat (project-name project) "/ ") + 'face 'italic)))) + (:propertize "%b" face mode-line-buffer-id) + " (%[" + mode-name mode-line-process minor-mode-alist + (:eval (when (window-dedicated-p) + " Dedicated")) + "%n%])" + (vc-mode vc-mode) + mode-line-format-right-align + (:eval (when (mode-line-window-selected-p) + (list "" 'display-time-string 'battery-mode-line-string " "))) + "%5l" + (4 "|%c") + " " + (-3 "%p") + "/%I "))) + (provide-theme 'esy) ;;; esy-theme.el ends here -- 2.39.2