Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand All @@ -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:
Expand Down
40 changes: 40 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -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).
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"theme": "dark"
},
"publisher": "Katsute",
"version": "2.8.1",
"version": "2.8.2",
"private": true,
"engines": {
"vscode": "^1.83.0"
Expand Down Expand Up @@ -60,6 +60,11 @@
"command": "background.changelog",
"title": "Changelog",
"category": "Background"
},
{
"command": "background.help",
"title": "Help",
"category": "Background"
}
],
"configuration": {
Expand Down
4 changes: 2 additions & 2 deletions src/command/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
5 changes: 4 additions & 1 deletion src/command/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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```")}`))
Expand Down
27 changes: 27 additions & 0 deletions src/command/help.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2023 Katsute <https://github.com/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);
});
23 changes: 14 additions & 9 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";

Expand Down Expand Up @@ -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 {
Expand Down