dotfiles

feels like ${HOME}
Log | Files | Refs | README

commit ed193cdf02a6378f1eb15ec99093de06e6134382
parent ff114ea518be6653bebb3a9860aa1679dc41ee1b
Author: Yohanes Bandung Bondowoso <hi@ybbond.dev>
Date:   Thu, 13 Aug 2020 01:00:20 +0700

rework doom settings

Diffstat:
M.doom.d/+org.el | 16+++++++++-------
A.doom.d/+plugins.el | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D.doom.d/+ui.el | 48------------------------------------------------
M.doom.d/config.el | 4+++-
A.doom.d/custom.el | 15+++++++++++++++
M.doom.d/init.el | 14++------------
M.doom.d/packages.el | 1+

7 files changed, 96 insertions(+), 68 deletions(-)

diff --git a/.doom.d/+org.el b/.doom.d/+org.el
@@ -6,7 +6,8 @@
   :hook
   (after-init . org-roam-mode))
 ; (setq org_notes "~/Library/Mobile Documents/com\~apple\~CloudDocs/Notes")
-  (setq org_notes "~/org/Notes")
+  ;; (setq org_notes "~/org/Notes")
+  (setq org_notes "~/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org/")
 
 (after! org-roam
   (add-hook 'after-init-hook 'org-roam-mode)
@@ -14,6 +15,7 @@
   (setq org-roam-directory org_notes)
   ; (setq org-roam-db-location "~/Library/Mobile Documents/com\~apple\~CloudDocs/Notes/org-roam.db")
   (setq org-roam-db-location "~/org/org-roam.db")
+  (setq org-roam-link-title-format "[[%s]]")
   (setq org-roam-graph-viewer "/usr/bin/open")
   (setq org-roam-capture-ref-templates
         '(("r" "ref" plain (function org-roam-capture--get-point)
@@ -95,7 +97,7 @@
   (setq deft-directory org_notes)
   (add-hook 'after-init-hook 'org-roam-db-build-cache)
   :bind
-  ("C-c n d" . deft))
+  ("s-d" . deft))
 
 (use-package! org-journal
   :bind
@@ -103,13 +105,13 @@
   ("C-c b" . org-journal-previous-entry)
   ("C-c f" . org-journal-next-entry)
   :config
-  ; (setq org-journal-dir "~/Library/Mobile Documents/com\~apple\~CloudDocs/Notes/journals/"
-  (setq org-journal-dir "~/org/Notes/journals/"
+  (setq org-journal-dir "~/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org/journals/"
+        ; org-journal-dir "~/Library/Mobile Documents/com\~apple\~CloudDocs/Notes/journals/"
+        ; org-journal-dir "~/org/Notes/journals/"
         org-journal-date-prefix "#+title: "
         org-journal-file-format "%Y-%m-%d.org"
         org-journal-date-format "%A, %d %B %Y\n#+roam_tags: journals\n"
-        org-journal-enable-agenda-integration t
-        org-journal-carryover-delete-empty-journal nil))
+        org-journal-enable-agenda-integration t))
 
 (after! org
   (map! :map org-mode-map
@@ -121,6 +123,7 @@
         org-ellipsis " ▼ "
         org-id-link-to-org-use-id nil
         org-pretty-entities t
+        org-src-fontify-natively t
         org-hide-emphasis-markers t)
   (setq org-todo-keywords
         '((sequence "TODO(t)" "PRGS(p)" "TEST(i)" "FDBK(f)" "HOLD(h)" "|" "DONE(d)" "CANCELED(c)")
@@ -134,7 +137,6 @@
           ("HOLD" . +org-todo-project))))
 
 (use-package! org-roam-server
-  :ensure t
   :config
   (setq org-roam-server-host "127.0.0.1"
         org-roam-server-port 3001
diff --git a/.doom.d/+plugins.el b/.doom.d/+plugins.el
@@ -0,0 +1,66 @@
+;;; ~/.doom.d/+ui.el -*- lexical-binding: t; -*-
+
+;; source https://github.com/theianjones/dotfiles/blob/master/.doom.d/+ui.el
+
+
+;; General Configurations
+(use-package! general
+  :config
+  (general-evil-setup))
+
+;; Evil Configurations
+(use-package! evil
+  :init
+  (general-setq evil-disable-insert-state-bindings t)
+  :general
+  ([remap evil-emacs-state] 'evil-normal-state)
+  :config
+  (setq evil-move-cursor-back nil)
+  (setq evil-esc-delay 1)
+  (setq evil-kill-on-visual-paste nil))
+;; replaced by evil-better-visual-line
+;; (setq evil-respect-visual-line-mode t)
+;; (setq evil-want-minibuffer t)
+
+;; Better visual line
+(use-package! evil-better-visual-line
+  :config
+  (evil-better-visual-line-on))
+
+;; Snipe
+(after! evil-snipe
+  (setq evil-snipe-smart-case t)
+  (setq evil-snipe-scope 'whole-buffer)
+  (setq evil-snipe-auto-scroll t)
+  (setq evil-snipe-repeat-keys t)
+  (setq evil-snipe-repeat-scope 'whole-buffer))
+
+;; Dired
+(after! dired
+  ;; (setq dired-listing-switches "-aBhl --group-directories-first"
+  (setq dired-listing-switches "-aBhl"
+        dired-dwim-target t
+        dired-recursive-copies (quote always)
+        dired-recursive-deletes (quote top)))
+
+;; Better Copy-Paste and Clipboard Handling
+;; Disable Emacs' integration of killring with clipboard
+(setq select-enable-clipboard nil)
+;; Remove hook for clipboard configurations from Emacs to command mode
+(remove-hook 'tty-setup-hook 'doom-init-clipboard-in-tty-emacs-h)
+;; Enable ⌘+c and ⌘+v for clipboard handling
+(defun rc-clipboard-yank ()
+  "Copies the active region to the system clipboard."
+  (interactive)
+  (when (region-active-p)
+    (gui-set-selection 'CLIPBOARD
+      (buffer-substring (region-beginning) (region-end)))))
+(defun rc-clipboard-paste ()
+  "Pastes text from the system clipboard."
+  (interactive)
+  (let ((text (gui-get-selection 'CLIPBOARD)))
+    (when text (insert-for-yank text))))
+(map! :v "s-c" #'rc-clipboard-yank
+      :nvi "s-v" #'rc-clipboard-paste)
+(define-key! :keymaps '(evil-ex-completion-map) "s-v" #'rc-clipboard-paste)
+(define-key! :keymaps +default-minibuffer-maps "s-v" #'rc-clipboard-paste)
diff --git a/.doom.d/+ui.el b/.doom.d/+ui.el
@@ -1,48 +0,0 @@
-;;; ~/.doom.d/+ui.el -*- lexical-binding: t; -*-
-
-;; source https://github.com/theianjones/dotfiles/blob/master/.doom.d/+ui.el
-
-
-;; Better visual line
-(use-package evil-better-visual-line
-  :ensure t
-  :config
-  (evil-better-visual-line-on))
-
-;; Better Copy-Paste and Clipboard Handling
-;; Disable Emacs' integration of killring with clipboard
-(setq select-enable-clipboard nil)
-;; Remove hook for clipboard configurations from Emacs to command mode
-(remove-hook 'tty-setup-hook 'doom-init-clipboard-in-tty-emacs-h)
-;; Enable ⌘+c and ⌘+v for clipboard handling
-(defun rc-clipboard-yank ()
-  "Copies the active region to the system clipboard."
-  (interactive)
-  (when (region-active-p)
-    (gui-set-selection 'CLIPBOARD
-      (buffer-substring (region-beginning) (region-end)))))
-(defun rc-clipboard-paste ()
-  "Pastes text from the system clipboard."
-  (interactive)
-  (let ((text (gui-get-selection 'CLIPBOARD)))
-    (when text (insert-for-yank text))))
-(map! :v "s-c" #'rc-clipboard-yank
-      :nvi "s-v" #'rc-clipboard-paste)
-(define-key! :keymaps '(evil-ex-completion-map) "s-v" #'rc-clipboard-paste)
-(define-key! :keymaps +default-minibuffer-maps "s-v" #'rc-clipboard-paste)
-
-;; Snipe
-(after! evil-snipe
-  (setq evil-snipe-smart-case t)
-  (setq evil-snipe-scope 'whole-buffer)
-  (setq evil-snipe-auto-scroll t)
-  (setq evil-snipe-repeat-keys t)
-  (setq evil-snipe-repeat-scope 'whole-buffer))
-
-;; Dired
-(after! dired
-  ;; (setq dired-listing-switches "-aBhl --group-directories-first"
-  (setq dired-listing-switches "-aBhl"
-        dired-dwim-target t
-        dired-recursive-copies (quote always)
-        dired-recursive-deletes (quote top)))
diff --git a/.doom.d/config.el b/.doom.d/config.el
@@ -45,13 +45,15 @@
 
 (setq whitespace-action '(auto-cleanup))
 
+(setq savehist-mode -1)
+
 ;; (define-key! evil-normal-state-map (kbd "M-S-l") 'enlarge-window-horizontally)
 ;; (define-key! evil-normal-state-map (kbd "M-S-h") 'shrink-window-horizontally)
 (global-set-key (kbd "s-l") 'org-roam-find-file)
 (global-set-key (kbd "s-b") 'ivy-switch-buffer)
 (global-set-key (kbd "s-K") 'kill-buffer)
 
-(load! "+ui")
+(load! "+plugins")
 (load! "+org")
 
 ;; Here are some additional functions/macros that could help you configure Doom:
diff --git a/.doom.d/custom.el b/.doom.d/custom.el
@@ -0,0 +1,15 @@
+(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-agenda-files
+   (quote
+    ("/Users/yohanesbandung/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org/journals/2020-08-12.org")))
+ '(package-selected-packages (quote (org-roam-server evil-better-visual-line))))
+(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.
+ )
diff --git a/.doom.d/init.el b/.doom.d/init.el
@@ -92,7 +92,7 @@
        ;;gist              ; interacting with github gists
        lookup              ; navigate your code and its documentation
        ;;lsp
-       macos             ; MacOS-specific commands
+       ;; macos             ; MacOS-specific commands
        magit             ; a git porcelain for Emacs
        ;;make              ; run make tasks from Emacs
        ;;pass              ; password manager for nerds
@@ -155,7 +155,7 @@
        ;;rust              ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
        ;;scala             ; java, but good
        ;;scheme            ; a fully conniving family of lisps
-       sh                ; she sells {ba,z,fi}sh shells on the C xor
+       ;; sh               ; she sells {ba,z,fi}sh shells on the C xor
        ;;sml
        ;;solidity          ; do you need a blockchain? No.
        ;;swift             ; who asked for emoji variables?
@@ -177,13 +177,3 @@
        :config
        ;;literate
        (default +bindings +smartparens))
-
-;; Evil Configurations
-;; (setq evil-respect-visual-line-mode t)
-(setq evil-move-cursor-back nil)
-(setq evil-esc-delay 1)
-(setq evil-kill-on-visual-paste nil)
-;; (setq evil-want-minibuffer t)
-
-
-(setq savehist-mode -1)
diff --git a/.doom.d/packages.el b/.doom.d/packages.el
@@ -50,6 +50,7 @@
 ;(unpin! t)
 
 (package! evil-better-visual-line)
+(package! general)
 (package! org-journal)
 (package! org-roam-server
   :recipe (:host github :repo "org-roam/org-roam-server"))