;;; Temporarily increase GC threshold to expedite Emacs startup
(let ((normal-gc-cons-threshold (* 20 1024 1024))
- (init-gc-cons-threshold (* 1024 1024 1024))
- (normal-mode-line-format mode-line-format))
- (setq gc-cons-threshold init-gc-cons-threshold
- mode-line-format nil)
+ (init-gc-cons-threshold (* 1024 1024 1024)))
+ (setq gc-cons-threshold init-gc-cons-threshold)
(add-hook 'after-init-hook
(lambda ()
- (setq gc-cons-threshold normal-gc-cons-threshold
- mode-line-format normal-mode-line-format))))
+ (setq gc-cons-threshold normal-gc-cons-threshold))))
;;; OS-specific settings
(pcase system-type
set-mark-command-repeat-pop t
;; fine-tune some theme settings
ef-themes-mixed-fonts t
- ef-themes-variable-pitch-ui t
+ ef-themes-variable-pitch-ui nil
ef-themes-region nil
osm-copyright nil
;; follow links to version-controlled files without confirming
corfu-cycle t
corfu-indexed-start 1
shell-kill-buffer-on-exit t
+ compilation-scroll-output t
+ display-time-default-load-average nil
;; allow disabling confirming before compilation via local variables
safe-local-variable-values '((compilation-read-command . nil))
;; TeX-view-program-selection '((output-pdf "PDF Tools"))
display-line-numbers-type 'relative
;; persist Git commit message history
savehist-additional-variables '(log-edit-comment-ring)
+ eldoc-minor-mode-string nil
+ flyspell-mode-line-string nil
+ paredit-lighter nil
;; IRC stuff
rcirc-default-nick "esy"
rcirc-server-alist '(("irc.libera.chat"
(defun esy/ttyper ()
(interactive)
- (eat "ttyper" t))
+ (let ((default-directory "~"))
+ (eat "ttyper" t)))
(defun esy/hut-builds ()
(interactive)
(interactive (list user-init-file))
(find-file init))
+(defun esy/ttyper ()
+ (interactive)
+ (let ((default-directory "~"))
+ (eat "ttyper" t)))
+
(with-eval-after-load 'shell
(keymap-set shell-mode-map "SPC" #'comint-magic-space))
"Display the JSON path at POINT. When KILL is non-nil, kill it too.
Interactively, POINT is point and KILL is the prefix argument."
- (interactive "d\nP" json-ts-mode)
+ (interactive "d\nP")
(let ((path (mapconcat (lambda (o) (format "%s" o))
(esy/json-path-to-position point)
".")))
(keymap-global-set "C-c l" #'org-store-link)
(keymap-global-set "C-c a" #'org-agenda)
(keymap-global-set "C-c v" #'vterm-other-window)
+(keymap-global-set "C-c p" #'sweeprolog-prefix-map)
(keymap-global-set "C-c S" #'scratch-buffer)
(keymap-global-set "C-c m" #'esy/emms-map)
(keymap-global-set "C-c !" #'consult-flymake)
(with-eval-after-load 'sweeprolog
(setq sweeprolog-top-level-persistent-history
(locate-user-emacs-file ".sweep_history"))
- (keymap-global-set "C-c p" sweeprolog-prefix-map)
(add-hook 'sweeprolog-mode-hook #'sweeprolog-electric-layout-mode)
(add-hook 'sweeprolog-top-level-mode-hook #'compilation-shell-minor-mode))
;; read feeds list from a separate file
elfeed-feeds (esy/feeds)))
+
+(with-eval-after-load 'whitespace-cleanup-mode
+ (setf (alist-get 'whitespace-cleanup-mode minor-mode-alist) '("")))
+
;;; Track currency exchange rates
(defvar esy/eur-to-ils-rates nil)
(let* ((svg (svg-create width height
:stroke "green"))
(time (float-time))
- (frame (* 60 60 24))
+ (frame (* 60 60 24 7))
(data (named-let loop ((rates esy/eur-to-ils-rates)
(acc nil)
(min most-positive-fixnum)
(insert-image (esy/plot-eur-to-ils-rates 300 500))
(insert "\n")))
-(push '(:eval (concat "1€=" (number-to-string (cdar esy/eur-to-ils-rates)) "₪ "))
- global-mode-string)
+(defvar esy/mode-line-format
+ '(" %+ "
+ mode-line-buffer-identification
+ " (%[" mode-name minor-mode-alist "%])"
+ (vc-mode vc-mode)
+ mode-line-process
+ mode-line-format-right-align
+ "%l:%c "
+ (-3 "%p")
+ " "
+ (:eval (concat "€~" (number-to-string (cdar esy/eur-to-ils-rates)) "₪ "))
+ display-time-string battery-mode-line-string))
+
+(add-hook 'after-init-hook
+ (lambda ()
+ (setq-default mode-line-format esy/mode-line-format)
+ (force-mode-line-update t)))
(provide 'init)
;;; init.el ends here