nixos-config/extraFiles/config/emacs/config.el

42 lines
894 B
EmacsLisp
Raw Normal View History

2023-11-04 10:50:50 +01:00
;Graphical
2023-11-08 10:46:45 +01:00
(when (display-graphic-p)
(set-frame-font "FiraCode Nerd Font" nil t)
(tool-bar-mode -1)
)
2023-11-05 11:59:54 +01:00
(load-theme 'moe-dark)
(setq-default cursor-type '(bar . 1))
(pixel-scroll-precision-mode 1)
(setq pixel-scroll-precision-large-scroll-height 10.0)
2023-11-08 10:46:45 +01:00
(setq mouse-wheel-follow-mouse 't)
(setq scroll-step 1)
(setq mouse-drag-and-drop-region t)
(telephone-line-mode 1)
(minions-mode 1)
2023-11-04 10:50:50 +01:00
;Hide startup screen if started with file
(defun startup-screen-advice (orig-fun &rest args)
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
(apply orig-fun args)))
(advice-add 'display-startup-screen :around #'startup-screen-advice)
2023-11-05 11:59:54 +01:00
2023-11-04 10:50:50 +01:00
;Enable dashboard
(dashboard-setup-startup-hook)
(when (daemonp)
2023-11-08 10:46:45 +01:00
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
2023-11-04 10:50:50 +01:00
)
2023-11-05 11:59:54 +01:00
2023-11-04 16:44:02 +01:00
:CUA
(cua-mode 1)
(global-set-key (kbd "C-y") 'undo-redo)
2023-11-04 10:50:50 +01:00