;; -*- coding: utf-8 -*-
This is the initialization file for `beorg’.
https://beorgapp.com/manual/scripting/ https://beorg.app/learning/
(defvar ui-swap-item-swipe-direction #t
"Whether the swipe direction on items in the agenda or TODO tab should be
swapped. If #t then swiping left-to-right will show state change options rather
than editing the item in the outliner.")
(define (my/schedule-for-today)
(set-current-item-scheduled! (current-date)))
(define (my/schedule-todo-for-today)
(begin (set-current-item-scheduled! (current-date))
(set-current-item-state! "TODO")))
(define (add-location-to-current-item)
(location-get-lat-lon (lambda (lat lon)
(set-current-item-property! "location"
(string-append lat "," lon)))))
(define (make-current-item-top-priority-today)
(begin (set-current-item-scheduled! (current-date))
(set-current-item-priority! "A")))
(define (schedule-current-item-for-tomorrow)
(set-current-item-scheduled! (date-adjust (current-date) 1 'days)))
(define (my/schedule-todo-for-tomorrow)
(begin (set-current-item-scheduled! (date-adjust (current-date) 1 'days))
(set-current-item-state! "TODO")))
(define (remove-all-dates-from-current-item)
(begin (delete-current-item-scheduled!)
(delete-current-item-deadline!)
(delete-current-item-active-date!)))
(defvar item-editor-menu
'(("Assign current location" (add-location-to-current-item))
("Make top priority today" (make-current-item-top-priority-today))
("Schedule TODO for today" (my/schedule-todo-for-today))
("Schedule for today" (my/schedule-for-today))
("Schedule TODO for tomorrow" (my/schedule-todo-for-tomorrow))
("Schedule for tomorrow" (schedule-current-item-for-tomorrow))
("Remove all dates" (remove-all-dates-from-current-item)))
"The items defined here can be run directly from the item editor screen to make quick adjustments.")
(set! filter-min-chars 2)
https://appsonthemove.freshdesk.com/support/discussions/topics/14000015618
(set! beorg-add-newline-between-headlines #t)
(set! file-disable-delete #t
"If set to #t then the option to delete files won't be available in beorg.")
(set! filter-include-default #t
"Whether or not the built-in TODO filters should be shown")
(set! org-todo-action-keywords '("TODO" "DONE" "IN-PROGRESS" "WAIT" "CANCELED"))
(set! org-priorities '("A" "B" "C"))
https://beorg.app/learning/excluding-tasks-from-specific-files-for-the-agenda-and-todo-lists/
(set! agenda-exclude-files
'("archives.org"
"init.org"))
(set! todo-exclude-files
agenda-exclude-files)
(filter-add "❗️Top Priority TODO"
(lambda (item)
(and
(string=? (item-priority item) "A")
(string=? (item-state item) "TODO")
(not (member "ARCHIVE" (item-tags item)))
)))
(filter-add "🪬 IN-PROGRESS, TODO and WAIT"
(lambda (item)
(and (or
(string=? (item-state item) "IN-PROGRESS")
(string=? (item-state item) "TODO")
(string=? (item-state item) "WAIT")
)
(not (member "ARCHIVE" (item-tags item)))
)))
(filter-add "🔨 TODO w/o ARCHIVE"
(lambda (item)
(and (string=? (item-state item) "TODO") (not (member "ARCHIVE" (item-tags item))))
))
(filter-add "📥 inbox.org TODO"
(lambda (item)
(and
(string=? (item-file item) "inbox.org")
(string=? (item-state item) "TODO")
)))
https://appsonthemove.freshdesk.com/support/discussions/topics/14000015064
(set! item-templates
'(
;;; Quick TODO - schedule for today, don't prompt for notes
("📎 QTODO"
"s TODO f inbox.org sch 0 h Shortterm n \"Captured: [%now%]\"")
;;; Personal TODO - schedule for today but prompt for notes immediately
("📝 Personal TODO"
"s TODO f inbox.org sch 0 h Personal n \"Captured: [%now%]\n\n\" e")
))
(defvar editor-toolbar-items '(
("icon-time" (insert (date->string (current-date) "<~Y-~m-~d ~a ~H:~M>")))
("icon-left" (backward-char))
("icon-right" (forward-char))
("icon-list" (insert "+ "))
("icon-todolist" (insert "+ [ ] "))
("icon-change" (show-transform-commands))
("icon-tools" (show-tools-commands))
("icon-settings" (insert-code-snippet)))
"A list of buttons to show above the keyboard when editing notes. The list is a list of lists stating the button text and the code to run. For example '((\"<\" (backward-char)) (\">\" (forward-char))) defines a toolbar with the buttons < and > which respectively execute the functions backward-char and forward-char.")
https://appsonthemove.freshdesk.com/support/discussions/topics/14000016681
(set! sync-subfolders #t)