-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update extensions and add new CSS snippets
- Loading branch information
1 parent
a7c96c7
commit f2996a6
Showing
34 changed files
with
1,010 additions
and
337 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
{ | ||
"accentColor": "#92611c", | ||
"accentColor": "#8ab702", | ||
"cssTheme": "Minimal", | ||
"theme": "system", | ||
"theme": "obsidian", | ||
"enabledCssSnippets": [ | ||
"frontmatter-tweaks", | ||
"typography-fixes", | ||
"[editor] Normalize Links", | ||
"[editor] Typography fixes", | ||
"[plugin] MySnippets tweaks" | ||
"[plugin] MySnippets tweaks", | ||
"[editor] Table tweaks", | ||
"[ui] Compact Tab Header", | ||
"[ui] Default Style Settings", | ||
"[ui] Statusbar tweaks", | ||
"[editor] Frontmatter tweaks", | ||
"[editor] Typography fixes" | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"folder": "journals", | ||
"template": "templates/daily-journal" | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD | ||
if you want to view the source, please visit the github repository of this plugin | ||
*/ | ||
|
||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/main.ts | ||
var main_exports = {}; | ||
__export(main_exports, { | ||
default: () => Mononote | ||
}); | ||
module.exports = __toCommonJS(main_exports); | ||
var import_obsidian = require("obsidian"); | ||
|
||
// src/plugin-info.ts | ||
var PLUGIN_INFO = { | ||
"pluginVersion": "1.0.0", | ||
"pluginReleasedAt": "2023-08-22T12:06:35+0200" | ||
}; | ||
|
||
// src/main.ts | ||
var Mononote = class extends import_obsidian.Plugin { | ||
constructor() { | ||
super(...arguments); | ||
this.onFileOpen = async (file) => { | ||
var _a; | ||
const { workspace } = this.app; | ||
if (!file) { | ||
return; | ||
} | ||
let dupeLeaves = workspace.getLeavesOfType("markdown").filter((leaf) => leaf.view.getState().file === file.path); | ||
if (dupeLeaves.length < 2) { | ||
return; | ||
} | ||
const activeLeaf = (_a = workspace.getActiveViewOfType(import_obsidian.MarkdownView)) == null ? void 0 : _a.leaf; | ||
if (!activeLeaf) { | ||
return; | ||
} | ||
const leafWithHistory = activeLeaf; | ||
if (leafWithHistory.history.backHistory.length) { | ||
await leafWithHistory.history.back(); | ||
} else { | ||
activeLeaf.detach(); | ||
} | ||
const firstDuplicateLeaf = dupeLeaves.find((leaf) => leaf != activeLeaf); | ||
workspace.setActiveLeaf(firstDuplicateLeaf, { focus: true }); | ||
}; | ||
} | ||
async onload() { | ||
this.app.workspace.onLayoutReady(() => { | ||
this.registerEvent( | ||
this.app.workspace.on("file-open", this.onFileOpen) | ||
); | ||
console.log(`Plugin Mononote v${PLUGIN_INFO.pluginVersion} initialized`); | ||
}); | ||
} | ||
onunload() { | ||
console.log(`Plugin Mononote v${PLUGIN_INFO.pluginVersion} unloaded`); | ||
} | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "mononote", | ||
"name": "Mononote", | ||
"version": "1.0.0", | ||
"minAppVersion": "1.3.0", | ||
"description": "Ensures each note occupies only one tab. If a note is already open, its existing tab will be focussed instead of opening the same file in the current tab.", | ||
"author": "Carlo Zottmann", | ||
"authorUrl": "https://github.com/czottmann", | ||
"isDesktopOnly": false | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"aestheticStyle": false, | ||
"snippetViewPosition": "left", | ||
"openSnippetFile": true, | ||
"stylingTemplate": "/* What does this snippet do? Expand below. */\n", | ||
"snippetEnabledStatus": false | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.