From ec97a5daeacf30291ed5fd27aa3c18e966d67e8e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 10 May 2019 19:32:51 +0200 Subject: [PATCH] :sparkles: Adds vscode settings reset command --- README.md | 12 ++++++++++++ vscode/rootfs/root/.zshrc | 1 + 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index a259402..a356aed 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,18 @@ authentication on the VSCode by setting it to `true`. **Note**: _We STRONGLY suggest, not to use this, even if this add-on is only exposed to your internal network. USE AT YOUR OWN RISK!_ +## Resetting your VSCode settings to the add-on defaults + +The add-on updates your settings to be optimized for use with Home Assistant. +As soon as you change a setting, the add-on will stop doing that since it +might be destructive. However, in case you changed some things, but want to +return to the defaults as delivered by this add-on, do the following: + +1. Open the Visual Studio Code editor. +1. Click on `Terminal` in the top menu bar and clik on `New Terminal`. +1. Execute the following command in the terminal window: `reset-settings`. +1. Done! + ## Known issues and limitations - This add-on currently only supports AMD64 machines, although we hope diff --git a/vscode/rootfs/root/.zshrc b/vscode/rootfs/root/.zshrc index e4721be..3366aec 100755 --- a/vscode/rootfs/root/.zshrc +++ b/vscode/rootfs/root/.zshrc @@ -92,6 +92,7 @@ source $ZSH/oh-my-zsh.sh # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" +alias reset-settings="cp /root/.code-server/settings.json /data/vscode/User/settings.json && echo 'Setting restored!'" # Home Assistant CLI eval "$(_HASS_CLI_COMPLETE=source_zsh hass-cli)"