Skip to content

Commit 566d3a0

Browse files
committed
update for first version
1 parent 5183078 commit 566d3a0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import '@logseq/libs';
22
import 'logseq-dateutils'
33
import { getDateForPageWithoutBrackets } from 'logseq-dateutils';
4-
const main = async () => {
54

5+
const settings = [{
6+
key: 'keyboardShortcut',
7+
title: "Keyboard shortcut",
8+
description: 'Keyboard shortcut to trigger going home',
9+
type: 'string',
10+
default: 'mod+g',
11+
}]
12+
const main = async () => {
13+
logseq.useSettingsSchema(settings);
614
logseq.App.registerCommandPalette({
715
key: 'Go home now!',
816
label: 'Go to todays journal, append a new block and scroll to it',
9-
keybinding: {binding: "mod+g"},
17+
keybinding: { binding: "mod+g" },
1018
}, async () => {
1119
const dateFormat = (await logseq.App.getUserConfigs()).preferredDateFormat
1220
const date = getDateForPageWithoutBrackets(new Date(), dateFormat);
@@ -17,4 +25,4 @@ const main = async () => {
1725

1826
}
1927

20-
logseq.ready(main).catch(console.error);
28+
logseq.ready(main).catch(console.error);

0 commit comments

Comments
 (0)