diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index fb90896d..bd5ea821 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -9,7 +9,7 @@ body: Before opening a bug report please check that your issue was not already discussed in the following: * [Issues](https://github.com/KatsuteDev/Background/issues?q=is%3Aissue+is%3Aopen+label%3Abug%2C%22critical+bug%22) - * [Known Issues](https://github.com/KatsuteDev/Background#%EF%B8%8F-known-issues) + * [Common Issues](https://github.com/KatsuteDev/Background/blob/main/HELP.md) Please also check that: @@ -31,6 +31,8 @@ body: label: VSCode Version description: | Include the [version](https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-version) and type. + + Do not write 'latest' validations: required: true @@ -56,7 +58,9 @@ body: attributes: label: Settings description: | - Include `background.*` settings from the [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file. Remove any sensitive information. + Include `background.*` settings from the [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file. + + Make sure to remove any sensitive information. - type: textarea attributes: diff --git a/HELP.md b/HELP.md new file mode 100644 index 00000000..0b3c4370 --- /dev/null +++ b/HELP.md @@ -0,0 +1,40 @@ +# Common Issues + +### Code installation is corrupt + +This warning may appear after running the uninstall command, reopen VSCode for this to disappear. + +If this warning still appears after an uninstall, reinstall [VSCode](https://code.visualstudio.com/download). + +### VSCode stopped working [#46](https://github.com/KatsuteDev/Background/issues/46) + +This extension modifies an internal file to make backgrounds work, if VSCode stops working replace `%LocalAppData%\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbench.desktop.main.js` with `workbench.desktop.main-backup.js`. + +This extension also modifies `%LocalAppData%\Programs\Microsoft VS Code\resources\app\product.json`, replace with `product-backup.json` if VSCode stops working. + +##   + +### Disable/uninstall doesn't remove background + +Backgrounds are not removed on extension disable or uninstall, you must run the **Background: Uninstall** command to remove backgrounds. + +### Options not working for editor/sidebar/panel + +Options will not change if `background.useWindowOptionsForAllBackgrounds` is set to `true`, either change the options for window or set `background.useWindowOptionsForAllBackgrounds` to `false`. + +##   + +### (Windows) Doesn't work on WSL [#27](https://github.com/KatsuteDev/Background/issues/27#issuecomment-1233610914) + +As described in [#27](https://github.com/KatsuteDev/Background/issues/27#issuecomment-1233610914), you can not change the background while running this extension in a remote WSL window. You can however still use custom backgrounds by installing and making changes in the main VSCode window, then opening a remote WSL window. + +### (Mac) read-only file system [#76](https://github.com/KatsuteDev/Background/issues/76) + +This extension doesn't natively support Mac, write permissions must be granted to the VSCode application: + +1. Move `Visual Studio Code.app` from `Download` to the `Application` directory. +2. Run `sudo chmod -R a+rwx '/Applications/Visual Studio Code.app'` to grant write permissions. + +### (Linux) snap: read-only file system [#140](https://github.com/KatsuteDev/Background/issues/140#issuecomment-1503820398) + +Applications installed using [snap](https://snapcraft.io/) are inherently read-only, install VSCode using [deb](https://code.visualstudio.com/download) or [rpm](https://code.visualstudio.com/download). \ No newline at end of file diff --git a/README.md b/README.md index 91f8fb28..91124638 100644 --- a/README.md +++ b/README.md @@ -127,26 +127,6 @@ The order settings are saved in is: |`${user:home}`|Current user's home directory| |`${...}`|System environment variable| -## ⚠️ Known Issues - -#### ⚠️ (Mac) read-only file system - -This extension doesn't natively support Mac, please refer to [#76](https://github.com/KatsuteDev/Background/issues/76) to get this extension working on Mac. - -#### ⚠️ (Linux) snap: read-only file system - -Applications installed using [snap](https://snapcraft.io/) are inherently read-only, install VSCode using [deb](https://code.visualstudio.com/download) or [rpm](https://code.visualstudio.com/download). - -#### ⚠️ Doesn't work on WSL - -As described in [#27](https://github.com/KatsuteDev/Background/issues/27#issuecomment-1233610914), you can not change the background while running this extension in a remote WSL window. You can however still use custom backgrounds by installing and making changes in the main VSCode window, then opening a remote WSL window. - -#### ⚠️ VSCode stopped working - -This extension modifies an internal file to make backgrounds work, if VSCode stops working replace `%LocalAppData%\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbench.desktop.main.js` with `workbench.desktop.main-backup.js`. - -This extension also modifies `%LocalAppData%\Programs\Microsoft VS Code\resources\app\product.json`, replace with `product-backup.json` if VSCode stops working. - ## 🔌 API Add this extension to your `package.json`. diff --git a/package-lock.json b/package-lock.json index af6f86ff..125c172b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "code-background", - "version": "2.8.1", + "version": "2.8.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "code-background", - "version": "2.8.1", + "version": "2.8.2", "license": "GPL-2.0-only", "devDependencies": { "@types/node": "20.8.0", diff --git a/package.json b/package.json index dd0dbbd6..446034a8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "theme": "dark" }, "publisher": "Katsute", - "version": "2.8.1", + "version": "2.8.2", "private": true, "engines": { "vscode": "^1.83.0" @@ -60,6 +60,11 @@ "command": "background.changelog", "title": "Changelog", "category": "Background" + }, + { + "command": "background.help", + "title": "Help", + "category": "Background" } ], "configuration": { diff --git a/src/command/changelog.ts b/src/command/changelog.ts index 427f2265..d9f1f03c 100644 --- a/src/command/changelog.ts +++ b/src/command/changelog.ts @@ -18,10 +18,10 @@ import * as vscode from "vscode"; -import { clog } from "../extension"; +import { mdchange } from "../extension"; // export const command: vscode.Disposable = vscode.commands.registerCommand("background.changelog", () => { - vscode.commands.executeCommand("markdown.showPreview", clog); + vscode.commands.executeCommand("markdown.showPreview", mdchange); }); \ No newline at end of file diff --git a/src/command/config.ts b/src/command/config.ts index b73257ab..ca271965 100644 --- a/src/command/config.ts +++ b/src/command/config.ts @@ -114,11 +114,14 @@ export const config: () => void = () => { handle: () => vscode.commands.executeCommand("background.reload") }), separator(), - // changelog quickPickItem({ label: "$(output) Changelog", handle: () => vscode.commands.executeCommand("background.changelog") }), + quickPickItem({ + label: "$(question) Help", + handle: () => vscode.commands.executeCommand("background.help") + }), quickPickItem({ label: `$(github) Report an issue on GitHub`, handle: () => vscode.env.openExternal(vscode.Uri.parse(`https://github.com/KatsuteDev/Background/issues/new?template=bug.yml&os=${encodeURI(`${os.platform()} ${os.release()}`)}&vs=${encodeURI(vscode.version)}&version=${encodeURI(pkg.version)}&settings=${encodeURI("```json\n" + JSON.stringify(cfg.config(), null, 4) + "\n```")}`)) diff --git a/src/command/help.ts b/src/command/help.ts new file mode 100644 index 00000000..cc65d80a --- /dev/null +++ b/src/command/help.ts @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2023 Katsute + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +import * as vscode from "vscode"; + +import { mdhelp } from "../extension"; + +// + +export const command: vscode.Disposable = vscode.commands.registerCommand("background.help", () => { + vscode.commands.executeCommand("markdown.showPreview", mdhelp); +}); \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 336733f2..50f3fcc5 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -34,6 +34,7 @@ import * as reload from "./command/reload"; import * as install from "./command/install"; import * as uninstall from "./command/uninstall"; import * as changelog from "./command/changelog"; +import * as help from "./command/help"; import * as file from "./command/config/file"; @@ -43,7 +44,8 @@ import { statusbar } from "./statusbar"; const identifier: string = "KatsuteDev/Background"; -export let clog: vscode.Uri; +export let mdchange: vscode.Uri; +export let mdhelp: vscode.Uri; const win: boolean = process.platform === "win32"; @@ -99,16 +101,19 @@ export const activate: (context: vscode.ExtensionContext) => any = (context: vsc // extension - clog = vscode.Uri.file(path.join(context.extensionPath, "CHANGELOG.md")); + mdchange = vscode.Uri.file(path.join(context.extensionPath, "CHANGELOG.md")); + mdhelp = vscode.Uri.file(path.join(context.extensionPath, "HELP.md")); - context.subscriptions.push(reload.command); - context.subscriptions.push(install.command); - context.subscriptions.push(uninstall.command); - context.subscriptions.push(changelog.command); + context.subscriptions.push( + reload.command, + install.command, + uninstall.command, + changelog.command, + help.command, + config.command, + statusbar + ); - context.subscriptions.push(config.command); - - context.subscriptions.push(statusbar); statusbar.show(); return {