Home

Awesome

<!-- 中英文切换 --> <div align="right">

English | 中文 | 日本語

</div> <!-- 中英文切换 end --> <!-- 封面区域 --> <div align="center">

logo

<h1><b>vscode-background</b></h1>

Bring background images to your Visual Studio Code

fullscreeneditorsidebarpanelcarouselcustom images/styles...

GitHub | Visual Studio Marketplace

Version Installs Ratings Stars Build Status License

Multiple sections, editorsidebarpanel

<img width="760" src="./images/section.png">

fullscreen

<img width="760" src="./images/fullscreen.png"> </div> </div> <!-- 封面区域 end -->

Installation

There are 2 ways to install this extension:

  1. Install from Visual Studio Marketplace.
  2. Search shalldie.background from vscode.

Custom

User defined requirements can be met by changing the configuration(settings.json).

what's settings.json | where?

Config

<img width="760" src="./images/containers.png">

Global Config

NameTypeDefaultDescription
background.enabledBooleantrueWhether to enable background extension.

Editor Section Config

Edit background.editor to config editor section.

NameTypeDefaultDescription
useFrontbooleantruePlace the image above or below the code.
styleobject{}Custom style for images. MDN Reference
stylesobject[][{},{},{}]Each style of editor section image.
imagesstring[][]Your custom images, support https and file protocol.
intervalnumber0Seconds of interval for carousel, default 0 to disabled.
randombooleanfalseWhether to randomly display images.

example:

{
  "background.editor": {
    "useFront": true,
    "style": {
      "background-position": "100% 100%",
      "background-size": "auto",
      "opacity": 0.6
    },
    "styles": [{}, {}, {}],
    // Local images can be dragged into the browser to quickly get the file protocol address from the address bar
    "images": ["https://pathtoimage.png", "file:///path/to/local/file"],
    "interval": 0,
    "random": false
  }
}

Fullscreen、Sidebar、Panel Section Config

Edit background.fullscreenbackground.sidebarbackground.panel to config these sections.

NameTypeDefaultDescription
imagesstring[][]Your custom images, support https and file protocol.
opacitynumber0.1Opacity of the images, alias to opacity, 0.1 ~ 0.3 recommended.
sizestringcoverAlias to background-size, cover to self-adaption (recommended).
positionstringcenterAlias to background-position, default center.
intervalnumber0Seconds of interval for carousel, default 0 to disabled.
randombooleanfalseWhether to randomly display images.

example:

{
  "background.fullscreen": {
    // Local images can be dragged into the browser to quickly get the file protocol address from the address bar
    "images": ["https://pathtoimage.png", "file:///path/to/local/file"],
    "opacity": 0.1,
    "size": "cover",
    "position": "center",
    "interval": 0,
    "random": false
  },
  // `sidebar` and `panel` have the same config as `fullscreen`
  "background.sidebar": {},
  "background.panel": {}
}

Quick Command

Click the 「Background」 button on the right-bottom of statusbar, all commands of background will appear:

<img width="660" src="./images/commands.png">

Common Issues

This extension works by editting the vscode's js file.

Please refer to the Common Issues if you met some problems.

Uninstall

Please refer to Common Issues#how-to-uninstall.

Contributors 🙏

<img alt="shalldie" src="https://avatars3.githubusercontent.com/u/9987486?v=4" width="80"> <img alt="suiyun39" src="https://avatars.githubusercontent.com/u/20502666?v=4" width="80"> <img alt="frg2089" src="https://avatars.githubusercontent.com/u/42184238?v=4" width="80"> <img alt="AzureeDev" src="https://avatars.githubusercontent.com/u/23083011?v=4" width="80"> <img alt="tumit" src="https://avatars.githubusercontent.com/u/1756190?v=4" width="80"> <img alt="asurinsaka" src="https://avatars.githubusercontent.com/u/8145535?v=4" width="80"> <img alt="u3u" src="https://avatars.githubusercontent.com/u/20062482?v=4" width="80"> <img alt="kuresaru" src="https://avatars.githubusercontent.com/u/31172177?v=4" width="80"> <img alt="Unthrottled" src="https://avatars.githubusercontent.com/u/15972415?v=4" width="80"> <img alt="rogeraabbccdd" src="https://avatars.githubusercontent.com/u/15815422?v=4" width="80"> <img alt="rogeraabbccdd" src="https://avatars.githubusercontent.com/u/86603229?v=4" width="80">

Contributing Guide

Refer to Contributing Guide.

Change Log

You can checkout all our changes in our CHANGELOG.

Share Your Images

We share background images here.

Migration from v1

The configuration of v1 is outdated and currently maintains a certain level of compatibility. Please refer to migration-from-v1.md for migration.

LICENSE

MIT