summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el80
1 files changed, 25 insertions, 55 deletions
diff --git a/init.el b/init.el
index 6fc295a..2cebc20 100644
--- a/init.el
+++ b/init.el
@@ -91,9 +91,6 @@
(add-to-list 'load-path (expand-file-name "custom" jao-emacs-dir))
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")
-(setopt user-lisp-directory (expand-file-name "lib" jao-emacs-dir))
-(prepare-user-lisp)
-
(defvar jao-info-dir (expand-file-name "info" jao-doc-dir))
(require 'info)
(add-to-list 'Info-directory-list jao-info-dir)
@@ -426,15 +423,9 @@
(defun jao-colors-scheme ()
(if (jao-colors-scheme-dark-p) 'dark 'light))
-(customize-set-variable 'frame-background-mode (jao-colors-scheme))
-
-(setq custom-theme-directory
- (expand-file-name "lib/themes" jao-emacs-dir))
+(setopt frame-background-mode (jao-colors-scheme))
-(defvar jao-theme-dark 'jao-dark)
-(defvar jao-theme-light 'jao-light)
-(defvar jao-theme-term-dark 'modus-vivendi)
-(defvar jao-theme-term-light 'jao-light-term)
+(setopt custom-theme-directory (expand-file-name "themes" jao-emacs-dir))
(use-package jao-themes
:demand t
@@ -447,14 +438,14 @@
(defun jao-themes-setup ()
(let* ((dark (jao-colors-scheme-dark-p))
- (theme (cond ((and dark window-system) jao-theme-dark)
- (dark jao-theme-term-dark)
- (window-system jao-theme-light)
- (t jao-theme-term-light))))
+ (theme (cond ((and dark window-system) 'jao-dark)
+ (dark 'modus-vivendi)
+ (window-system 'jao-light)
+ (t 'jao-light-term))))
(load-theme theme t)
(modify-all-frames-parameters `((font . ,jao-themes-default-face)))))
-(jao-themes-setup)
+(add-hook 'after-init-hook #'jao-themes-setup)
;;; Help system
;;;; which-key
@@ -599,7 +590,8 @@
;;;; jao-notify
(use-package jao-notify
:demand t
- :init (setq jao-notify-use-messages (jao-d-l 'mac t)))
+ :init (setq jao-notify-use-messages (jao-d-l 'mac t)
+ jao-notify-audio-icon (jao-data-file "music-player-icon.png")))
;;;; tracking
(use-package tracking
@@ -956,31 +948,7 @@
(require 'autorevert)
(global-auto-revert-mode 1)
-;;;; attached buffers
-(defun jao-display-buffer-below-selected (buffer alist)
- (delete-other-windows-vertically)
- (display-buffer-below-selected buffer alist))
-
-(defun jao-display-below-eldoc (buffer alist)
- (let ((w (selected-window)))
- (pop-to-buffer "*eldoc*" nil t)
- (jao-display-buffer-below-selected buffer alist)
- (select-window w t)))
-
-(defun jao-attached-buffer-entry (name-rx height)
- `(,name-rx (display-buffer-reuse-window
- jao-display-buffer-below-selected)
- (window-height . ,(or height 25))))
-
-(defmacro jao-with-attached-buffer (name-rx height &rest body)
- (declare (indent defun))
- `(let ((display-buffer-alist '(,(jao-attached-buffer-entry name-rx height))))
- ,@body))
-
-(defun jao-define-attached-buffer (name-rx &optional height)
- (add-to-list 'display-buffer-alist
- (jao-attached-buffer-entry name-rx height)))
-
+;;; attached buffers
(use-package xref
:config
(jao-define-attached-buffer "^\\*xref\\*"))
@@ -1285,18 +1253,20 @@
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;;; dictionaries
-(use-package dictionary
- :init (setq dictionary-use-single-buffer t
- dictionary-server "localhost")
- :commands (dictionary-search
- dictionary-match-words
- dictionary-lookup-definition
- dictionary
- dictionary-mouse-popup-matching-words
- dictionary-popup-matching-words
- dictionary-tooltip-mode
- global-dictionary-tooltip-mode)
- :bind (("C-c d" . dictionary-search)))
+(jao-d-l
+ (global-set-key (kbd "C-c d") 'jao-mac-dict)
+ (use-package dictionary
+ :init (setq dictionary-use-single-buffer t
+ dictionary-server "localhost")
+ :commands (dictionary-search
+ dictionary-match-words
+ dictionary-lookup-definition
+ dictionary
+ dictionary-mouse-popup-matching-words
+ dictionary-popup-matching-words
+ dictionary-tooltip-mode
+ global-dictionary-tooltip-mode)
+ :bind (("C-c d" . dictionary-search))))
(use-package ispell
:custom ((ispell-personal-dictionary
@@ -1467,7 +1437,7 @@
(interactive "P")
,@prelude
(let ((jao-use-vterm (if term (not jao-use-vterm) jao-use-vterm)))
- (if-let ((b (jao-term--find ,cmd)))
+ (if-let* ((b (jao-term--find ,cmd)))
(pop-to-buffer b)
(jao-exec-in-term ,cmd ,(format "*%s*" name))))))