From 466d1f66c69403812a66ac7be4dcabddbccc7993 Mon Sep 17 00:00:00 2001 From: ry Date: Mon, 25 Oct 2021 23:05:05 -0700 Subject: [PATCH] refactored --- .config/alacritty/alacritty.yml | 3 +- .config/doom/config.el | 172 +++++++++++--- .../pipewire/media-session.d/restore-stream | 13 +- Emacs.org | 219 +++++++++++++----- 4 files changed, 308 insertions(+), 99 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index fedce7a..8ee82b4 100755 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -156,7 +156,7 @@ font: style: Bold Italic # Point size - size: 14 + size: 16 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter @@ -863,4 +863,3 @@ font: # Print all received window events. #print_events: false - diff --git a/.config/doom/config.el b/.config/doom/config.el index 5883453..0170a0f 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -39,7 +39,7 @@ (modus-themes-load-themes) :config - (modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi) + (modus-themes-load-vivendi) ;; OR (modus-themes-load-operandi) :bind ("" . modus-themes-toggle)) ;; Set fonts @@ -47,25 +47,8 @@ (set-face-attribute 'variable-pitch nil :font "Fira Sans" :height 1.0 :weight 'regular) (set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 1.0 :weight 'medium) -;; Set agenda files -(setq org-agenda-files - '("~/org/planner.org")) - -(defun rymacs/org-mode-setup () - (org-indent-mode) - (variable-pitch-mode 1) - (visual-line-mode 1)) - -(defun rymacs/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 . rymacs/org-mode-visual-fill)) - -;; Change dashes to dots (defun rymacs/org-font-setup () + ;; Replace list hyphen with dot (font-lock-add-keywords 'org-mode '(("^ *\\([-]\\) " (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) @@ -82,20 +65,136 @@ (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-block nil :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (set-face-attribute 'org-formula 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)) + (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) + +(defun rymacs/org-mode-setup () + (org-indent-mode) + (variable-pitch-mode 1) + (visual-line-mode 1)) -;; Change ellipsis to triangles (use-package org + :commands (org-capture org-agenda) :hook (org-mode . rymacs/org-mode-setup) :config (setq org-ellipsis " ▾") - (rymacs/org-font-setup)) + + (setq org-agenda-start-with-log-mode t) + (setq org-log-done 'time) + (setq org-log-into-drawer t) + + (setq org-agenda-files + '("~/org/planner.org" + "~/org/archive.org" + "~/org/dates.org" + "~/org/journal.org")) + + (require 'org-habit) + (add-to-list 'org-modules 'org-habit) + (setq org-habit-graph-column 60) + + (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)" "CANC(k@)"))) + + (setq org-refile-targets + '(("archive.org" :maxlevel . 1) + ("planner.org" :maxlevel . 1))) + + ;; Save Org buffers after refiling! + (advice-add 'org-refile :after 'org-save-all-org-buffers) + + (setq org-tag-alist + '((:startgroup) + ; Put mutually exclusive tags here + (:endgroup) + ("@errand" . ?E) + ("@home" . ?H) + ("@work" . ?W) + ("agenda" . ?a) + ("planning" . ?p) + ("publish" . ?P) + ("batch" . ?b) + ("note" . ?n) + ("idea" . ?i))) + + ;; Configure custom agenda views + (setq org-agenda-custom-commands + '(("d" "Dashboard" + ((agenda "" ((org-deadline-warning-days 7))) + (todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))) + (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) + + ("n" "Next Tasks" + ((todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))))) + + ;; 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) + (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 "CANC" + ((org-agenda-overriding-header "Cancelled Projects") + (org-agenda-files org-agenda-files))))))) + + (setq org-capture-templates + `(("t" "Tasks / Projects") + ("tt" "Task" entry (file+olp "~/org/planner.org" "Inbox") + "* TODO %?\n %U\n %a\n %i" :empty-lines 1) + + ("j" "Journal Entries") + ("jj" "Journal" entry + (file+olp+datetree "~/org/journal.org") + "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" + ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") + :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) + + (define-key global-map (kbd "C-c j") + (lambda () (interactive) (org-capture nil "jj"))) + + (efs/org-font-setup)) ;; Change default pretty bullets to circles (use-package org-bullets @@ -139,6 +238,23 @@ ;; (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'rymacs/org-babel-tangle-config))) -(defun connect-borg () - (interactive) - (dired "/ssh:root@207.66.177.26#46668:/")) +(use-package org-roam + :ensure t + :init + (setq org-roam-v2-ack t) + :custom + (org-roam-directory "~/roam") + (org-roam-completion-everywhere t) + :bind (("C-c n l" . org-roam-buffer-toggle) + ("C-c n f" . org-roam-node-find) + ("C-c n i" . org-roam-node-insert) + :map org-mode-map + ("C-M-i" . completion-at-point) + :map org-roam-dailies-map + ("Y" . org-roam-dailies-capture-yesterday) + ("T" . org-roam-dailies-capture-tomorrow)) + :bind-keymap + ("C-c n d" . org-roam-dailies-map) + :config + (require 'org-roam-dailies) ;; Ensure the keymap is available + (org-roam-db-autosync-mode)) diff --git a/.config/zsh/pipewire/media-session.d/restore-stream b/.config/zsh/pipewire/media-session.d/restore-stream index 8f3beca..a86e9c5 100644 --- a/.config/zsh/pipewire/media-session.d/restore-stream +++ b/.config/zsh/pipewire/media-session.d/restore-stream @@ -1,11 +1,12 @@ { "restore.stream.Output/Audio.application.name:Firefox": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ] }, - "restore.stream.Output/Audio.media.role:Notification": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" }, + "restore.stream.Output/Audio.media.role:Notification": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ] }, "restore.stream.Output/Audio.application.name:eSpeak": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000 ] }, - "restore.stream.Output/Audio.application.name:speech-dispatcher-espeak-ng": { "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" }, - "restore.stream.Output/Audio.application.name:speech-dispatcher-dummy": { "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" }, - "restore.stream.Output/Audio.application.name:Tor Browser": { "mute": false, "volumes": [ 0.000000, 0.000000 ], "channels": [ "FL", "FR" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" }, + "restore.stream.Output/Audio.application.name:speech-dispatcher-espeak-ng": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ] }, + "restore.stream.Output/Audio.application.name:speech-dispatcher-dummy": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ] }, + "restore.stream.Output/Audio.application.name:Tor Browser": { "volume": 1.000000, "mute": false, "volumes": [ 0.000000, 0.000000 ], "channels": [ "FL", "FR" ] }, "restore.stream.Input/Audio.application.name:GNOME Settings": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ] }, - "restore.stream.Output/Audio.application.name:Chromium": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" }, - "restore.stream.Output/Audio.media.role:Test": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000 ], "channels": [ "MONO" ], "target-node": "bluez_output.00_1B_66_BD_13_AA.a2dp-sink" } + "restore.stream.Output/Audio.application.name:VirtualBoxVM": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ] }, + "restore.stream.Output/Audio.application.name:Chromium": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ] }, + "restore.stream.Output/Audio.application.name:WEBRTC VoiceEngine": { "volume": 1.000000, "mute": false, "volumes": [ 1.000000, 1.000000 ], "channels": [ "FL", "FR" ] } } \ No newline at end of file diff --git a/Emacs.org b/Emacs.org index 54052ea..185dd18 100644 --- a/Emacs.org +++ b/Emacs.org @@ -67,7 +67,7 @@ I am using [[https://protesilaos.com/modus-themes/][Modus Themes]], by [[https:/ (modus-themes-load-themes) :config - (modus-themes-load-operandi) ;; OR (modus-themes-load-vivendi) + (modus-themes-load-vivendi) ;; OR (modus-themes-load-operandi) :bind ("" . modus-themes-toggle)) #+end_src @@ -86,39 +86,6 @@ Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina. #+end_src * Org Mode Configuration -** Org Directory -#+begin_src emacs-lisp - -;; Set agenda files -(setq org-agenda-files - '("~/org/planner.org")) - - -#+end_src -** General Configuration - -#+begin_src emacs-lisp - -(defun rymacs/org-mode-setup () - (org-indent-mode) - (variable-pitch-mode 1) - (visual-line-mode 1)) - -#+end_src - -** Center Org Buffers - -#+begin_src emacs-lisp - -(defun rymacs/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 . rymacs/org-mode-visual-fill)) - -#+end_src ** Set Fonts and Symbols @@ -126,8 +93,8 @@ Here we are setting general font configuration in order to make editing in org #+begin_src emacs-lisp -;; Change dashes to dots (defun rymacs/org-font-setup () + ;; Replace list hyphen with dot (font-lock-add-keywords 'org-mode '(("^ *\\([-]\\) " (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) @@ -144,20 +111,151 @@ Here we are setting general font configuration in order to make editing in org (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-block nil :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (set-face-attribute 'org-formula 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)) + (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) + +#+end_src + +** General Configuration + +Main Org/Agenda configuration. + +#+begin_src emacs-lisp + +(defun rymacs/org-mode-setup () + (org-indent-mode) + (variable-pitch-mode 1) + (visual-line-mode 1)) -;; Change ellipsis to triangles (use-package org + :commands (org-capture org-agenda) :hook (org-mode . rymacs/org-mode-setup) :config (setq org-ellipsis " ▾") - (rymacs/org-font-setup)) + + (setq org-agenda-start-with-log-mode t) + (setq org-log-done 'time) + (setq org-log-into-drawer t) + + (setq org-agenda-files + '("~/org/planner.org" + "~/org/archive.org" + "~/org/dates.org" + "~/org/journal.org")) + + (require 'org-habit) + (add-to-list 'org-modules 'org-habit) + (setq org-habit-graph-column 60) + + (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)" "CANC(k@)"))) + + (setq org-refile-targets + '(("archive.org" :maxlevel . 1) + ("planner.org" :maxlevel . 1))) + + ;; Save Org buffers after refiling! + (advice-add 'org-refile :after 'org-save-all-org-buffers) + + (setq org-tag-alist + '((:startgroup) + ; Put mutually exclusive tags here + (:endgroup) + ("@errand" . ?E) + ("@home" . ?H) + ("@work" . ?W) + ("agenda" . ?a) + ("planning" . ?p) + ("publish" . ?P) + ("batch" . ?b) + ("note" . ?n) + ("idea" . ?i))) + + ;; Configure custom agenda views + (setq org-agenda-custom-commands + '(("d" "Dashboard" + ((agenda "" ((org-deadline-warning-days 7))) + (todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))) + (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) + + ("n" "Next Tasks" + ((todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))))) + + ;; 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) + (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 "CANC" + ((org-agenda-overriding-header "Cancelled Projects") + (org-agenda-files org-agenda-files))))))) + + (setq org-capture-templates + `(("t" "Tasks / Projects") + ("tt" "Task" entry (file+olp "~/org/planner.org" "Inbox") + "* TODO %?\n %U\n %a\n %i" :empty-lines 1) + + ("j" "Journal Entries") + ("jj" "Journal" entry + (file+olp+datetree "~/org/journal.org") + "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" + ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") + :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) + + (define-key global-map (kbd "C-c j") + (lambda () (interactive) (org-capture nil "jj"))) + + (efs/org-font-setup)) + +#+end_src + + +** Better Heading Bullets + +#+begin_src emacs-lisp ;; Change default pretty bullets to circles (use-package org-bullets @@ -168,7 +266,7 @@ Here we are setting general font configuration in order to make editing in org #+end_src -** Visual Fill Mode +** Center Org Buffers #+begin_src emacs-lisp @@ -219,7 +317,7 @@ Here we use a package called org-tempo. #+end_src -*** Babel => Configuration File Automation Hook +*** Babel Configuration File Automation Hook TODO: This needs to be fixed, or find an equiv. Since we don't want to have to manually use the org-babel-tangle function everytime we make changes to the corresponding .org file, we create an automation hook that executes the function every time we save. @@ -237,35 +335,30 @@ Since we don't want to have to manually use the org-babel-tangle function everyt ;; (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'rymacs/org-babel-tangle-config))) #+end_src + * Org Roam Configuration #+begin_src emacs-lisp (use-package org-roam + :ensure t + :init + (setq org-roam-v2-ack t) :custom (org-roam-directory "~/roam") + (org-roam-completion-everywhere t) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) - ("C-c n i" . org-roam-node-insert)) + ("C-c n i" . org-roam-node-insert) + :map org-mode-map + ("C-M-i" . completion-at-point) + :map org-roam-dailies-map + ("Y" . org-roam-dailies-capture-yesterday) + ("T" . org-roam-dailies-capture-tomorrow)) + :bind-keymap + ("C-c n d" . org-roam-dailies-map) :config - (org-roam-setup)) - -#+end_src - -* Remote Aliases - -#+begin_src emacs-lisp - -(defun connect-borg () - (interactive) - (dired "/ssh:root@207.66.177.26#46668:/")) - -(defun connect-nyx () - (interactive) - (dired "/ssh:ry@charon.tr909.sh#1312|ssh:ansible@nyx.nullvoid.rip")) - -(defun connect-charon () - (interactive) - (dired "/ssh:ry@charon.tr909.sh#1312")) + (require 'org-roam-dailies) ;; Ensure the keymap is available + (org-roam-db-autosync-mode)) #+end_src