Compare commits

..

3 Commits

Author SHA1 Message Date
coolneng 6035a22ce4
Enable smooth scrolling 2023-07-31 20:47:34 +02:00
coolneng 52d48f4375
Improve compilation buffer closing implementation 2023-07-31 20:46:21 +02:00
coolneng bd063ca02b
Revert "Disable PDF recoloring by default"
This reverts commit 518413d20d.
2023-06-12 14:04:56 +02:00
2 changed files with 19 additions and 9 deletions

3
+ui.el
View File

@ -8,7 +8,8 @@
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1)) (setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1))
;; Match pdf-tools colors to the theme and fit to page by default ;; Match pdf-tools colors to the theme and fit to page by default
(after! pdf-tools (after! pdf-tools
(setq pdf-view-midnight-colors '("#BBC2CF" . "#282C34"))) (setq pdf-view-midnight-colors '("#BBC2CF" . "#282C34"))
(add-hook 'pdf-tools-enabled-hook 'pdf-view-midnight-minor-mode))
;; Customize modeline ;; Customize modeline
(setq doom-modeline-major-mode-icon t (setq doom-modeline-major-mode-icon t
doom-modeline-buffer-encoding nil) doom-modeline-buffer-encoding nil)

View File

@ -37,14 +37,21 @@
(add-hook! 'csv-mode-hook 'csv-align-mode) (add-hook! 'csv-mode-hook 'csv-align-mode)
(add-hook! 'csv-mode-hook 'csv-header-line) (add-hook! 'csv-mode-hook 'csv-header-line)
;; Close compilation buffer if successful ;; Close compilation buffer if successful
(setq compilation-finish-functions (defun close-compilation-buffer-if-successful (buffer string)
(lambda (buf str) "Bury a compilation buffer if succeeded without warnings "
(if (null (string-match ".*exited abnormally.*" str)) (when (and (eq major-mode 'compilation-mode)
(progn (string-match "finished" string)
(run-at-time (not
"0.5 sec" nil 'delete-windows-on (with-current-buffer buffer
(get-buffer-create "*compilation*")) (search-forward "warning" nil t))))
(message "No Compilation Errors!"))))) (run-with-timer 1 nil
(lambda (buf)
(let ((window (get-buffer-window buf)))
(when (and (window-live-p window)
(eq buf (window-buffer window)))
(delete-window window))))
buffer)))
(add-hook 'compilation-finish-functions #'close-compilation-buffer-if-successful)
;; Map leader key for major mode to , ;; Map leader key for major mode to ,
(setq evil-snipe-override-evil-repeat-keys nil) (setq evil-snipe-override-evil-repeat-keys nil)
(setq doom-localleader-key ",") (setq doom-localleader-key ",")
@ -156,3 +163,5 @@
(use-package! centered-cursor-mode (use-package! centered-cursor-mode
:config :config
(global-centered-cursor-mode)) (global-centered-cursor-mode))
;; Enable smooth scrolling
(pixel-scroll-precision-mode)