summaryrefslogtreecommitdiff
path: root/.doom.d
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2022-08-09 11:18:14 -0300
committerRoger Gonzalez <roger@rogs.me>2022-08-09 11:18:14 -0300
commit11110f25c9a214e15566e04af6ff989a96fdd53f (patch)
tree032d2eb59725ab677e3079d68d4212e599181e23 /.doom.d
parent89cf3bc2d5d56fa1afc10bf7a534e99c85fdd6e1 (diff)
General fixes, mostly on the linux side
Diffstat (limited to '.doom.d')
-rw-r--r--.doom.d/config.el237
-rw-r--r--.doom.d/init.el49
-rw-r--r--.doom.d/packages.el6
3 files changed, 241 insertions, 51 deletions
diff --git a/.doom.d/config.el b/.doom.d/config.el
index 184c7057..745a9c5d 100644
--- a/.doom.d/config.el
+++ b/.doom.d/config.el
@@ -9,6 +9,13 @@
(setq user-full-name "Roger Gonzalez"
user-mail-address "roger@rogs.me")
+;; Add custom packages
+(add-to-list 'load-path "~/.doom.d/custom-packages")
+
+;; Load custom packages
+(require 'screenshot)
+(require 'ox-slack)
+
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
@@ -22,9 +29,12 @@
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
-(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 14)
+;; (setq doom-font (font-spec :family "Mononoki Nerd Font" :size 14)
+;; doom-variable-pitch-font (font-spec :family "sans")
+;; doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
+(setq doom-font (font-spec :family "MesloLGS NF" :size 14)
doom-variable-pitch-font (font-spec :family "sans")
- doom-big-font (font-spec :family "Mononoki Nerd Font" :size 24))
+ doom-big-font (font-spec :family "MesloLGS NF" :size 24))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
@@ -35,7 +45,11 @@
(custom-set-faces!
'(font-lock-comment-face :slant italic)
'(font-lock-keyword-face :slant italic))
-(setq doom-theme 'doom-oceanic-next)
+(setq doom-theme 'doom-badger) ;; obscuro, chulo
+;; (setq doom-theme 'doom-oceanic-next) ;; primero original
+;; (setq doom-theme 'doom-henna) ;; mucho verde + rojo. tambien ta bueno
+;; (setq doom-theme 'doom-moonlight) ;; mucho morado. no esta mal
+;; (setq doom-theme 'doom-tomorrow-night) ;; parecido a badger, sin integracion con ORG
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
@@ -116,21 +130,29 @@
(setq org-agenda-include-diary t)
;; Logs
(setq org-log-state-notes-insert-after-drawers nil
- org-log-into-drawer t
+ org-log-into-drawer "LOGBOOK"
org-log-done 'time
org-log-repeat 'time
org-log-redeadline 'note
org-log-reschedule 'note)
;; Keyword and faces
(setq-default org-todo-keywords
- '((sequence "TODO(t!)" "IN_PROGRESS(i!)" "WAIT(w@/!)" "SOMEDAY(s!)" "|" "DONE(d@/!)" "CANCELLED(c@/!)")))
+ '((sequence "REPEAT(r)" "NEXT(n@/!)" "DELEGATED(e@/!)" "TODO(t@/!)" "WAITING(w@/!)" "SOMEDAY(s@/!)" "PROJ(p)" "|" "DONE(d@)" "CANCELLED(c@/!)" "FORWARDED(f@)")))
(setq-default org-todo-keyword-faces
- '(( "TODO" . (:foreground "white" :background "darkorchid4" :weight bold))
- ( "IN_PROGRESS" . (:background "deeppink3" :weight bold))
- ( "WAIT" (:background "red" :weight bold))
+ '(
+ ( "REPEAT" . (:foreground "white" :background "indigo" :weight bold))
+ ( "NEXT" . (:foreground "red" :background "orange" :weight bold))
+ ( "DELEGATED" . (:foreground "white" :background "blue" :weight bold))
+ ( "TODO" . (:foreground "white" :background "violet" :weight bold))
+ ( "WAITING" (:foreground "white" :background "#A9BE00" :weight bold))
( "SOMEDAY" . (:foreground "white" :background "#00807E" :weight bold))
+ ( "PROJ" . (:foreground "white" :background "deeppink3" :weight bold))
( "DONE" . (:foreground "white" :background "forest green" :weight bold))
- ( "CANCELLED" . (:foreground "light gray" :slant italic))))
+ ( "CANCELLED" . (:foreground "light gray" :slant italic))
+ ( "FORWARDED" . (:foreground "light gray" :slant italic))
+ ))
+ (setq org-fontify-done-headline t)
+ (setq org-fontify-todo-headline t)
;; Priorities
;; A: Do it now
;; B: Decide when to do it
@@ -143,36 +165,176 @@
(?B . (:foreground "white" :background "dark green" :weight bold))
(?C . (:foreground "yellow"))
(?D . (:foreground "gray"))))
-
;; Capture templates
(setq org-capture-templates
(quote
(
- ;; Personal templates
- ("p" "Templates for personal")
- ("pr" "Non-scheduled" entry
- (file+headline "~/org/personal.org" "Captured")
- (file "~/org/templates/basic-task.txt"))
- ("ps" "Scheduled" entry
- (file+headline "~/org/personal.org" "Captured")
- (file "~/org/templates/scheduled-task.txt"))
- ("pl" "Logbook entry for Personal" entry (file+olp+datetree "logbook-personal.org") "** %U - %^{Tags}\n%?")
- ;; Lazer templates
- ("l" "Templates for Lazer")
- ("lc" "Templates for Certn")
- ("lct" "Tasks" entry
- (file+headline "~/org/Tarmac/Volition/volition.org" "Captured")
- (file "~/org/templates/basic-task.txt"))
- ("lcs" "Spike" entry (file certn/new-spike) (file "~/org/templates/spike.txt"))
- ("lcl" "Logbook entry for Certn" entry (file+olp+datetree "~/org/Lazer/Certn/logbook-certn.org") "** %U - %^{Tags}\n%?")
- ("ll" "Logbook entry for Lazer" entry (file+olp+datetree "~/org/Lazer/logbook-lazer.org") "** %U - %^{Tags}\n%?")
+ ("G" "Define a goal" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/goal.org"))
+ ("R" "REPEAT entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/repeat.org"))
+ ("N" "NEXT entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/next.org"))
+ ("T" "TODO entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/todo.org"))
+ ("W" "WAITING entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/waiting.org"))
+ ("S" "SOMEDAY entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/someday.org"))
+ ("P" "PROJ entry" entry (file+headline "~/org/capture.org" "Capture") (file "~/org/templates/proj.org"))
+ ("B" "Book on the to-read-list" entry (file+headline "~/org/private.org" "Libros para leer") (file "~/org/templates/book.org"))
+ ("p" "Create a daily plan")
+ ("pP" "Daily plan private" plain (file+olp+datetree "~/org/plan-free.org") (file "~/org/templates/dailyplan.org") :immediate-finish t)
+ ("pW" "Daily plan work" plain (file+olp+datetree "~/org/plan-work.org") (file "~/org/templates/dailyplan.org") :immediate-finish t)
+ ("j" "Journal entry")
+ ("jP" "Journal entry private private" entry (file+olp+datetree "~/org/journal-private.org") "** %U - %^{Heading}")
+ ("jW" "Journal entry work " entry (file+olp+datetree "~/org/journal-work.org") "** %U - %^{Heading}")
+ ("d" "Create a deployment")
+ ("dF" "Deploy features" plain (file+olp+datetree "~/org/deploy-features.org") (file "~/org/templates/deployment.org"))
+ ("dB" "Deploy bugs" plain (file+olp+datetree "~/org/deploy-bugs.org") (file "~/org/templates/deployment.org"))
)))
+ ;; Custom agenda views
+ (setq org-agenda-custom-commands
+ (quote
+ (
+ ("A" . "Agendas")
+ ("AT" "Daily overview"
+ ((tags-todo "URGENT"
+ ((org-agenda-overriding-header "Urgent Tasks")))
+ (tags-todo "RADAR"
+ ((org-agenda-overriding-header "On my radar")))
+ (tags-todo "PHONE+TODO=\"NEXT\""
+ ((org-agenda-overriding-header "Phone Calls")))
+ (tags-todo "COMPANY"
+ ((org-agenda-overriding-header "Cuquitoni")))
+ (tags-todo "SHOPPING"
+ ((org-agenda-overriding-header "Shopping")))
+ (tags-todo "Depth=\"Deep\"/NEXT"
+ ((org-agenda-overriding-header "Next Actions requiring deep work")))
+ (agenda ""
+ ((org-agenda-overriding-header "Today")
+ (org-agenda-span 1)
+ (org-agenda-start-day "1d")
+ (org-agenda-sorting-strategy
+ (quote
+ (time-up priority-down)))))
+ nil nil))
+ ("AW" "Weekly overview" agenda ""
+ ((org-agenda-overriding-header "Weekly overview")))
+ ("AM" "Monthly overview" agenda ""
+ ((org-agenda-overriding-header "Monthly overview"))
+ (org-agenda-span
+ (quote month))
+ (org-deadline-warning-days 0)
+ (org-agenda-sorting-strategy
+ (quote
+ (time-up priority-down tag-up))))
+ ("W" . "Weekly Review Helper")
+ ("Wn" "New tasks" tags "NEW"
+ ((org-agenda-overriding-header "NEW Tasks")))
+ ("Wd" "Check DELEGATED tasks" todo "DELEGATED"
+ ((org-agenda-overriding-header "DELEGATED tasks")))
+ ("Ww" "Check WAITING tasks" todo "WAITING"
+ ((org-agenda-overriding-header "WAITING tasks")))
+ ("Ws" "Check SOMEDAY tasks" todo "SOMEDAY"
+ ((org-agenda-overriding-header "SOMEDAY tasks")))
+ ("Wf" "Check finished tasks" todo "DONE|CANCELLED|FORWARDED"
+ ((org-agenda-overriding-header "Finished tasks")))
+ ("WP" "Planing ToDos (unscheduled) only" todo "TODO|NEXT"
+ ((org-agenda-overriding-header "To plan")
+ (org-agenda-skip-function
+ (quote
+ (org-agenda-skip-entry-if
+ (quote scheduled)
+ (quote deadline)))))))
+ ))
+ ;;
;; Enforce ordered tasks
(setq org-enforce-todo-dependencies t)
(setq org-enforce-todo-checkbox-dependencies t)
+ (setq org-track-ordered-property-with-tag t)
+
+ ;; Org bullets
(require 'org-bullets)
- (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
+ (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
+
+ ;; Org recur
+ (use-package org-recur
+ :hook ((org-mode . org-recur-mode)
+ (org-agenda-mode . org-recur-agenda-mode))
+ :demand t
+ :config
+ (define-key org-recur-mode-map (kbd "C-c d") 'org-recur-finish)
+
+ ;; Rebind the 'd' key in org-agenda (default: `org-agenda-day-view').
+ (define-key org-recur-agenda-mode-map (kbd "C-c d") 'org-recur-finish)
+ (define-key org-recur-agenda-mode-map (kbd "C-c 0") 'org-recur-schedule-today)
+
+ (setq org-recur-finish-done t
+ org-recur-finish-archive t))
+
+ ;; Truncate lines to 105 chars
+ ;; Why 105 chars? Because that's the max my screen can handle on vertical split
+ (add-hook 'org-mode-hook #'auto-fill-mode)
+ (setq-default fill-column 105)
+
+ ;; Custom ORG functions
+ ;; Refresh org-agenda after rescheduling a task.
+ (defun org-agenda-refresh ()
+ "Refresh all `org-agenda' buffers."
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when (derived-mode-p 'org-agenda-mode)
+ (org-agenda-maybe-redo)))))
+
+ (defadvice org-schedule (after refresh-agenda activate)
+ "Refresh org-agenda."
+ (org-agenda-refresh))
+
+ (defun org-focus-private() "Set focus on private things."
+ (interactive)
+ (setq org-agenda-files '("~/org/private.org")))
+ (defun org-focus-work() "Set focus on work things."
+ (interactive)
+ (setq org-agenda-files '("~/org/work.org")))
+ (defun org-focus-all() "Set focus on all things."
+ (interactive)
+ (setq org-agenda-files '("~/org/")))
+ (defun my/org-add-ids-to-headlines-in-file ()
+ "Add ID properties to all headlines in the current file which
+do not already have one."
+ (interactive)
+ (org-map-entries 'org-id-get-create))
+ (add-hook 'org-mode-hook
+ (lambda ()
+ (add-hook 'before-save-hook
+ 'my/org-add-ids-to-headlines-in-file nil 'local)))
+ (defun my/copy-idlink-to-clipboard() "Copy an ID link with the
+headline to killring, if no ID is there then create a new unique
+ID. This function works only in org-mode or org-agenda buffers.
+
+The purpose of this function is to easily construct id:-links to
+org-mode items. If its assigned to a key it saves you marking the
+text and copying to the killring."
+ (interactive)
+ (when (eq major-mode 'org-agenda-mode) ;if we are in agenda mode we switch to orgmode
+ (org-agenda-show)
+ (org-agenda-goto))
+ (when (eq major-mode 'org-mode) ; do this only in org-mode buffers
+ (setq mytmphead (nth 4 (org-heading-components)))
+ (setq mytmpid (funcall 'org-id-get-create))
+ (setq mytmplink (format "[[id:%s][%s]]" mytmpid mytmphead))
+ (kill-new mytmplink)
+ (message "Copied %s to killring (clipboard)" mytmplink)
+ ))
+
+ (global-set-key (kbd "<f5>") 'my/copy-idlink-to-clipboard)
+
+ (defun org-reset-checkbox-state-maybe ()
+ "Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set"
+ (interactive "*")
+ (if (org-entry-get (point) "RESET_CHECK_BOXES")
+ (org-reset-checkbox-state-subtree)))
+
+ (defun org-checklist ()
+ (when (member org-state org-done-keywords) ;; org-state dynamically bound in org.el/org-todo
+ (org-reset-checkbox-state-maybe)))
+ (add-hook 'org-after-todo-state-change-hook 'org-checklist))
;; My own menu
(map! :leader
@@ -211,3 +373,20 @@
(let ((name (read-string "Ticket: ")))
(expand-file-name (format "%s.org" name) "~/org/Lazer/Certn/Spikes")))
+;; Dashboard mode
+(use-package dashboard
+ :init ;; tweak dashboard config before loading it
+ (setq dashboard-set-heading-icons t)
+ (setq dashboard-set-file-icons t)
+ (setq dashboard-center-content nil) ;; set to 't' for centered content
+ (setq dashboard-items '((recents . 5)
+ (agenda . 5)
+ (bookmarks . 5)
+ (projects . 5)))
+ (setq dashboard-set-navigator t)
+ :config
+ (dashboard-setup-startup-hook)
+ (dashboard-modify-heading-icons '((recents . "file-text")
+ (bookmarks . "book"))))
+(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
+(setq doom-fallback-buffer-name "*dashboard*")
diff --git a/.doom.d/init.el b/.doom.d/init.el
index a510723b..2258fd05 100644
--- a/.doom.d/init.el
+++ b/.doom.d/init.el
@@ -4,8 +4,8 @@
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
-;; documentation. There you'll find a "Module Index" link where you'll find
-;; a comprehensive list of Doom's modules and what flags they support.
+;; documentation. There you'll find a link to Doom's Module Index where all
+;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
@@ -15,36 +15,36 @@
;; directory (for easy access to its source code).
(doom! :input
+ ;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
- ;;helm ; the *other* search engine for love and life
+ helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
ivy ; a search engine for love and life
- vertico
+ ;; vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
- doom-dashboard ; a nifty splash screen for Emacs
+ ;;doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode) ; 🙂
- ;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
- ;;minimap ; show a map of the code on the side
+ minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
- ;;nav-flash ; blink cursor line after big motions
- neotree ; a project drawer, like NERDTree for vim
+ nav-flash ; blink cursor line after big motions
+ ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
- ;;treemacs ; a project drawer, like neotree but cooler
+ treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
@@ -67,9 +67,9 @@
;;word-wrap ; soft wrapping with language-aware indent
:emacs
- dired ; making dired pretty [functional]
+ (dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
- ;;ibuffer ; interactive buffer management
+ (ibuffer +icons) ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
@@ -86,6 +86,7 @@
:tools
;;ansible
+ ;;biblio ; Writes a PhD for you (citation needed)
debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
@@ -94,8 +95,8 @@
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
- ;;lsp
- (magit +forge) ; a git porcelain for Emacs
+ ;;lsp ; M-x vscode
+ (magit +forge) ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
@@ -104,6 +105,7 @@
;;taskrunner ; taskrunner for all your projects
terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
+ ;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
@@ -113,7 +115,7 @@
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
- ;;cc ; C > C++ == 1
+ ;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
@@ -121,6 +123,7 @@
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
+ ;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
@@ -128,15 +131,17 @@
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
+ ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
- ;;(haskell +dante) ; a language that's lazier than I am
+ ;;(graphql +lsp) ; Give queries a REST
+ ;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
- ;;json ; At least it ain't XML
- ;;(java +meghanada) ; the poster child for carpal tunnel syndrome
+ json ; At least it ain't XML
+ ;;(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
@@ -148,7 +153,7 @@
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
- (org +hugo) ; organize your plain life in plain text
+ (org +hugo) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
@@ -167,12 +172,12 @@
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
- web ; the tubes
- yaml ; JSON, but readable
+ web ; the tubes
+ yaml ; JSON, but readable
;;zig ; C, but simpler
:email
- ;;(mu4e +gmail)
+ ;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
diff --git a/.doom.d/packages.el b/.doom.d/packages.el
index f5eab35a..7ca9bca8 100644
--- a/.doom.d/packages.el
+++ b/.doom.d/packages.el
@@ -54,4 +54,10 @@
(package! idle-highlight-mode)
(package! symbol-overlay)
(package! elpy)
+(package! groovy-mode)
+(package! org-recur)
+(package! ox-gfm)
+(package! ox-clip)
+(package! dashboard)
+
;; (package! lsp-python-ms :disable t)