This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| const noteName = tp.file.title; | |
| const queryKeyword = await tp.system.prompt("Keyword for Tasks search query", noteName); | |
| if(queryKeyword) { | |
| tR = ` | |
| \`\`\`query | |
| -file:inbox (file:("${queryKeyword}") line:(" [ ] ")) OR (section:(--"${queryKeyword}" " [ ] ")) OR (section:(--"${queryKeyword}" section:(" [ ] "))) | |
| \`\`\` | |
| ` | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| /* #7159de (similar to Obsidian purple) */ | |
| --block-ref-line-color: grey; | |
| --block-ref-line-type: solid; | |
| --block-ref-line-size: 2px; | |
| /* Set to "inherit" for no bg color */ | |
| --block-ref-hover-bg-color: #d4d0d026; | |
| } | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Default font-family and default 16 size */ | |
| :root { | |
| --bullet-one: '●'; | |
| --bullet-one-pos-top: 5px; | |
| --bullet-one-size: 9px; | |
| --bullet-two: '■'; | |
| --bullet-two-pos-top: 5px; | |
| --bullet-two-size: 9px; | |
| --bullet-three: '○'; | |
| --bullet-three-pos-top: 3px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* RAINBOW INDENT COLORS */ | |
| :root { | |
| /* default */ | |
| --font-use-default: var(--default-font); | |
| --font-size-use-default: var(--editor-font-size); | |
| --indent-use-default: 1.8ch; | |
| /* ------- */ | |
| /* theme */ | |
| --font-use-theme: inherit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| //OPTIONS: TOP / BOTTOM | |
| const whereToWrite = "TOP"; | |
| //OPTIONS: COPY / MOVE | |
| const copyOrMove = "COPY"; | |
| //Find leaf next door | |
| const thisLeaf = app.workspace.activeLeaf; | |
| const thisFile = thisLeaf.view.file; | |
| let leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right"); | |
| if(!leafToUse){leafToUse = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| const notionApiKey = 'YOUR_API_KEY_SEE_COMMENTS_FOR_HOW_TO_GET'; | |
| const reqParams = { | |
| url: 'https://api.notion.com/v1/databases', | |
| method: 'GET', | |
| headers: { | |
| "Content-Type": "application/json", | |
| Authorization: `Bearer ${notionApiKey}`, | |
| "Notion-Version": `2021-08-16`, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| const search = app.workspace.getLeavesOfType("search")[0]; | |
| let thisFile = app.workspace.getActiveFile(); | |
| //SortOrder Options: alphabeticalReverse, alphabetical, byModifiedTime, byModifiedTimeReverse, byCreatedTime, byCreatedTimeReverse | |
| search.view.setSortOrder("byCreatedTime"); | |
| //Collapse=true, Expand=false | |
| search.view.setCollapseAll(false); | |
| //Show Extra Context: true or false | |
| search.view.setExtraContext(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Add the Obsidian purple border */ | |
| .markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block { | |
| border: 4px solid var(--interactive-accent); | |
| border-radius: 10px; | |
| } | |
| /* Hide query syntax in search query embeds */ | |
| .markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query div.internal-query-header { | |
| display: none; | |
| } | |
| .markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| const myDnpPath = 'dnp'; | |
| let dueDateStr = await tp.system.prompt("Enter Date to Start from", "Today"); | |
| const daysBackStr = await tp.system.prompt("How many days back?", "7"); | |
| const daysBack = parseInt(daysBackStr); | |
| let parseResult; | |
| let parseResultLink; | |
| const getAllDates = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| const editor = app.workspace.activeLeaf.view.editor; | |
| if(editor.somethingSelected() === true) { | |
| let selectedText = editor.getSelection(); | |
| let splitLines = selectedText.split('\n'); | |
| let finalOutput = ''; | |
| let listItem = false; | |
| let codeBlock = false; | |
| splitLines.forEach(eachLine => { |