mirror of
https://github.com/dragonwocky/obsidian-tray.git
synced 2025-04-11 14:59:02 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
f4e827253d | |||
|
62fcf88fe6 | ||
|
09fe3c2d03 | ||
cc0baa3226 |
13
main.js
13
main.js
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* obsidian-tray v0.3.4
|
* obsidian-tray v0.3.5
|
||||||
* (c) 2023 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
* (c) 2023 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
* (https://github.com/dragonwocky/obsidian-tray/) under the MIT license
|
* (https://github.com/dragonwocky/obsidian-tray/) under the MIT license
|
||||||
*/
|
*/
|
||||||
@ -76,7 +76,10 @@ const vaultWindows = new Set(),
|
|||||||
showWindows = () => {
|
showWindows = () => {
|
||||||
log(LOG_SHOWING_WINDOWS);
|
log(LOG_SHOWING_WINDOWS);
|
||||||
getWindows().forEach((win) => {
|
getWindows().forEach((win) => {
|
||||||
maximizedWindows.has(win) ? win.maximize() : win.show();
|
if (maximizedWindows.has(win)) {
|
||||||
|
win.maximize();
|
||||||
|
win.focus();
|
||||||
|
} else win.show();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
hideWindows = () => {
|
hideWindows = () => {
|
||||||
@ -475,6 +478,12 @@ class TrayPlugin extends obsidian.Plugin {
|
|||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCurrentWindow = getCurrentWindow
|
||||||
|
getWindows = getWindows;
|
||||||
|
showWindows = showWindows;
|
||||||
|
hideWindows = hideWindows;
|
||||||
|
toggleWindows = toggleWindows;
|
||||||
|
|
||||||
async loadSettings() {
|
async loadSettings() {
|
||||||
const DEFAULT_SETTINGS = OPTIONS.map((opt) => ({ [opt.key]: opt.default }));
|
const DEFAULT_SETTINGS = OPTIONS.map((opt) => ({ [opt.key]: opt.default }));
|
||||||
this.settings = Object.assign(...DEFAULT_SETTINGS, await this.loadData());
|
this.settings = Object.assign(...DEFAULT_SETTINGS, await this.loadData());
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"author": "dragonwocky",
|
"author": "dragonwocky",
|
||||||
"authorUrl": "https://dragonwocky.me/",
|
"authorUrl": "https://dragonwocky.me/",
|
||||||
"description": "Run Obsidian from the system tray for customisable window management & global quick notes",
|
"description": "Run Obsidian from the system tray for customisable window management & global quick notes",
|
||||||
"version": "0.3.4",
|
"version": "0.3.5",
|
||||||
"isDesktopOnly": true,
|
"isDesktopOnly": true,
|
||||||
"minAppVersion": "1.0.0"
|
"minAppVersion": "1.0.0"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user