diff --git a/modules/emacs/eshell/config.el b/modules/emacs/eshell/config.el deleted file mode 100644 index 3a92ca806..000000000 --- a/modules/emacs/eshell/config.el +++ /dev/null @@ -1,77 +0,0 @@ -;;; module-eshell.el --- -*- no-byte-compile: t; -*- - -;; see: -;; + `doom:eshell' (open in current buffer or popup) -;; + `doom/eshell-tab' (open in separate tab) -;; + `doom/eshell-frame' (open in separate frame) - -(use-package eshell - :init - (setq eshell-directory-name (concat doom-temp-dir "/eshell") - eshell-scroll-to-bottom-on-input 'all - eshell-scroll-to-bottom-on-output 'all - eshell-buffer-shorthand t - ;; em-prompt - eshell-prompt-function 'doom/eshell-prompt - ;; em-glob - eshell-glob-case-insensitive t - eshell-error-if-no-glob t - ;; em-alias - eshell-aliases-file (concat doom-temp-dir "/.eshell-aliases")) - - :config - (evil-set-initial-state 'eshell-mode 'insert) - (def-popup! "^\\*eshell:popup\\*$" :regexp t :align below :size 25 :select t) - - (defun doom|eshell-keymap-setup () - "Setup eshell keybindings. This must be done in a hook because eshell -redefines its keys every time `eshell-mode' is enabled." - (map! :map eshell-mode-map - :n "i" 'doom/eshell-evil-prepend-maybe - :n "I" 'doom/eshell-evil-prepend - :n "a" 'doom/eshell-evil-append-maybe - :n "A" 'doom/eshell-evil-append - :n "r" 'doom/eshell-evil-replace-maybe - :n "R" 'doom/eshell-evil-replace-state-maybe - :n "c" 'doom/eshell-evil-change - :n "C" 'doom/eshell-evil-change-line - :i "" 'eshell-pcomplete - :i "C-u" 'eshell-kill-input - :i "SPC" 'self-insert-command - :m "" 'doom/eshell-evil-append - :n [remap evil-window-split] 'doom/eshell-split - :n [remap evil-window-vsplit] 'doom/eshell-vsplit - :n [remap evil-record-macro] 'eshell-life-is-too-much - [remap doom/close-window-or-tab] 'eshell-life-is-too-much)) - - ;; Close window on exit - (add-hook 'eshell-exit-hook 'doom|eshell-cleanup) - (add-hook 'eshell-mode-hook 'doom|eshell-init) - - (add-hook 'eshell-mode-hook 'doom|eshell-keymap-setup) - (add-hook 'eshell-mode-hook 'doom-hide-mode-line-mode) - - (add-hook! eshell-mode - (add-hook 'evil-insert-state-exit-hook 'hl-line-mode nil t) - (add-hook 'evil-insert-state-entry-hook (lambda () (hl-line-mode -1)) nil t)) - - ;; Aliases - (setq eshell-command-aliases-list - '(("q" "exit") - ("l" "ls -1") - ("ll" "ls -l") - ("la" "ls -la") - ("g" "hub") - ("gs" "hub status --oneline .") - ("gss" "hub status --oneline"))) - - ;; Custom commands - (defun eshell/e (file) - (eshell-eval (cond ((doom/popup-p) - (doom/popup-save (find-file file)) - 0) - (t (find-file file) - 0))))) - -(provide 'module-eshell) -;;; module-eshell.el ends here diff --git a/modules/emacs/org/config.el b/modules/emacs/org/config.el deleted file mode 100644 index eed0c2995..000000000 --- a/modules/emacs/org/config.el +++ /dev/null @@ -1,479 +0,0 @@ -;;; module-org.el --- -*- no-byte-compile: t; -*- - -;; A few things you can expect -;; + `org-capture' in a popup frame (can be invoked from outside emacs too) -;; + A simpler attachment system (with auto-deleting support) and -;; drag-and-drop for images and documents into org files -;; + Exported files are put in a centralized location (see -;; `org-export-directory') -;; + TODO Custom links for class notes -;; + TODO An org-mode based CRM (including invoicing and pdf exporting) (see custom-crm) -;; + TODO A tag-based file browser reminiscient of Evernote and Quiver (there's neotree too!) - -(define-minor-mode evil-org-mode - "Evil-mode bindings for org-mode." - :init-value nil - :lighter " !" - :keymap (make-sparse-keymap) - :group 'evil-org) - -(add-hook 'org-load-hook 'doom|org-init t) -(add-hook 'org-load-hook 'doom|org-init-attach t) -(add-hook 'org-load-hook 'doom|org-init-export t) -(add-hook 'org-load-hook 'doom|org-init-capture t) -(add-hook 'org-load-hook 'doom|org-hacks t) -(add-hook 'org-mode-hook 'doom|org-hook) - -;; Custom variables -(defvaralias 'org-directory 'doom-org-dir) - -(defvar doom-org-notes-dir (f-expand "notes" doom-org-dir) - "The directory where the notes are kept") - -(defvar doom-org-quicknote-dir (f-expand "inbox" doom-org-dir) - "The directory to store quick notes produced by `doom:org-capture' (individual org files)") - -(defvar doom-org-attachment-dir ".attach/" - "Where to store attachments (relative to current org file).") - -(defvar-local doom-org-attachments-list '() - "A list of attachments for the current buffer. This is so my custom attachment -system can keep track of each buffer's attachments.") - - -;; -(defun doom|org-hook () - "Run everytime `org-mode' is enabled." - (evil-org-mode +1) - (visual-line-mode +1) - (setq line-spacing 1) - - ;; If saveplace places the point in a folded position, unfold it on load - (when (outline-invisible-p) - (ignore-errors - (save-excursion - (outline-previous-visible-heading 1) - (org-show-subtree)))) - - (defun doom|org-update () - (when (file-exists-p buffer-file-name) - (org-update-statistics-cookies t))) - - (add-hook 'before-save-hook 'doom|org-update nil t) - (add-hook 'evil-insert-state-exit-hook 'doom|org-update nil t)) - - -(defun doom|org-init () - "Initializes org core." - (def-popup! " *Agenda Commands*" :align below :size 30) - (def-popup! " *Org todo*" :align below :size 5 :noselect t) - (def-popup! "*Calendar*" :align below :size 0.4) - (def-popup! "*Org Links*" :align below :size 5) - (def-popup! "^\\*Org Agenda.+" :align below :size 0.4 :regexp t) - (def-popup! "^\\*Org Src .+\\*$" :align below :size 0.4 :select t :regexp t) - (def-popup! "^\\*Org-Babel.*\\*$" :align below :size 0.4 :regexp t) - - (setq-default - org-export-coding-system 'utf-8 - - ;; Appearance - outline-blank-line t - org-indent-mode-turns-on-hiding-stars t - org-adapt-indentation nil - org-blank-before-new-entry '((heading . nil) (plain-list-item . auto)) - org-cycle-separator-lines 1 - org-cycle-include-plain-lists t - org-ellipsis 'hs-face - org-entities-user '(("flat" "\\flat" nil "" "" "266D" "♭") - ("sharp" "\\sharp" nil "" "" "266F" "♯")) - org-fontify-done-headline t - org-fontify-quote-and-verse-blocks t - org-fontify-whole-heading-line t - org-footnote-auto-label 'plain - org-hide-emphasis-markers t - org-hide-leading-stars t - org-image-actual-width nil - org-indent-indentation-per-level 2 - org-pretty-entities t - org-pretty-entities-include-sub-superscripts t - org-startup-folded t - org-startup-indented t - org-startup-with-inline-images nil - org-tags-column 0 - org-use-sub-superscripts '{} - - ;; Behavior - org-catch-invisible-edits 'show - org-checkbox-hierarchical-statistics nil - org-completion-use-ido nil ; Use ivy/counsel for refiling - org-confirm-elisp-link-function nil - org-default-priority ?C - org-hidden-keywords '(title) - org-hierarchical-todo-statistics t - org-log-done t - org-loop-over-headlines-in-active-region t - org-outline-path-complete-in-steps nil - org-refile-use-outline-path t - org-special-ctrl-a/e t - - ;; Sorting/refiling - org-archive-location (concat org-directory "/archived/%s::") - org-refile-targets '((nil . (:maxlevel . 2))) ; display full path in refile completion - - ;; Agenda - org-agenda-restore-windows-after-quit nil - org-agenda-skip-unavailable-files nil - org-agenda-dim-blocked-tasks nil - org-agenda-window-setup 'other-frame ; to get org-agenda to behave with shackle... - org-agenda-inhibit-startup t - org-agenda-files (append (f-entries org-directory (lambda (path) (f-ext? path "org"))) - (f-entries (f-expand "projects" org-directory) (lambda (path) (f-ext? path "org"))) - (f-entries (f-expand "contacts" org-directory) (lambda (path) (f-ext? path "org")))) - org-todo-keywords '((sequence "[ ](t)" "[-](p)" "[?](m)" "|" "[X](d)") - (sequence "TODO(T)" "|" "DONE(D)") - (sequence "IDEA(i)" "NEXT(n)" "ACTIVE(a)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)")) - - - ;; Babel - org-confirm-babel-evaluate nil ; you don't need my permission - org-src-fontify-natively t ; make code pretty - org-src-preserve-indentation t - org-src-tab-acts-natively t - org-src-window-setup 'current-window - org-edit-src-content-indentation 0 - - ;; Latex - org-format-latex-options (plist-put org-format-latex-options :scale 1.5) - org-format-latex-options (plist-put org-format-latex-options :background (face-attribute 'doom-default :background nil t)) - org-highlight-latex-and-related '(latex) - org-latex-create-formula-image-program 'dvipng - org-latex-image-default-width ".9\\linewidth" - org-latex-preview-ltxpng-directory (concat doom-temp-dir "/ltxpng/") - org-latex-remove-logfiles nil - org-startup-with-latex-preview nil - ;; org-latex-packages-alist - ;; '(("" "gauss" t) - ;; ("" "physics" t) TODO Install this) - ) - - (org-babel-do-load-languages - 'org-babel-load-languages - '((python . t) (ruby . t) (sh . t) (js . t) (css . t) - (plantuml . t) (emacs-lisp . t) (matlab . t) - (latex . t) (calc . t) (lisp . t) (lilypond . t) - ;; (go . t) - ;; (http . t) - ;; (rust . t) - )) - - (let ((ext-regexp (regexp-opt '("GIF" "JPG" "JPEG" "SVG" "TIF" "TIFF" "BMP" "XPM" - "gif" "jpg" "jpeg" "svg" "tif" "tiff" "bmp" "xpm")))) - (setq iimage-mode-image-regex-alist - `((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?\\([-+./_0-9a-zA-Z]+\\." - ext-regexp "\\)\\(\\]\\]\\|>\\|'\\)?") . 2) - (,(concat "<\\(http://.+\\." ext-regexp "\\)>") . 1)))) - - ;; Fontify checkboxes and dividers - (defface org-list-bullet '((t ())) "Face for list bullets") - (font-lock-add-keywords - 'org-mode '(("^ *\\([-+]\\|[0-9]+[).]\\) " - (1 'org-list-bullet)) - ("^ *\\(-----+\\)$" - (1 'org-meta-line)))) - - ;; Enable encryption - (require 'epa-file) - (epa-file-enable) - (require 'org-crypt) - (org-crypt-use-before-save-magic) - (setq org-tags-exclude-from-inheritance '("crypt") - org-crypt-key user-mail-address - epa-file-encrypt-to user-mail-address) - - ;; smartparens config - (sp-with-modes '(org-mode) - (sp-local-pair "\\[" "\\]" :post-handlers '(("| " "SPC"))) - (sp-local-pair "\\(" "\\)" :post-handlers '(("| " "SPC"))) - (sp-local-pair "$$" "$$" :post-handlers '((:add " | ")) :unless '(sp-point-at-bol-p)) - (sp-local-pair "{" nil)) - - ;; bullets - (use-package org-bullets :commands org-bullets-mode) - - ;; Keybinds - (map! (:map org-mode-map - "RET" nil - "C-j" nil - "C-k" nil - :i [remap doom/inflate-space-maybe] 'org-self-insert-command - :i "RET" 'org-return-indent) - - (:map evil-org-mode-map - :n "RET" 'doom/org-dwim-at-point - ;; - :ni "A-l" 'org-metaright - :ni "A-h" 'org-metaleft - :ni "A-k" 'org-metaup - :ni "A-j" 'org-metadown - :ni "A-L" 'org-shiftmetaright - :ni "A-H" 'org-shiftmetaleft - :ni "A-K" 'org-shiftmetaup - :ni "A-J" 'org-shiftmetadown - ;; Expand tables (or shiftmeta move) - :ni "C-S-l" 'doom/org-table-append-field-or-shift-right - :ni "C-S-h" 'doom/org-table-prepend-field-or-shift-left - :ni "C-S-k" 'doom/org-table-prepend-row-or-shift-up - :ni "C-S-j" 'doom/org-table-append-row-or-shift-down - ;; Navigate table cells - :i "C-L" 'doom/org-table-next-field - :i "C-H" 'doom/org-table-previous-field - :i "C-K" 'doom/org-table-previous-row - :i "C-J" 'doom/org-table-next-row - - :i "C-e" 'org-end-of-line - :i "C-a" 'org-beginning-of-line - - :i "" 'doom/org-indent-or-next-field - :i [S-iso-lefttab] 'doom/org-dedent-or-prev-field ; for GNU Emacs - :i [(shift tab)] 'doom/org-dedent-or-prev-field - :i [backtab] 'doom/org-dedent-or-prev-field - - :n "" 'doom/org-toggle-fold - - :nv "j" 'evil-next-visual-line - :nv "k" 'evil-previous-visual-line - :v "" 'doom/yas-insert-snippet - - :i "M-a" (λ! (evil-visual-state) (org-mark-element)) - :n "M-a" 'org-mark-element - :v "M-a" 'mark-whole-buffer - - :ni "" (λ! (doom/org-insert-item 'below)) - :ni "" (λ! (doom/org-insert-item 'above)) - - ;; Formatting shortcuts - :i "M-b" (λ! (doom/org-surround "*")) ; bold - :i "M-u" (λ! (doom/org-surround "_")) ; underline - :i "M-i" (λ! (doom/org-surround "/")) ; italics - :i "M-`" (λ! (doom/org-surround "+")) ; strikethrough - - :v "M-b" "S*" - :v "M-u" "S_" - :v "M-i" "S/" - :v "M-`" "S+" - - (:localleader - :n "RET" 'org-archive-subtree - :n "SPC" 'doom/org-toggle-checkbox - :n "/" 'org-sparse-tree - :n "=" 'org-align-all-tags - :n "?" 'org-tags-view - :n "D" 'org-deadline - :n "L" 'org-store-link - :n "R" (λ! (org-metaleft) (org-archive-to-archive-sibling)) ; archive to parent sibling - :n "T" 'org-todo - :n "a" 'org-agenda - :n "d" 'org-time-stamp - :n "e" 'org-edit-special - :n "i" 'doom/org-toggle-inline-images-at-point - :nv "l" 'org-insert-link - :n "n" (λ! (if (buffer-narrowed-p) (widen) (org-narrow-to-subtree))) - :n "r" 'org-refile - :n "s" 'org-schedule - :n "t" (λ! (org-todo (if (org-entry-is-todo-p) 'none 'todo))) - :v "t" (λ! (evil-ex-normal evil-visual-beginning evil-visual-end "\\t")) - :n "v" 'variable-pitch-mode - ;; :n "w" 'writing-mode - :n "x" 'doom/org-remove-link) - - ;; TODO Improve folding bindings - :n "za" 'doom/org-toggle-fold - :n "zA" 'org-shifttab - :n "zc" 'outline-hide-subtree - :n "zC" (λ! (outline-hide-sublevels 1)) - :n "zd" (lambda (&optional arg) (interactive "p") (outline-hide-sublevels (or arg 3))) - :n "zm" (λ! (outline-hide-sublevels 1)) - :n "zo" 'outline-show-subtree - :n "zO" 'outline-show-all - :n "zr" 'outline-show-all - - :m "]]" (λ! (call-interactively 'org-forward-heading-same-level) (org-beginning-of-line)) - :m "[[" (λ! (call-interactively 'org-backward-heading-same-level) (org-beginning-of-line)) - :m "]l" 'org-next-link - :m "[l" 'org-previous-link - - :m "gh" 'outline-up-heading - :m "gj" 'org-forward-heading-same-level - :m "gk" 'org-backward-heading-same-level - :m "gl" (λ! (call-interactively 'outline-next-visible-heading) (show-children)) - - :n "go" 'org-open-at-point - :n "gO" (λ! (let ((org-link-frame-setup (append '((file . find-file-other-window)) org-link-frame-setup)) - (org-file-apps '(("\\.org$" . emacs) - (t . "open \"%s\"")))) - (call-interactively 'org-open-at-point))) - - :n "gQ" 'org-fill-paragraph - :m "$" 'org-end-of-line - :m "^" 'org-beginning-of-line - :n "<" 'org-metaleft - :n ">" 'org-metaright - :v "<" (λ! (org-metaleft) (evil-visual-restore)) - :v ">" (λ! (org-metaright) (evil-visual-restore)) - :n "-" 'org-cycle-list-bullet - :m "" 'org-cycle) - - (:map org-src-mode-map - :n "" (λ! (message "Exited") (org-edit-src-exit))) - - (:after org-agenda - (:map org-agenda-mode-map - :e "" 'org-agenda-Quit - :e "m" 'org-agenda-month-view - :e "C-j" 'org-agenda-next-item - :e "C-k" 'org-agenda-previous-item - :e "C-n" 'org-agenda-next-item - :e "C-p" 'org-agenda-previous-item)))) - - -;; FIXME -;; Initializes my own org-mode attachment system. I didn't like Org's native -;; one. Mine stores attachments in a global org .attach directory. It also -;; implements drag-and-drop file support and attachment icons. It also treats -;; images specially. -;; -;; To clean up unreferenced attachments, call `doom/org-cleanup-attachments' -(defun doom|org-init-attach () - (setq org-attach-directory doom-org-attachment-dir) - - ;; Don't track attachments in recentf or projectile - (push (format "/%s.+$" (regexp-quote doom-org-attachment-dir)) recentf-exclude) - (push ".attach" projectile-globally-ignored-file-suffixes) - - ;; FIXME Use all-the-icons - ;; (doom-fix-unicode '("FontAwesome" 13) ? ? ? ? ? ? ? ?) - ;; Drag-and-drop support - (require 'org-download) - (setq-default org-download-image-dir doom-org-attachment-dir - org-download-heading-lvl nil - org-download-timestamp "_%Y%m%d_%H%M%S") - - (setq org-download-screenshot-method - (cond (IS-MAC "screencapture -i %s") - (IS-LINUX "maim --opengl -s %s"))) - - ;; Write download paths relative to current file - (defun org-download--dir-2 () nil) - (defun doom*org-download--fullname (path) - (f-relative path (f-dirname (buffer-file-name)))) - (advice-add 'org-download--fullname :filter-return 'doom*org-download--fullname) - - ;; Add another drag-and-drop handler that will handle anything but image files - (setq dnd-protocol-alist `(("^\\(https?\\|ftp\\|file\\|nfs\\):\\(//\\)?" . doom/org-download-dnd) - ,@dnd-protocol-alist)) - - ;; keybinds - (map! (:leader - :n "oa" (@find-file-in doom-org-attachment-dir)))) - - -;; My own, centralized exporting system as well. -(defun doom|org-init-export () - (setq org-export-directory (f-expand ".export" org-directory) - org-export-backends '(ascii html latex md) - org-export-with-toc t - org-export-with-author t) - - ;; Export to a central directory (why isn't this easier?) - (unless (file-directory-p org-export-directory) - (mkdir org-export-directory)) - (defun doom*org-export-output-file-name (args) - (unless (nth 2 args) - (setq args (append args (list org-export-directory)))) - args) - (advice-add 'org-export-output-file-name :filter-args 'doom*org-export-output-file-name) - - ;; (require 'ox-pandoc) - ;; (setq org-pandoc-options '((standalone . t) (mathjax . t) (parse-raw . t))) - - ;; keybinds - (map! (:leader - :n "oe" (@find-file-in org-export-directory)))) - - -;; Sets up a sane `org-capture' workflow, wherein the org-capture buffer is -;; opened in a popup frame, and can be invoked from outside Emacs as well. -;; -;; See `doom/org-capture' -(defun doom|org-init-capture () - "Set up a sane `org-capture' workflow." - (setq org-default-notes-file (f-expand "notes.org" doom-org-dir)) - - (require 'org-capture) - (require 'org-protocol) - (def-popup! "*Org Select*" :align below :size 0.4) - - (defadvice org-capture (after make-full-window-frame activate) - "If org-capture creates a new frame, this initializes it properly, by -deleting other windows and blanking out the mode-line." - (when (equal "org-capture" (frame-parameter nil 'name)) - (setq mode-line-format nil) - (delete-other-windows))) - - (defadvice org-capture-finalize (after delete-capture-frame activate) - "Closes the frame once org-capture is done." - (when (equal "org-capture" (frame-parameter nil 'name)) - (delete-frame))) - - (setq org-capture-templates - '(;; TODO: New Task (todo) - ;; TODO: New vocabulary word - - ("c" "Changelog" entry - (file+headline (f-expand "CHANGELOG.org" (doom/project-root)) "Unreleased") - "* %?") - - ;; ("p" "Project Notes" entry - ;; (file+headline org-default-notes-file "Inbox") - ;; "* %u %?\n%i" :prepend t) - - ;; ("m" "Major-mode Notes" entry - ;; (file+headline org-default-notes-file "Inbox") - ;; "* %u %?\n%i" :prepend t) - - ("n" "Notes" entry - (file+headline org-default-notes-file "Inbox") - "* %u %?\n%i" :prepend t) - - ;; ("v" "Vocab" entry - ;; (file+headline (concat org-directory "topics/vocab.org") "Unsorted") - ;; "** %i%?\n") - ))) - -;; Getting org to behave -(defun doom|org-hacks () - ;; Don't open separate windows - (push '(file . find-file) org-link-frame-setup) - - ;; Let OS decide what to do with files when opened - (setq org-file-apps - `(("\\.org$" . emacs) - (t . ,(cond (IS-MAC "open -R \"%s\"") - (IS-LINUX "xdg-open \"%s\""))))) - - ;; Don't clobber recentf with agenda files - (defun org-is-agenda-file (filename) - (find (file-truename filename) org-agenda-files :key 'file-truename - :test 'equal)) - (pushnew 'org-is-agenda-file recentf-exclude) - - ;; Remove highlights on ESC - (defun doom*org-remove-occur-highlights (&rest args) - (when (eq major-mode 'org-mode) (org-remove-occur-highlights))) - (advice-add 'evil-force-normal-state :before 'doom*org-remove-occur-highlights) - - ;; Don't reset org-hide! - (advice-add 'org-find-invisible-foreground :override 'ignore)) - -(provide 'module-org) -;;; module-org.el ends here diff --git a/modules/fun/doom-quit/config.el b/modules/fun/doom-quit/config.el deleted file mode 100644 index 54208df18..000000000 --- a/modules/fun/doom-quit/config.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; fun/doom-quit/config.el -;; -;; A silly module that prompts you with messages when you try to quit, like DOOM -;; did. Some quotes are taken from Doom's quit-message list, others are random, -;; nerdy references that no decent human being has any business recognizing. - -(defvar +doom-quit-messages - '(;; from Doom 1 - "Please don't leave, there's more demons to toast!" - "Let's beat it -- This is turning into a bloodbath!" - "I wouldn't leave if I were you. DOS is much worse." - "Don't leave yet -- There's a demon around that corner!" - "Ya know, next time you come in here I'm gonna toast ya." - "Go ahead and leave. See if I care." - "Are you sure you want to quit this great editor?" - ;; Custom - "(setq nothing t) (setq permitted 'everything)" - "Emacs will remember that." - "Emacs, Emacs never changes." - "Hey! Hey, M-x listen!" - "I'm the man who's going to burn your house down! With lemons!" - "It's not like I'll miss you or anything, b-baka!" - "Okay, look. We've both said a lot of things you're going to regret..." - "Wake up, Mr. Stallman. Wake up and smell the ashes." - "You are *not* prepared!") - "A list of quit messages, picked randomly by `+doom-quit'. Taken from -http://doom.wikia.com/wiki/Quit_messages and elsewhere.") - -(defun +doom-quit (&rest _) - (if (doom-real-buffers-list) - (y-or-n-p (format "%s Quit?" (nth (random (length +doom-quit-messages)) +doom-quit-messages))) - t)) - -(setq confirm-kill-emacs '+doom-quit) - diff --git a/modules/os/macos/autoload.el b/modules/os/macos/autoload.el deleted file mode 100644 index 1b30ab9b6..000000000 --- a/modules/os/macos/autoload.el +++ /dev/null @@ -1,48 +0,0 @@ -;;; os/macos/autoload.el - -;;;###autoload -(defun +macos-open-with (&optional app-name path) - "Send PATH to APP-NAME on OSX." - (interactive) - (let* ((path (f-full (s-replace "'" "\\'" - (or path (if (eq major-mode 'dired-mode) - (dired-get-file-for-visit) - (buffer-file-name)))))) - (command (format "open %s" - (if app-name - (format "-a %s '%s'" (shell-quote-argument app-name) path) - (format "'%s'" path))))) - (message "Running: %s" command) - (shell-command command))) - -(defmacro +macos@open-with (id &optional app dir) - `(defun ,(intern (format "+macos/%s" id)) () - (interactive) - (+macos-open-with ,app ,dir))) - -;;;###autoload -(defun +macos/open-in-browser () - "Open current file in your default browser." - (interactive) - (browse-url buffer-file-name)) - -;;;###autoload (autoload '+macos/open-in-default-program "os/macos/autoload" nil t) -(+macos@open-with open-in-default-program) - -;;;###autoload (autoload '+macos/reveal-in-finder "os/macos/autoload" nil t) -(+macos@open-with reveal-in-finder "Finder" default-directory) - -;;;###autoload (autoload '+macos/reveal-project-in-finder "os/macos/autoload" nil t) -(+macos@open-with reveal-project-in-finder "Finder" (doom-project-root)) - -;;;###autoload (autoload '+macos/send-to-transmit "os/macos/autoload" nil t) -(+macos@open-with send-to-transmit "Transmit") - -;;;###autoload (autoload '+macos/send-cwd-to-transmit "os/macos/autoload" nil t) -(+macos@open-with send-cwd-to-transmit "Transmit" default-directory) - -;;;###autoload (autoload '+macos/send-to-launchbar "os/macos/autoload" nil t) -(+macos@open-with send-to-launchbar "LaunchBar") - -;;;###autoload (autoload '+macos/send-project-to-launchbar "os/macos/autoload" nil t) -(+macos@open-with send-project-to-launchbar "LaunchBar" (doom-project-root)) diff --git a/modules/os/macos/config.el b/modules/os/macos/config.el deleted file mode 100644 index b5a40a59d..000000000 --- a/modules/os/macos/config.el +++ /dev/null @@ -1,36 +0,0 @@ -;;; os/macos/config.el - -(setq mac-command-modifier 'meta - mac-option-modifier 'alt - ;; sane trackpad/mouse scroll settings - mac-redisplay-dont-reset-vscroll t - mac-mouse-wheel-smooth-scroll nil - mouse-wheel-scroll-amount '(5 ((shift) . 2)) ; one line at a time - mouse-wheel-progressive-speed nil ; don't accelerate scrolling - ;; Curse Lion and its sudden but inevitable fullscreen mode! - ;; NOTE Meaningless to railwaycat's emacs-mac build - ns-use-native-fullscreen nil - ;; Don't open files from the workspace in a new frame - ns-pop-up-frames nil) - -(cond ((display-graphic-p) - ;; `exec-path-from-shell' is slow, so bring out the cache - (setq exec-path - (or (persistent-soft-fetch 'exec-path "emacs") - (persistent-soft-store - 'exec-path - (progn (require 'exec-path-from-shell) - (exec-path-from-shell-initialize) - exec-path) - "emacs")))) - (t - (require 'osx-clipboard) - (osx-clipboard-mode +1))) - -(@after evil - ;; On OSX, stop copying each visual state move to the clipboard: - ;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on - ;; Most of this code grokked from: - ;; http://stackoverflow.com/questions/15873346/elisp-rename-macro - (when (or (featurep 'mac) (featurep 'ns)) - (advice-add 'evil-visual-update-x-selection :override 'ignore))) diff --git a/modules/os/macos/packages.el b/modules/os/macos/packages.el deleted file mode 100644 index dbd2728cf..000000000 --- a/modules/os/macos/packages.el +++ /dev/null @@ -1,5 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; os/macos/packages.el - -(@package exec-path-from-shell) -(@package osx-clipboard)