vscode-background

shalldieMIT活跃维护

给 VS Code 编辑器添加背景图片的扩展插件,支持自定义图片和透明度,让写代码的界面不再单调。

Bring background images to your vscode. vscode background 背景扩展插件。

v3.1.0发布于 2026-09-11 02:49 UTC1,918star167fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
在 VS Code 扩展市场搜索 shalldie.background 安装,或从 Marketplace 页面安装
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 VS Code 加背景图的扩展,支持编辑器、侧边栏、全屏等多区域自定义图片

给 VS Code 编辑器添加背景图片的扩展插件,支持自定义图片和透明度,让写代码的界面不再单调。

核心能力

  • 为 editor、sidebar、auxiliarybar、panel、fullscreen 分别配置背景图
  • 支持在线 https 图片、本地文件、文件夹、data URL 等多种来源
  • 可设置轮播间隔与随机显示,实现背景图自动切换
  • 通过 style、styles、opacity、size、position 精细控制显示效果
  • 状态栏 Background 按钮集中提供所有相关命令

容易踩的坑

该扩展通过修改 VS Code 的 html 文件实现效果,遇到问题需参考 Common Issues 文档;在线图片仅允许 https 协议;从 v1 升级到 v3 后不再支持旧的顶层配置,需按迁移文档调整

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.1.0
  1. v3.1.0最新正式版2026-09-11 · 2026-09-11 02:49 UTC

    What's Changed

    New Contributors

    Full Changelog: https://github.com/shalldie/vscode-background/compare/v3.0.1...v3.1.0

  2. v3.0.12026-08-05 · 2026-08-05 07:37 UTC
    查看更新说明
    • fix: patch 写入失败(如 code-server 等只读环境)时不再触发 reload,保留错误提示 by @shalldie

    Full Changelog: https://github.com/shalldie/vscode-background/compare/v3.0.0...v3.0.1

  3. v3.0.02026-07-31 · 2026-07-31 09:47 UTC
    查看更新说明
    • BREAKING refactor: 移除 v1 旧配置支持 by @shalldie
    • feat: 为 fullscreen/sidebar/panel/auxiliarybar 添加逐图 styles 配置 in #592
    • feat: 支持在图片路径中使用 ~ 和环境变量 in #612
    • chore: 工程结构优化、依赖升级、静态资源与冗余代码清理

    Full Changelog: https://github.com/shalldie/vscode-background/compare/v2.1.2...v3.0.0

  4. v2.1.22026-07-07 · 2026-07-07 11:01 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/shalldie/vscode-background/compare/v2.1.1...v2.1.2

  5. v2.1.12026-06-08 · 2026-06-08 07:34 UTC
    查看更新说明

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    English | 中文 | 日本語

    logo

    Bring background images to your Visual Studio Code

    fullscreen, editor, sidebar, auxiliarybar, panel, carousel, custom images/styles...

    GitHub | Visual Studio Marketplace

    Version Stars Build Status License

    Multiple sections, editor, sidebar, auxiliarybar, panel

    fullscreen

    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

    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[][]Custom style for each image individually.
    imagesstring[][]Custom images, supports online and local images, as well as folders.
    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": [],
        // `images` supports online and local images, as well as folders.
        "images": [
          // online images, only `https` is allowed.
          "https://hostname/online.jpg",
          // local images
          "file:///local/path/img.jpeg",
          "/home/xie/downloads/img.gif",
          "C:/Users/xie/img.bmp",
          "D:\\downloads\\images\\img.webp",
          // `~` and environment variables are supported in local paths
          "~/Pictures/img.png",
          "${HOME}/Pictures/img.png",
          // local folders
          "/home/xie/images",
          // data URL
          "data:image/*;base64,<base64-data>"
        ],
        "interval": 0,
        "random": false
      }
    }
    

    Fullscreen, Sidebar, Auxiliarybar, Panel Section Config

    Edit background.fullscreen, background.sidebar, background.auxiliarybar, background.panel to config these sections.

    NameTypeDefaultDescription
    imagesstring[][]Custom images, supports online and local images, as well as folders.
    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.
    stylesobject[][]Custom style for each image individually.
    intervalnumber0Seconds of interval for carousel, default 0 to disabled.
    randombooleanfalseWhether to randomly display images.

    example:

    {
      "background.fullscreen": {
        // `images` supports online and local images, as well as folders.
        "images": [
          // online images, only `https` is allowed.
          "https://hostname/online.jpg",
          // local images
          "file:///local/path/img.jpeg",
          "/home/xie/downloads/img.gif",
          "C:/Users/xie/img.bmp",
          "D:\\downloads\\images\\img.webp",
          // `~` and environment variables are supported in local paths
          "~/Pictures/img.png",
          "${HOME}/Pictures/img.png",
          // local folders
          "/home/xie/images",
          // data URL
          "data:image/*;base64,<base64-data>"
        ],
        "opacity": 0.1,
        "size": "cover",
        "position": "center",
        "styles": [],
        "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:

    Common Issues

    This extension works by editing the vscode's html file.

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

    Uninstall

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

    Contributors 🙏

    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

    Starting from v3.0, v1 top-level configuration is no longer supported. Please refer to migration-from-v1.md to migrate.

    LICENSE

    MIT