-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.kdl
105 lines (100 loc) · 3.22 KB
/
config.kdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
world {
external-commands {
preview {
dir "exa" "-l" "--all" "--color=always" "--group-directories-first" "--git" "$DIR"
file "bat" "--color=always" "$FILE"
file-line "bat" "--color=always" "--line-range" "$FIRST:$LAST" "-H" "$LINE" "$FILE"
}
open {
file "$EDITOR" "$FILE"
file-jump "$EDITOR" "$FILE:$LINE:$COLUMN"
// file-jump "nvim" "$FILE" "+call cursor($LINE, $COLUMN)"
dir "zellij" "action" "new-pane" "--cwd" "$DIR" "--" "broot"
url "firefox" "$URL"
pipe-$SNIPPET_TEXT-into "wl-copy"
}
}
surf-parsing {
// regex can be arbitrary, but the named groups `description`, `url`
// must exist, otherwise panics will entail
markdown-reference-link-regex r#"\[(?P<description>[^\]]+)\]\((?P<url>[^\)]+)\)"#
url-regex r#"^https?://\S+"#
file-dest-has-line-regex r#".*:[0-9]+$"#
// regex can be arbitrary, but the named groups `whitespace`, `checkmark`, `task_text`
// must exist, otherwise panics will entail.
// checkmark must be one char, either ' ' or 'x', otherwise the behaviour is hard
// to predict.
//
// the nesting will be computed as the the length of `whitespace` group in bytes
// divided by 2
task-item-regex r#"(?P<whitespace>( )*)- \[(?P<checkmark>[x ])\]\s+(?P<task_text>.+)"#
}
notes-work-dir "/home/user/notes"
keymap {
explore {
open_xdg "ctrl-o"
populate_search_with_backlinks "ctrl-h"
populate_search_with_forwardlinks "ctrl-l"
toggle_preview_type "ctrl-t"
widen_to_all_notes "ctrl-w"
surf_note_subtree "ctrl-s"
checkmark_note "ctrl-k"
rename_note "alt-r"
link_from_selected_note "alt-l"
unlink_from_selected_note "alt-u"
remove_note "alt-d"
create_autolinked_note "alt-c"
toggle_links_direction "alt-f"
splice_reachable_children_of_note "alt-s"
narrow_selection "alt-n"
decrease_unlisted_threshold "alt-o"
increase_unlisted_threshold "alt-p"
push_note_to_stack "alt-a"
switch_mode_to_stack "ctrl-a"
}
surf {
open_xdg "ctrl-o"
jump_to_link_or_snippet "ctrl-j"
return_to_explore "ctrl-e"
}
checkmark {
jump_to_task "ctrl-j"
copy_task_subtree_into_clipboard "ctrl-y"
widen_context_to_all_tasks "ctrl-w"
narrow_context_to_selected_task_subtree "ctrl-l"
return_to_explore "ctrl-e"
}
stack {
toggle_preview_type "ctrl-t"
pop_note_from_stack "alt-p"
move_note_to_top_of_stack "alt-t"
return_to_explore "ctrl-e"
swap_with_above "alt-u"
swap_with_below "alt-d"
deselect_all "ctrl-q"
}
}
color {
// used for markdown of notes' names, task items' titles
//
// used for code snippets in various syntaxes (syntax is hinted by ```tag)
theme "/home/user/Downloads/file.tmTheme"
elements {
links {
parent_name r#" {"r":242,"g":242,"b":223} "#
url r#" {"r":144,"g":238,"b":144} "#
file r#" {"r":216,"g":191,"b":216} "#
dir r#" {"r":147,"g":112,"b":219} "#
broken r#" {"r":255,"g":0,"b":0} "#
code_block r#" {"r":135,"g":206,"b":250} "#
unlisted r#" {"r":180,"g":180,"b":180} "#
cycle r#" {"r":210,"g":180,"b":140} "#
}
notes {
tag r#" {"r":0,"g":255,"b":255} "#
// `root` and 1 more special tag
special_tag r#" {"r":255,"g":0,"b":0} "#
}
}
}
}