Skip to content

Instantly share code, notes, and snippets.

@d3chapma
Last active September 1, 2022 21:02
Show Gist options
  • Save d3chapma/e165e0933d999920bf4264fe2f883181 to your computer and use it in GitHub Desktop.
Save d3chapma/e165e0933d999920bf4264fe2f883181 to your computer and use it in GitHub Desktop.
Logseq default queries
:default-queries
{:journals
[{:title "☀️ TODAY"
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"NOW"} ?marker)]
[?h :block/page ?p]
]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:breadcrumb-show? false
:collapsed? false}
{:title "🔨 WORK"
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"LATER"} ?marker)]
(page-ref ?h "work")
]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:breadcrumb-show? false
:collapsed? true}
{:title "🏋🏻 CAREER"
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"LATER"} ?marker)]
(page-ref ?h "career")
]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:breadcrumb-show? false
:collapsed? true}
{:title "🏠 HOME"
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"LATER"} ?marker)]
(page-ref ?h "home")
]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:breadcrumb-show? false
:collapsed? true}
{:title " OTHER"
:query [:find (pull ?h [*])
:where
[?h :block/marker ?marker]
[(contains? #{"LATER"} ?marker)]
(not (page-ref ?h "work"))
(not (page-ref ?h "career"))
(not (page-ref ?h "reading"))
(not (page-ref ?h "home"))
(not [?h :block/scheduled])
]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:breadcrumb-show? false
:collapsed? true}
]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment