Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; You will most likely need to adjust this font size for your system!
- (defvar runemacs/default-font-size 125)
- (setq inhibit-startup-message t)
- (scroll-bar-mode -1) ; Disable visible scrollbar
- (tool-bar-mode -1) ; Disable the toolbar
- (tooltip-mode -1) ; Disable tooltips
- (set-fringe-mode 10) ; Give some breathing room
- (menu-bar-mode -1) ; Disable the menu bar
- ;; Set up the visible bell
- (setq visible-bell t)
- (column-number-mode)
- (global-display-line-numbers-mode t)
- ;; Disable line numbers for some modes
- (dolist (mode '(org-mode-hook
- term-mode-hook
- shell-mode-hook
- eshell-mode-hook))
- (add-hook mode (lambda () (display-line-numbers-mode 0))))
- ;; Font Configuration ----------------------------------------------------------
- (set-face-attribute 'default nil :font "Fira Code Retina" :height runemacs/default-font-size)
- ;; Set the fixed pitch face
- (set-face-attribute 'fixed-pitch nil :font "Fira Code Retina" :height 125)
- ;; Set the variable pitch face
- (set-face-attribute 'variable-pitch nil :font "Cantarell" :height 125 :weight 'regular)
- ;; Package Manager Configuration -----------------------------------------------
- ;; Initialize package sources
- (require 'package)
- (setq package-archives '(("melpa" . "https://melpa.org/packages/")
- ("org" . "https://orgmode.org/elpa/")
- ("elpa" . "https://elpa.gnu.org/packages/")))
- (package-initialize)
- (unless package-archive-contents
- (package-refresh-contents))
- ;; Initialize use-package on non-Linux platforms
- (unless (package-installed-p 'use-package)
- (package-install 'use-package))
- (require 'use-package)
- (setq use-package-always-ensure t)
- ;; Ivy Configuration -----------------------------------------------------------
- (use-package ivy
- ;:diminish
- :bind (("C-s" . swiper)
- :map ivy-minibuffer-map
- ("TAB" . ivy-alt-done)
- ("C-l" . counsel-up-directory)
- ("C-j" . ivy-next-line)
- ("C-k" . ivy-previous-line)
- :map ivy-switch-buffer-map
- ("C-j" . ivy-next-line)
- ("C-k" . ivy-previous-line)
- ("C-l" . counsel-up-directory)
- ("C-d" . ivy-switch-buffer-kill)
- :map ivy-reverse-i-search-map
- ("C-j" . ivy-next-line)
- ("C-k" . ivy-previous-line)
- ("C-d" . ivy-reverse-i-search-kill))
- :config
- (ivy-mode 1))
- ;; NOTE: The first time you load your configuration on a new machine, you'll
- ;; need to run the following command interactively so that mode line icons
- ;; display correctly:
- ;;
- ;; M-x all-the-icons-install-fonts
- (use-package all-the-icons)
- ;; for some reason this is crashing emacs rn
- ;(use-package doom-modeline
- ; :init (doom-modeline-mode 1)
- ; :custom ((doom-modeline-height 15)))
- (use-package doom-themes
- :init (load-theme 'doom-dracula t))
- (use-package rainbow-delimiters
- :hook (prog-mode . rainbow-delimiters-mode))
- (use-package which-key
- :init (which-key-mode)
- :diminish which-key-mode
- :config
- (setq which-key-idle-delay 1))
- (use-package counsel
- :bind (("M-x" . counsel-M-x)
- ("C-x b" . counsel-ibuffer)
- ("C-x C-f" . counsel-find-file)
- ("C-M-j" . counsel-switch-buffer)
- :map minibuffer-local-map
- ("C-r" . 'counsel-minibuffer-history)))
- (use-package ivy-rich
- :init
- (ivy-rich-mode 1))
- (use-package helpful
- :custom
- (counsel-describe-function-function #'helpful-callable)
- (counsel-describe-variable-function #'helpful-variable)
- :bind
- ([remap describe-function] . counsel-describe-function)
- ([remap describe-command] . helpful-command)
- ([remap describe-variable] . counsel-describe-variable)
- ([remap describe-key] . helpful-key))
- ;; Key Binding Configuration ---------------------------------------------------
- ;; Make ESC quit prompts
- (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
- (use-package general
- :config
- (general-create-definer rune/leader-keys
- :keymaps '(normal insert visual emacs)
- :prefix "SPC"
- :global-prefix "C-SPC")
- (rune/leader-keys
- "t" '(:ignore t :which-key "toggles")
- "tt" '(counsel-load-theme :which-key "choose theme")))
- (use-package evil
- :init
- (setq evil-want-integration t)
- (setq evil-want-keybinding nil)
- (setq evil-want-C-u-scroll t)
- (setq evil-want-C-i-jump nil)
- :config
- (evil-mode 1)
- (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
- (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
- ;; Use visual line motions even outside of visual-line-mode buffers
- (evil-global-set-key 'motion "j" 'evil-next-visual-line)
- (evil-global-set-key 'motion "k" 'evil-previous-visual-line)
- (evil-set-initial-state 'messages-buffer-mode 'normal)
- (evil-set-initial-state 'dashboard-mode 'normal))
- (use-package evil-collection
- :after evil
- :config
- (evil-collection-init))
- (use-package hydra)
- (defhydra hydra-text-scale (:timeout 4)
- "scale text"
- ("j" text-scale-increase "in")
- ("k" text-scale-decrease "out")
- ("f" nil "finished" :exit t))
- (rune/leader-keys
- "ts" '(hydra-text-scale/body :which-key "scale text"))
- ;; Projectile, Magit, and Forge are code development and git tools. Remove them if you don't need them.
- ;; Projectile Configuration ----------------------------------------------------
- (use-package projectile
- :diminish projectile-mode
- :config (projectile-mode)
- :custom ((projectile-completion-system 'ivy))
- :bind-keymap
- ("C-c p" . projectile-command-map)
- :init
- ;; NOTE: Set this to the folder where you keep your Git repos!
- (when (file-directory-p "~/../../../git")
- (setq projectile-project-search-path '("~/../../../git"))
- (setq projectile-switch-project-action #'projectile-dired)))
- (use-package counsel-projectile
- :config (counsel-projectile-mode))
- ;; Magit Configuration ---------------------------------------------------------
- (use-package magit
- :custom
- (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
- ;; NOTE: Make sure to configure a GitHub token before using this package!
- ;; - https://magit.vc/manual/forge/Token-Creation.html#Token-Creation
- ;; - https://magit.vc/manual/ghub/Getting-Started.html#Getting-Started
- (use-package forge)
- (defun efs/org-mode-setup ()
- (org-indent-mode)
- (variable-pitch-mode 1)
- (visual-line-mode 1)
- (auto-fill-mode 0)
- (setq evil-auto-indent nil))
- (defun efs/org-font-setup ()
- ;; Replace list hyphen with dot
- (font-lock-add-keywords 'org-mode
- '(("^ *\\([-]\\) "
- (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
- ;; Set faces for heading levels
- (dolist (face '((org-level-1 . 1.2)
- (org-level-2 . 1.1)
- (org-level-3 . 1.05)
- (org-level-4 . 1.0)
- (org-level-5 . 1.1)
- (org-level-6 . 1.1)
- (org-level-7 . 1.1)
- (org-level-8 . 1.1)))
- (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)))
- ;; Ensure that anything that should be fixed-pitch in Org files appears that way
- (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
- (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
- (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
- (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
- (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
- (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
- (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
- (use-package org
- :hook (org-mode . efs/org-mode-setup)
- :bind (("C-c a" . org-agenda))
- :config
- (setq org-ellipsis " ▾")
- (setq org-agenda-start-with-log-mode t)
- (setq org-log-done 'time)
- (setq org-log-into-drawer t)
- (setq org-agenda-files
- '("~/../org"))
- (setq org-deadline-warning-days 8)
- (setq org-todo-keywords
- '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d@)")
- (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANCELLED(k@)")))
- ;; Configure custom agenda view
- (setq org-agenda-custom-commands
- '(("d" "Dashboard"
- ((agenda "" ((org-deadline-warning-days 7)))
- (todo "NEXT"
- ((org-agenda-overriding-header "Next Tasks")))
- (todo "ACTIVE" ((org-agenda-overriding-header "Active Projects")))))
- ("n" "Next Tasks"
- ((todo "NEXT"
- ((org-agenda-overriding-header "Next Tasks")))))
- ("W" "Work Tasks" tags-todo "+work") ;; TODO tweak, i don't need this
- ;;Low-effort next actions
- ("e" tags-todo "+TODO=\"NEXT\"+Effort<=15&+Effort>0"
- ((org-agenda-overriding-header "Low Effort Tasks")
- (org-agenda-max-todos 20) ;; TODO tweak
- (org-agenda-files org-agenda-files)))
- ("w" "Workflow Status"
- ((todo "WAIT"
- ((org-agenda-overriding-header "Waiting on External")
- (org-agenda-files org-agenda-files)))
- (todo "REVIEW"
- ((org-agenda-overriding-header "In Review")
- (org-agenda-files org-agenda-files)))
- (todo "PLAN"
- ((org-agenda-overriding-header "In Planning")
- (org-agenda-todo-list-sublevels nil)
- (org-agenda-files org-agenda-files)))
- (todo "BACKLOG"
- ((org-agenda-overriding-header "Project Backlog")
- (org-agenda-todo-list-sublevels nil)
- (org-agenda-files org-agenda-files)))
- (todo "READY"
- ((org-agenda-overriding-header "Ready for Work")
- (org-agenda-files org-agenda-files)))
- (todo "ACTIVE"
- ((org-agenda-overriding-header "Active Projects")
- (org-agenda-files org-agenda-files)))
- (todo "COMPLETED"
- ((org-agenda-overriding-header "Completed Projects")
- (org-agenda-files org-agenda-files)))
- (todo "CANCELLED"
- ((org-agenda-overriding-header "Cancelled Projects")
- (org-agenda-files org-agenda-files)))))))
- (setq org-tag-alist
- '((:startgroup)
- ;; Put mutually exclusive tags here
- (:endgroup)
- ("@errand" . ?E)
- ("@home" . ?H)
- ("@work" . ?W)
- ("agenda" . ?a)
- ("planning" . ?p)
- ("writing" . ?w)
- ("batch" . ?b)
- ("note" . ?n)
- ("creative" . ?c)
- ("homework" . ?h)
- ("idea" . ?i)))
- (setq org-refile-targets
- '(("Archive.org" :maxlevel . 1)
- ("Tasks.org" :maxlevel . 1)
- ("Homework.org" :maxlevel . 1)))
- ;; Save org buffers after refiling
- (advice-add 'org-refile :after 'org-save-all-org-buffers)
- (setq org-capture-templates
- '(("t" "tasks / Projects")
- ("tt" "task" entry (file+olp "~/../org/Tasks.org" "Inbox")
- "* TODO %?\n %U\n %a\n %i" :empty-lines 1)
- ("ts" "clocked Entry Subtask" entry (clock)
- "* TODO %?\n %U\n %a\n %i" :empty-lines 1)
- ("tc" "chore" entry (file "~/../org/Chores.org")
- "* TODO %?\n:PROPERTIES:\n:STYLE: habit\n:END:\n %i" :empty-lines 1)
- ("j" "Journal Entries")
- ("jj" "Journal" entry
- (fil+olp+datetree "~/../org/Journal.org")
- "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n"
- :clock-in :clock-resume
- :empty-lines 1)
- ("jm" "Meeting" entry
- (file+olp+datetree "~/../org/Journal.org")
- "* %<%I:%M %p> - %a :meetings:\n\n%?\n\n"
- :clock-in :clock-resume
- :empty-lines 1)
- ("w" "Workflows")
- ("we" "Checking Email" entry (file+olp+datetree ,(dw/get-todays-journal-file-name))
- "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1)
- ("m" "Metrics Capture")
- ("mw" "Weight" table-line (file+headline "~/../org/Metrics.org" "Weight")
- "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t)))
- ;; Org habit display config
- (setq org-habit-graph-column 60)
- (setq org-habit-preceding-days 15)
- (setq org-habit-following-days 5)
- (efs/org-font-setup))
- (global-set-key (kbd "C-c c") 'org-capture)
- (use-package org-bullets
- :after org
- :hook (org-mode . org-bullets-mode)
- :custom
- (org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
- (defun efs/org-mode-visual-fill ()
- (setq visual-fill-column-width 100
- visual-fill-column-center-text t)
- (visual-fill-column-mode 1))
- (use-package visual-fill-column
- :hook (org-mode . efs/org-mode-visual-fill))
- (custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(org-modules
- '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m))
- '(package-selected-packages
- '(buffer-move visual-fill-column org-bullets forge magit counsel-projectile projectile hydra doom-themes doom-modeline evil-collection evil general helpful counsel which-key use-package rainbow-delimiters ivy-rich all-the-icons)))
- (custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement