Added ledger-mode back

This commit is contained in:
Random936
2025-09-27 11:02:10 -07:00
parent 1e79e78465
commit 18685c1898
3 changed files with 18 additions and 1 deletions

View File

@@ -376,4 +376,5 @@ Load other files:
(jm/load-config-if-exists "~/.emacs.d/lsp.org") ; Language Server Protocol
(jm/load-config-if-exists "~/.emacs.d/erc.org") ; IRC Client Config
(jm/load-config-if-exists "~/.emacs.d/email.org") ; Mu4e Config
(jm/load-config-if-exists "~/.emacs.d/ledger.org") ; Ledger CLI Config
#+end_src

16
.emacs.d/ledger.org Normal file
View File

@@ -0,0 +1,16 @@
* Ledger CLI
#+begin_src elisp
(use-package ledger-mode
:mode ("\\.ledger\\'")
:config
(setq ledger-report-use-strict t
ledger-master-file (expand-file-name "Ledger/toc.ledger" jm/cloud-root)
ledger-accounts-file (expand-file-name "Ledger/accounts.ledger" jm/cloud-root))
(setq ledger-reports
`(("bal" ,(format "%%(binary) -f %s bal" ledger-master-file))
("budget" ,(format "%%(binary) -f %s --budget -p 'this month' bal Expenses" ledger-master-file))
("account" ,(format "%%(binary) -f %s reg %%(account)" ledger-master-file))
("monthly balance" ,(format "%%(binary) -f %s bal -p 'this month'" ledger-master-file))
("daily balance" ,(format "%%(binary) -f %s bal -p 'today'" ledger-master-file)))))
#+end_src

View File

@@ -39,7 +39,7 @@ Setup ~org~ mode:
;; Capture templates
org-capture-templates '(("i" "Inbox" entry (file jm/inbox-file)
"* TODO %^{Task}\nDEADLINE: %^t SCHEDULED: %^t")))
"* TODO %^{Task}\nSCHEDULED: %^t DEADLINE: %^t")))
(jm/leader-keys
"oa" '(org-agenda :which-key "Org agenda")