diff options
Diffstat (limited to 'init-el.org')
-rw-r--r-- | init-el.org | 322 |
1 files changed, 67 insertions, 255 deletions
diff --git a/init-el.org b/init-el.org index 6cab7d7..3d4047a 100644 --- a/init-el.org +++ b/init-el.org @@ -1,5 +1,9 @@ -*- buffer-read-only: t -*- #+auto_tangle: t +#+PROPERTY: header-args:elisp+ :tangle ~/.emacs.d/init.el +#+PROPERTY: header-args:elisp+ :results none +#+PROPERTY: header-args:elisp+ :lexical t +#+PROPERTY: header-args:elisp+ :noweb-sep "\n\n" #+OPTIONS: html-style:nil * init.el @@ -24,7 +28,7 @@ #+name: preamble #+begin_src elisp :noweb no-export - +;;; PREAMBLE (setq custom-file (concat user-emacs-directory "../notes/custom.el")) (load custom-file 'noerror) @@ -57,8 +61,8 @@ to disable it. (when (and (fboundp 'native-comp-available-p) (native-comp-available-p)) - (setq package-native-compile nil - native-comp-always-compile nil)) + (setq package-native-compile t + native-comp-always-compile t)) #+end_src @@ -172,11 +176,14 @@ I'm using melpa and elpa package archives. #+name: my-leader-key-major-mode-menu #+begin_src elisp :results none +;; major mode leaader keys + (defvar my-major-mode-list nil "subcommands by major-mode") (setf my-major-mode-list '((org-mode my-org-command) (pdf-view-mode my-pdf-view-mod-command) - (lisp-mode my-lisp-mode-command))) + (lisp-mode my-lisp-mode-command) + (sly-mrepl-mode my-lisp-mode-command))) (defun my-major-mode-command () @@ -212,14 +219,12 @@ I'm using melpa and elpa package archives. * Org Mode Configs -#+name: org-mode-config -#+begin_src elisp :noweb no-export -#+end_src - ** Org Mode Main Config #+name: org-mode-main-config #+begin_src elisp :noweb no-export :results none +;; org mode config + (package-install 'org) (require 'org) (setq org-duration-format 'h:mm) @@ -269,7 +274,7 @@ I'm using melpa and elpa package archives. ** My-Leader Key for Org Major Mode #+name: org-mode-leader-key-menu #+begin_src elisp :results none :noweb no-export - +;; org mode leader keys and related commands (defun org-src--source-buffer () (marker-buffer org-src--beg-marker)) @@ -349,90 +354,13 @@ again, if it was whent he org edit src buffer was opened." #+end_src -** Org Protocol Config - -Following the guide [[https://orgmode.org/worg/org-contrib/org-protocol.html][here]] about setting up org protocol and emacs -server. - -This allows emacs to intercept org protocol requests from emacsclient -in order to take some actions. I'm using it here as part of a DIY -read-it-later app - I can push a button in my web browser and cache an -article for later reading. - -*** Org init.el config -First, update the config - -#+name: org-protocol-config -#+begin_src elisp :noweb no-export - -(server-start) -(require 'org-protocol) - -#+end_src - -#+RESULTS: org-protocol-config -: org-protocol - - -*** desktop entry -Second, make an org-protocol desktop entry - -#+begin_src conf :tangle ~/.local/share/applications/org-protocol.desktop :results none - -[Desktop Entry] -Name=org-protocol -Comment=Intercept calls from emacsclient to trigger custom actions -Categories=Other; -Keywords=org-protocol; -Icon=emacs -Type=Application -Exec=emacsclient -n %u -Terminal=false -StartupWMClass=Emacs -MimeType=x-scheme-handler/org-protocol; - -#+end_src - -and tell your system about it. You might need to install something: - -#+begin_src bash -sudo apt-get install desktop-file-utils -#+end_src - -Then run this: - -#+begin_src bash -update-desktop-database ~/.local/share/applications/ -#+end_src - -#+RESULTS: - -Finally, to actually use it, make a book mark like so: - -e.g. here's one for org capture - -#+begin_src - javascript:location.href='org-protocol://capture:/w/'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title)+'/'+encodeURIComponent(window.getSelection()) -#+end_src - -** COMMENT Bells and Whistles - -#+name: org-bells-and-wistles -#+begin_src elisp :results none -(package-install 'org-superstar) -(require 'org-superstar) -(add-hook 'org-mode-hook (lambda () - (org-superstar-mode 1) - (visual-line-mode))) - -#+end_src - - * UI ** Fonts #+name: ui-fonts #+begin_src elisp :noweb no-export +;; fonts + (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10") ;'(font . "Comic Mono-11") @@ -488,6 +416,8 @@ e.g. here's one for org capture #+name: ui-tweaks-config #+begin_src elisp :results none +;; global keys + (global-unset-key (kbd "<Scroll_Lock>")) (global-unset-key "\C-z") (setq-default indent-tabs-mode nil) @@ -501,6 +431,8 @@ e.g. here's one for org capture #+name: ui-completion-engine #+begin_src elisp :results none +;; command completions + (package-install 'ivy) ;(package-install 'smex) (package-install 'amx) @@ -624,31 +556,6 @@ e.g. here's one for org capture ** Themes -*** Installed Themes - -#+name: ui-themes-installed -#+begin_src elisp :results none - -(package-install 'autothemer) ;; for custom themes - -(setq my-installed-themes - '(pastelmac-theme - poet-theme - flexoki-themes - soft-morning-theme - goose-theme - naga-theme - grandshell-theme - nimbus-theme - morgentau-theme)) - - -(dolist (package my-installed-themes) - (when (not (package-installed-p package)) - (package-install package))) - -#+end_src - *** Theme Switcher #+name: ui-themes-theme-switcher @@ -738,6 +645,33 @@ LOAD-THEME" #+end_src +*** Installed Themes + +#+name: ui-themes-installed +#+begin_src elisp :results none + +(package-install 'autothemer) ;; for custom themes + +(setq my-installed-themes + '( + poet-theme + silkworm-theme + flexoki-themes + naga-theme + grandshell-theme + faff-theme + morgentau-theme + base16-theme + )) + +(dolist (package my-installed-themes) + (when (not (package-installed-p package)) + (package-install package))) + +#+end_src + + + *** Choice Themes #+name: ui-themes-choice-themes @@ -746,15 +680,16 @@ LOAD-THEME" (setq *coding-themes* '( ;; light - pastelmac flexoki-themes-light + silkworm + faff ;; medium - goose - morgentau - nimbus + base16-catppuccin-frappe + base16-silk-dark ;; dark - grandshell + base16-chalk flexoki-themes-dark + grandshell naga)) @@ -1365,26 +1300,28 @@ association one shell with each perspective layout #+begin_src elisp :noweb no-export (def-my-command my-lisp-mode-command '((?d "[d]ocumentation" sly-describe-symbol) - ;(?\t "[TAB] inspect" how do I inspect??? ) + (?h "[h]yperspec" hyperspec-lookup) (?S "[S]ync package" sly-mrepl-sync) (?\t "TAB inpsect" sly-inspect))) ;; (defvar +symbols-in-cl+ 977) -;; (defun slime-random-words-of-encouragement () +;; (defun sky-random-words-of-encouragement () ;; "Return a string of hackerish encouragement." -;; (slime-eval +;; (sly-eval ;; `(swank:documentation-symbol ;; (cl:loop :for name :being :each :symbol :in (cl:find-package "CL") ;; :collect (cl:symbol-name name) :into names ;; :finally (cl:return (cl:elt names ,(random +symbols-in-cl+))))))) -;; (defun slime-fasl-directory () -;; (let ((dir (format "%s/.cache/slime-fasls/" (getenv "HOME")))) -;; (make-directory dir t) -;; dir)) +(defun slime-fasl-directory () + (let ((dir (format "%s/.cache/slime-fasls/" (getenv "HOME")))) + (make-directory dir t) + dir)) +(setq sly-compile-file-options + (list :fasl-directory (slime-fasl-directory))) ;; (setq slime-compile-file-options ;; (list :fasl-directory (slime-fasl-directory))) @@ -1419,7 +1356,6 @@ association one shell with each perspective layout 'space-for-delimiter-after-@-p 'space-for-delimiter-after-p-p)) - (add-hook 'lisp-mode-hook 'linum-mode) (setq +common-lisp-package-template+ @@ -1438,6 +1374,11 @@ association one shell with each perspective layout (with-eval-after-load 'lisp-mode (progn (setq common-lisp-hyperspec-root "file:///home/colin/HyperSpec/"))) + + +(setq lisp-lambda-list-keyword-parameter-alignment t + lisp-lambda-list-keyword-alignment t) +(put 'make-instance 'common-lisp-indent-function 1) #+end_src *** Coalton @@ -1576,132 +1517,3 @@ Saves to a temp file and puts the filename in the kill ring." (load "~/projects/cicadas.org/cicatasks.el") #+end_src -* Tangle - -This block of code tangles the above into =~/.emacs.d/init.el= which -emacs loads at startup. - -#+begin_src elisp :tangle ~/.emacs.d/init.el :noweb no-export :results none -;;;; init.el - -;;;; DO NOT EDIT: This file has been generated by org-babel-tangle -;;;; from a source file called init-el.org. - -<<preamble>> -<<native-comp>> -<<packages-setup-config>> - -(message "Preamble and Setup Loaded") -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; LEADER KEY DEFINITION AND TOPLEVEL MENUS ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -<<my-leader-key-system>> -<<my-leader-key-toplevel-menu>> -<<my-leader-key-major-mode-menu>> -<<my-leader-key-applications-menu>> -<<my-leader-special-edit>> -<<my-special-inserts>> - -(message "Leader Key Setup Loaded") -;;;;;;;;;;;;;;;;;;;;;; -;; ORG-MODE CONFIGS ;; -;;;;;;;;;;;;;;;;;;;;;; - -<<org-mode-main-config>> -<<org-mode-leader-key-menu>> -<<org-protocol-config>> -<<org-bells-and-wistles>> - -(message "Org-Mode Config Loaded ") - -;;;;;;;; -;; UI ;; -;;;;;;;; - -<<ui-chrome-config>> -<<ui-tweaks-config>> -<<ui-fonts-config>> - -<<ui-completion-engine>> -<<ui-windows-and-perspectives-packages>> -<<ui-window-leader-key-menu>> -<<ui-buffer-leader-key-menu>> -<<ui-perspectives-leader-key-menu>> -<<modeline-config>> - -<<ui-themes-installed>> -<<ui-themes-theme-switcher>> -<<ui-themes-choice-themes>> -<<ui-org-mode-tweaks>> -<<ui-fonts>> - -(message "UI Config Loaded") -;;;;;;;;;;;;;;;;;;;;; -;; TIME MANAGEMENT ;; -;;;;;;;;;;;;;;;;;;;;; - -<<time-management-preamble>> -<<pomidor>> -<<calfw-org-config>> -<<org-refile-config>> -<<org-capture-config>> -<<org-agenda-config>> - -(message "Time Management Config Loaded") - -;;;;;;;;;;;;;;;;;;;;;;;;; -;; COMMUNICATION TOOLS ;; -;;;;;;;;;;;;;;;;;;;;;;;;; - -<<erc-config>> - -(message "Communication tools Config Loaded") -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; READING, WRITING, AND NOTETAKING ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -<<general-reading-tools>> -<<calibre-config>> -<<pdf-tools>> -<<pdf-mode-config>> -<<nov>> -<<elfeed-config>> -<<ccrypt>> -<<toggler>> -<<deft>> -<<writeroom>> -<<eww-config>> -<<markdown-editing>> - -(message "Reading and Writing Config Loaded") - -;;;;;;;;;;;;;;;;;; -;; SOFTWARE DEV ;; -;;;;;;;;;;;;;;;;;; - -<<software-development-preamble>> -<<literate-programming>> -<<crdt-config>> -<<software-dev-essentials>> -<<projectile>> -<<shell-config>> -<<common-lisp-packages>> -<<common-lisp-editing-config>> -<<coalton-config>> -<<haxe-config>> - -(message "Software Dev Config Loaded") -;;;;;;;;;;;;;;;;;;;;;; -;; TOOLS AND UTILS ;; -;;;;;;;;;;;;;;;;;;;;;; - -<<buffer-export-config>> -<<helpful>> -<<loads>> - -(message "Tools and Utils Config Loaded") -(message "FINISHED LOADED") - -#+end_src |