Skip to content

MrScallion/background-image-setting

 
 

Repository files navigation

Wallpaper Setting

Set an image as the VSCode background.

Warning and Plans

Since version 0.11.0, image files are now treated as file links instead of base64.

If the file does not exist when VSCode startup, the wallpaper will not be displayed.

Plans

  • Normal mode will be discontinued
  • Various parameters will be refactored

Usage

Step1.

Press ⇧⌘P to bring up the command pallete and enter 'Wallpaper Setting'.

Usage Step1. image

Step2.

Select the desired setting from the menu.

Usage Step2. image

Feature

Easy Setup

Just follow the guide to easily set the wallpaper.

Easy Setup image

Wallpaper - Image

You can set an image as the VSCode background.

Wallpaper - Image image

Setting items

Name Required Description Remark
Opacity Transparency, Can be set to a value between 0.5 and 1. In Normal mode, transparency is set all elements, including text and images, as well as the background.

Wallpaper - Slide

You can set a slide image as the VSCode background.

Wallpaper - Slide image

Setting items

Name Required Description Remark
Opacity *1 *1 *1
Slide Interval Time Image switching time. (Hour, Minute, Second, MilliSecond)
Randome Play - Randomize image switching. Default False.
Effect Fade in - Display Fade in effect when switching images. Default True.
Load wait complete - Wait for the screen to display until all images are loaded. Default False.

*1 Same as the Wallpaper - Image.

Favorite

Do you have many favorite images or slides?

You can easily switch between them using the Favorite Setting.

Don't repeat yourself! with this features.

Favorite image

Setting items

Name Required Description Remark
Start Up - Set a random background from the favorite settings when VSCode starts up.

Sync

Are you developing on multiple machines?

You no longer need to hand out image! with this features.

Upload

First, upload the wallpaper settings you wish to Sync.

Sync upload image

Download

Next, download and setup the wallpaper settings on another machines.

Sync download image

Delete

Want to delete your uploaded wallpaper settings?

Of course you can turn it delete. Just go to the menu and click on Delete or Uninstall and your uploaded wallpaper settings will be gone!

Sync delete image

Warning

Please check the details in the Cautions section.

* This feature is disabled by default

* Only Wallpaper - Image setting can be Sync

* Image file size is less than 500KB, it can be used for Sync

* VSCode standard feature Settings Sync must be enable

Uninstall

Didn't like this extension?

Sorry for not being able to help you.

Let's uninstall it and erase all settings related to this extension.

It won't pollute your environment.

Uninstall image

Advanced Mode

You want to set only the background, but you are not happy that even the text is transparent?

I understand! Let's resolve your complaint.

However, it will take some labor to resolve your complaint.

Also maybe it will not work.

Only those who understand this should use this feature.

Usage Advanced mode image1

Step1.

Advanced Mode requires the json file of the color theme you are using.

If it is a color theme installed from extension, it is quicker to change the file extension of the vsix file download from marketplace to zip, unzip it, and get it from the theme folder.

We are not sure about the default theme is, so please investigate on your own.

Step2.

From the VSCode settings screen, check the Advanced Mode checkbox in the Wallpaper Setting to enable the feature.

Usage Advanced mode image2

Step3.

Calling Wallpaper Setting and select Optimize

Invoke Wallpaper Setting from the command palette and select the Optimize.

Usage Advanced mode image3

Enter the Color Theme name

First, the name of color theme you are using will be displayed, so please make sure it is the same. If it is different, please enter the corrent name.

Usage Advanced mode image4

Enter the transparency

Next, enter the three types of transparency.

Usage Advanced mode image5

Name Description Remark
Base Transparency used in basic areas.
Overlap Transparency used in overlapping areas.
Selection Transparency used in areas that shoud not be transparent.

Enter the Color Theme json file path

Finally, enter the json file path of the Color Theme you prepared.

Usage Advanced mode image6

About Optimize

  • This process is required once per Profile
  • Optimized Color Theme information will be added to profile's settings.json

Step4.

After that, please proceed as usual setting from the menu.

In Advanced Mode, transparency settings can only be set when Optimize.

Environment Variables Support

Environment variables can be used to specify paths.

Notation Description Remark
${userHome} Returns the string path of the current user's home directory. Implementation-wise, we use node.js os.homedir.
${<Environment Variables Name>} If the environment variable specified in ${~} exists, it is replaced by its value.

Cautions

Installation appears to be corrupt [Unsupported] message appears.

Prior to VSCode 1.72, the relevant message was not displayed. In fact, it is more correct to display.

The official explanation of this message is roughly as follows.

We are not trying to block VS Code patching, but we want to raise awareness that patching VS Code means you are running an unsupported version.

Respecting this assertion, this extension makes no attempt to prevent such messages from being displayed.

Even if we were to prevent it from being displayed, I believe the officials will block it.

How will this extension affect your environment?

This extension will make changes to the following three files.

  1. "VSCode installation directory" /Resources/app/out/vs/workbench/workbench.desktop.main.js
  2. "VSCode installation directory" /Resources/app/out/vs/code/electron-sandbox/processExplorer/processExplorer.js (Only when setting the background color for Process Explorer)
  3. settings.json
  4. extensions.json (Only when using the Sync feature)

"workbench.desktop.main.js" requires write permission. Therefor, this extension cannot be used with VSCode installed from "Snap Store" App Store for Linux (Because write permission cannot be obtained).

About Sync Feature

You probably have the following questions about Sync feature.

  • Why is it disabled by default?
  • Why can't Sync Wallpaper - Slide settings?
  • Why is there a limit of 500KB file size or less?
  • Will the upload images seen by the Setting Sync Administrator?

To answer thees questions, we must first briefly describe the Sync feature.

The Sync feature is achieved by converting image data to strings in Base64 and sharing them via Settings Sync.

Settings Sync backend is probably provided by Microsoft. And definitely not intended for image data sharing.

If you try to share an image file over MB (maybe even KB) with Settings Sync, Microsoft will be offended. They will reject the this extension and possibly disable the account of the user using the this extension from Settings Sync.

this is the reason why it is disabled by default and why limit is set.

About image data to be uploaded

The Base64 string uploaded to Settings Sync is encrypted in AES256 CTR mode.

Therefore, there is no fear of prying eye.

Unless you use poor values for password and salt, or I have made a mistake in the implementation of the cryptographic call.

If use the Sync feature with an understanding of the risks

Usage Sync enable image

From the VSCode settings screen, check the "Enable Sync" checkbox in the Wallpaper Setting to enable the feature.

About

Set an image as the VSCode background.(forked from https://github.com/Angelmaneuver/wallpaper-setting)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.6%
  • JavaScript 0.4%