diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 82 |
1 files changed, 37 insertions, 45 deletions
@@ -114,6 +114,8 @@ (jao-exec-path p)) (add-to-list 'Info-directory-list "/opt/homebrew/share/info")) +(jao-exec-path (expand-file-name "bin" jao-emacs-dir)) + ;;;; custom location of custom.el and co. (setq custom-file (jao-site-el "custom")) (load custom-file) @@ -122,13 +124,11 @@ (setq custom-raised-buttons nil) ;;; Preamble -;;;; preamble (pre.el) (jao-load-site-el "pre") ;;; System Utilities ;;;; persist -(use-package persist - :ensure t) +(use-package persist :ensure t) ;;;; (no) backups (setq vc-make-backup-files nil @@ -166,6 +166,7 @@ (setq use-short-answers t) (setq inhibit-startup-message t) (setq visible-bell t) +(jao-when-darwin (setq ring-bell-function (lambda () (message "Ding!")))) ;;;; server (setenv "EDITOR" "emacsclient") @@ -324,7 +325,7 @@ ("imv-wayland \"%s\"" "image/.*" jao-wayland-enabled) ("imv-x11 \"%s\"" "image/.*"))))) -;;; tmr +;;;; tmr (use-package tmr :ensure t :init @@ -420,7 +421,7 @@ ;;;; themes (defun jao-colors-scheme-dark-p () - (equal "dark" (getenv "JAO_COLOR_SCHEME"))) + (and (jao-is-linux) (equal "dark" (getenv "JAO_COLOR_SCHEME")))) (defun jao-colors-scheme () (if (jao-colors-scheme-dark-p) 'dark 'light)) @@ -446,29 +447,7 @@ (load-theme theme t) (modify-all-frames-parameters `((font . ,jao-themes-default-face))))) -(use-package doric-themes - :if (jao-is-darwin) - :ensure t - :demand t - :config - ;; These are the default values. - (setq doric-themes-to-toggle '(doric-light doric-marble)) - (setq doric-themes-to-rotate doric-themes-collection) - - (doric-themes-select 'doric-marble) - - (set-face-attribute 'default nil :family "Menlo" :height 120) - ;; (set-face-attribute 'variable-pitch nil :family "Aporetic Sans" :height 1.0) - ;; (set-face-attribute 'fixed-pitch nil :family "Aporetic Sans Mono" :height 1.0) - - :bind - (("<f5>" . doric-themes-toggle) - ("C-<f5>" . doric-themes-select) - ("M-<f5>" . doric-themes-rotate))) - -(jao-when-linux (jao-themes-setup)) - - +(jao-themes-setup) ;;; Help system ;;;; help buffers @@ -667,7 +646,7 @@ ("i" "invoke last action" jao-ednc-invoke-last-action)]) (global-set-key (kbd "s-n") #'jao-transient-ednc)) -;;; Calendar, diary, weather +;;; Calendar, diary ;;;; diary (setq diary-file (expand-file-name "diary" jao-org-dir) diary-display-function 'diary-fancy-display @@ -737,12 +716,17 @@ :config (persistent-scratch-setup-default)) ;;;; dired +(use-package ls-lisp + :if (jao-is-darwin) + :demand t + :init (setq ls-lisp-use-insert-directory-program nil + ls-lisp-dirs-first t)) + (use-package dired :init (setq dired-recursive-deletes 'top dired-recursive-copies 'top dired-listing-switches "-alhF --group-directories-first" - ls-lisp-dirs-first t dired-dwim-target t dired-kill-when-opening-new-dired-buffer t dired-mouse-drag-files t @@ -1161,7 +1145,7 @@ ;;;; afio (use-package jao-afio - :if (jao-is-linux) + ;; :if (jao-is-linux) :demand t :config (jao-afio-setup (not window-system)) @@ -1319,9 +1303,8 @@ (add-hook 'LaTeX-mode-hook 'turn-on-reftex)) ;;; Browsing -(jao-when-linux - (require 'jao-custom-browse) - (require 'jao-custom-eww)) +(require 'jao-custom-browse) +(jao-when-linux (require 'jao-custom-eww)) ;;; PDFs and other docs @@ -1342,7 +1325,7 @@ (add-hook 'nov-mode-hook #'jao-nov-register-session)) ;;; Email -(jao-when-linux (require 'jao-custom-email)) +(require 'jao-custom-email) ;;; Shells and terms ;;;; shell modes @@ -1569,7 +1552,7 @@ :init (setq magit-repository-directories (jao-d-l - '(("/Users/jao/Projects" 3)) + '(("/Users/jao/Projects" . 3)) '(("/home/jao/usr/bigml" . 2) ("/home/jao/usr/jao" . 3) ("/usr/local/src" . 1)))) @@ -1624,18 +1607,10 @@ (use-package yaml-mode :disabled t :ensure t) ;;; Graphics -;;;; images (setq image-use-external-converter t image-cache-eviction-delay 120) (setq widget-image-enable nil) -;;;; gnuplot -(use-package gnuplot - :disabled t - :ensure t - :commands (gnuplot-mode gnuplot-make-buffer) - :init (add-to-list 'auto-mode-alist '("\\.gp$" . gnuplot-mode))) - ;;; Network ;;;; nm applet (jao-when-linux @@ -1672,7 +1647,24 @@ ;;; Graphical window system -(jao-when-linux (require 'jao-custom-window-system)) +(defvar jao-exwm-enabled nil) +(defun jao-exwm-enabled-p () jao-exwm-enabled) + +(defvar jao-xmonad-enabled + (jao-when-linux (string= "xmonad" (or (getenv "wm") "")))) +(defun jao-xmonad-enabled-p () jao-xmonad-enabled) + +(defvar jao-wayland-enabled + (jao-when-linux (string= "wayland" (or (getenv "XDG_SESSION_TYPE") "")))) + +(defvar jao-river-enabled + (jao-when-linux (jao-shell-running-p "river"))) + +(jao-when-darwin + (defun jao-wayland-enabled-p () nil) + (defun jao-river-enabled-p () nil)) + +(jao-when-linux (require 'jao-custom-x11)) ;;; Global transients (defun jao-list-packages () |