Giter Club home page Giter Club logo

vscode-background's Introduction

logo

vscode-background

Bring background images to your Visual Studio Code

code areafullscreencarouselcustom images/styles...

GitHub | Visual Studio Marketplace

Version Installs Ratings Stars Build Status License


Code Area

Fullscreen

Installation

To install the extension just execute the following command in the Command Palette of Visual Studio Code

ext install background

Custom

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

what's settings.json | where is

Config

Base Config

Name Type Default Description
background.enabled Boolean true Enable or disable this plugin

Default Config

Name Type Default Description
background.useFront Boolean true Set the image to front or back of your code
background.style Object {} Customize style
background.styles Array<Object> [{},{},{}] Add custom Style for individual image
background.customImages Array<String> [] Add your custom images
background.interval Number 0 Seconds of interval for carousel, default 0 to disabled.

style means css style, which allows you to create great-looking background.

Fullscreen Config

may overwrite the default config

Name Type Default Description
background.fullscreen Object null Set the images to fullscreen

example:

{
  "background.fullscreen": {
    "images": ["https://pathtoimage.png"], // urls of your images
    "opacity": 0.91, // 0.85 ~ 0.95 recommended
    "size": "cover", // also css, `cover` to self-adaption (recommended),or `contain`、`200px 200px`
    "position": "center", // alias to `background-position`, default `center`
    "interval": 0 // seconds of interval for carousel, default `0` to disabled.
  }
}

Examples

  1. disable this extension
{
  "background.enabled": false
}
  1. custom images

You should use protocol https instead of http for the image, http is not support by vscode any more.

{
  "background.customImages": ["https://a.com/b.png", "file:///Users/somepath/a.jpg"]
}
  1. custom style - opacity
{
  "background.style": {
    "opacity": 0.6
  }
}
  1. custom style - image size
{
  "background.style": {
    "background-size": "300px 460px"
  }
}
  1. full screen
{
  "background.fullscreen": {
    "images": ["https://pathtoimage.png"], // urls of your images
    "opacity": 0.91, // 0.85 ~ 0.95 recommended
    "size": "cover", // also css, `cover` to self-adaption (recommended),or `contain`、`200px 200px`
    "position": "center", // alias to `background-position`, default `center`
    "interval": 0 // seconds of interval for carousel, default `0` to disabled.
  }
}

Warns

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

So, a warning appears while the first time to install or vscode update. U can click the [never show again] to avoid it.

This is the reason:

Uninstall

three ways

1. (recommended)

press `F1` to open Command Palette, enter and chose `Background - Uninstall (remove extension)` , automatically complete uninstall.

2.

Set the config  {"background.enabled": false}  in settings.json, then uninstall the plugin.

3. An unfriendly way:

If you uninstall this plugin directly, don't worry.
Exit vscode completely, then open, then reload. Now it's clean :D
(I know it's strange... Because of the limit of vscode)

Contributors 🙏

shalldie suiyun39 frg2089 AzureeDev tumit asurinsaka u3u kuresaru Unthrottled rogeraabbccdd rogeraabbccdd

CHANGELOG

You can checkout all our changes in our change log.

Q&A


Q: How to remove [unsupported] tag?
A: see here: https://github.com/lehni/vscode-fix-checksums

Q: It seems that nothing happens after installing the extension in MAC?
A: In Mac, move `vscode` from `Download` to `Applications`.

Q: The extension runs based on the modified vscode CSS file, and will try to raise the right within a limited time.
   If it stop working for some reason, what if users need to change their permissions?

A: In windows,click right button on the vscode's icon,then check the [run with the administrator authority].
A: in mac/linux, try this: https://github.com/shalldie/vscode-background/issues/6 .

LICENSE

MIT

vscode-background's People

Contributors

0x-jerry avatar asurinsaka avatar azureedev avatar frg2089 avatar keyork avatar pedroo123 avatar rogeraabbccdd avatar satomasahiro2005 avatar shalldie avatar suiyun39 avatar tumit avatar u3u avatar unthrottled avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-background's Issues

参数配置化呗~

比如说:

  1. 图片url配置~
  2. background position, background size, opacity 神马的~
  3. 图片本地cache~

无法禁用

禁用后依旧是会显示背景图的,除非重装或者找到原始文件workbench.main.css改回去.

关于支持mac的部分

我fork下来看了一下
图片路径的话mac也是OK的
系统安装路径,nodejs在win下

var _dirPath = path.join(inputPath, 'resources\\app\\out\\vs\\workbench\\electron-browser');

mac下应该改成

var _dirPath = path.join(inputPath, 'Contents/resources/app/out/vs/workbench/electron-browser');
//inputPath:mac用户的安装路径是/Users/YourID/.../Visual Studio Code.app

可以用node的os.platform()来判断,mac是darwin,win是win32
PS:mac下就不要报搜索错误了,反正搜不到
PS2:魔爱党表示第三张默认图应该换成小爱

Code - Insiders not work

About Code - Insiders

image

About Config

{
    "background.useDefault": false,
    "background.enabled": true,
    "background.style": {
        "background-position": "50% 50%",
        "background-repeat": "no-repeat"
    },
    "background.customImages": [
        "http://ohupawle2.bkt.clouddn.com/vscode-update.png",
        "http://ohupawle2.bkt.clouddn.com/vscode-update.png",
        "http://ohupawle2.bkt.clouddn.com/vscode-update.png"
    ],
    "editor.renderWhitespace": "all",
    "indentRainbow.colors": [
        "rgba(64,64,16,.5)",
        "rgba(32,64,32,.5)",
        "rgba(64,32,64,.5)",
        "rgba(16,48,48,.5)",
        "rgba(128,32,32,.5)"
    ],
    "diffEditor.ignoreTrimWhitespace": false,
    "editor.minimap.enabled": false,
    "workbench.welcome.enabled": false,
    "editor.minimap.renderCharacters": true,
    "editor.dragAndDrop": true,
    "css.colorDecorators.enable": true,
    "scss.colorDecorators.enable": true,
    "less.colorDecorators.enable": true,
    "workbench.sideBar.location": "left",
    "window.zoomLevel": 0,
    "material-icon-theme.showUpdateMessage": false,
    "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
    "window.nativeTabs": true,
    "workbench.colorTheme": "Material Ocean Next Theme +",
    "workbench.iconTheme": "material-icon-theme"
}

Looking forward to your reply

建议加双引号和encodeURI

[id='workbench.parts.editor']>.content>.one-editor-silo:nth-child(1) .overflow-guard>.monaco-scrollable-element{background-image: url(${img0});}

没双引号的话,文件路径带括号或者空格等,会懵逼
encodeURI的话,非ASCII字符会懵逼

image

设置后没有反应,默认图片也不显示

{
    "workbench.iconTheme": "vscode-icons",
    "background.enabled": true,
    "background.useDefault": true,
    "background.customImages": [
        // "http://img.hb.aicdn.com/dc114db9e695ac9863b6b9882c77eb402a09e5af299ac0-R96Uv1_fw658"
    ],
    "background.style": {
        "background-position": "100% 100%",
        "background-repeat": "no-repeat"
    }
}

我感觉默认的图片就很好啊,有其他主题就更好了!但是我的为什么不显示= =

希望dalao能添加一个随机背景的功能

试用了一下感觉很棒,不过如果能随机就更好了,例如

costomImages:[
    [pic1, pic2, pic3, ...], // 窗口1的背景从这里随机
    'window2-pic', // 指定窗口2使用此背景
    [pic1, pic2, pic3, ...], // 窗口3的背景从这里随机
]

感谢dalao的插件,很喜欢~

背景图后置后有点问题

不太好描述,我截图了,就是这个设置

"background.useFront": true,

这是设置为false之后的情况:

Markdown
代码自动完成提示框也是这个现象,框框的背景颜色没了。

这是保持默认true的情况(正常)

Markdown

求图= =

你好,有好图也分享下哈哈哈~
比如说readme里的那几张图~

win7通过管理员权限也无法加载出图片

我通过管理员权限运行后,无法加载出图片。然后再setting.json中增加了相关设置也是不行。

{
    "background.enabled": true,
    "background.useDefault": true,
    "background.style": {
        "content": "''",
        "pointer-events": "none",
        "position": "absolute",
        "z-index": "99999",
        "width": "100%",
        "height": "100%",
        "background-position": "100% 100%",
        "background-repeat": "no-repeat",
        "opacity": 0.6
    }
}

UAC权限问题

如果不是UAC管理员权限运行的话,在没有写入权限的时候抛出异常没有提示

Wont start

I`ve created my own picks on my PC and set it up in settings.json but still It wont show them. Any ideas ?

Image repeat

I want to add a paper texture to the background but right now it just stays on the bottom left corner. Would be nice to have a repeat / tile option like in CSS "background-repeat: repeat" option.

大尺寸背景图片出现问题

先添加的 background.style 的特性比较适合,小尺寸的图片(如默认的图片),而如果换成 填充适应整个工作窗口的大图片来说,会出现一个问题 就是 opacity:1 ,图片覆盖了 整个代码的内容,若设置透明 <1,又感觉比较模糊, 查看代码应该是图片样式 从 .monaco-scrollable-element{} 改成了 .monaco-scrollable-element:nth-child(2)::after{} 造成的, 希望作者可以考虑一下这种情况 ,亦或通过添加新属性来控制,图片 是否在代码等的上方。

PS: 已经通过修改本地插件的代码来达到之前的效果,但也不是长久之计,之前找了几个黑色主题的背景很不错的,但是不适合当前版本 ,图片分享: http://pan.baidu.com/share/link?shareid=2965468559&uk=3945358808

自定义图片显示不出来

"background.useDefault": false,
"background.customImages": [
"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489728605120&di=39e2c2a49613a1a11353e0d577165573&imgtype=0&src=http%3A%2F%2Fcartoon.zwbk.org%2FImageUploadTK%2F63468890451334875012523622145.jpg",
"file:///G:/1.png"
]

设置里是这么写的,网上的图片和本地都显示不出来,要怎么改呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.