Default Queries

My default queries in config.edn

This is my current default-queries setup in the config.edn

  • Scheduled - Shows me anything I have scheduled for today
  • Bento - This shows me a clean list of tasks that I want to focus on
  • Widgets - Shows me a list of tasks I prepared that I can do without thinking
  • On this day… - A look back in history

I removed the overdue query because for that I use my Tasklist page, and I might remove Next as well to clean it up even more.

Reminder - Empty queries in this overview disappear, that makes it nice and tidy. If you think it isn’t working you might not have any elements. I usually test the queries in a dedicated page first before adding them to config.edn


To update these queries, you can open your config.edn and add them in between this section

1 ;; The app will show those queries in today's journal page,
2 ;; the "NOW" query asks the tasks which need to be finished "now",
3 ;; the "NEXT" query asks the future tasks.
4 :default-queries
5 {:journals [
6 ;; Add Queries here
7 ]}


These are mostly my routines and reminders that I need to follow up on something. Please note that for this to work you need to use the /schedule command with tasks.

 2  :title ["🗓 Scheduled" ]
 3  :query [:find (pull ?b [*])
 4    :in $ ?today
 5    :where
 6        [?b :block/marker ?marker]
 7        [(contains? #{"LATER" "NOW" "TODO" "DOING" "WAITING"} ?marker)]
 8        [?b :block/scheduled ?d]
 9        [(<= ?d ?today)]
10  ]
11  :inputs [:today]
12  :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
13  :table-view? false
14  :breadcrumb-show? false
15  :collapsed? false


These are tasks that are marked with #bento, I limit them to max 3 per day and these are my big rocks for the day to get done. As the query allows you to see the subtasks it’s easy to break these big rocks down into steps.

 1{:title [:h2 "🍱 Bento Box" ]
 2:query [:find (pull ?b [*])
 3  :where
 4    [?p :block/name "bento"] ; name is always lowercase
 5    [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
 6    [?b :block/marker ?marker]
 7    [(contains? #{"NOW" "LATER" "TODO" "DOING"} ?marker)]
 9:result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
10:table-view? false
11:breadcrumb-show? false
12:collapsed? false


All tasks marked with #W, are tasks I made actionable. This means I can do them in 5-10 minutes and the line is a clear thing I can do.

Things like

  • Send email to X about Y
  • Order new paperclips
  • Read this document
 2    :title ["🍣 Widgets" ]
 3    :query [:find (pull ?b [*])
 4    :where
 5      [?p :block/name "w"] ; name is always lowercase
 6      [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
 7      [?b :block/marker "TODO"]
 8    ]
 9    :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
10    :table-view? false
11    :breadcrumb-show? false
12    :collapsed? false

On this day

This shows me the same day in the journal from the last couple of years, giving a quick glance back in years past.

 1{:title "⌛ On this day..."
 2    :query [:find (pull ?b [*])
 3       :in $ ?today
 4       :where
 5       [?b :block/page ?p]
 6       [?p :page/journal? true]
 7       [?p :page/journal-day ?jd]
 8       [(str ?jd) ?jds]
 9       [(subs ?jds 4 8) ?md1]
10       [(str ?today) ?td]
11       [(subs ?td 4 8) ?md2]
12       [(= ?md1 ?md2)]
13       [(< ?jd ?today)]
14	]
15	:inputs [:today]
16    :breadcrumb-show? true
17    :collapsed? False