Skip to content

Commit

Permalink
Add example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
grgar committed Mar 21, 2024
1 parent d352083 commit ab3743e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
# Changelog
### v1.0.0

- Add example to readme


- Fix XDG_CONFIG_HOME env var


- Optionally automatically update dotfiles to and from settings

Add a new config option to automatically apply files from settings, and to apply changes to the files back to settings.


- Log files written to output channel


- Add more links to marketplace listing

Also use light background for gallery banner


- Fix Makefile publish target

### v0.1.2

- Add icon
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@

Configure dotfiles from your VS Code settings so they're always available.

Run **dotfiles: Apply Config** from the command palette to write files to disk as defined in config (`dotfiles.files`).

If `dotfiles.autoUpdate` is enabled, automatically apply config from settings to files on workbench open, and write changes to settings when saving a file in the editor that matches a file defined in `dotfiles.files`.

## Example

```json
"dotfiles.files": {
"path/to/file.txt": "foo\nbar\n"
}
```

writes file `$XDG_CONFIG_HOME/path/to/file.txt` with the content of the key.

## Extension Settings

* `dotfiles.directory`: Base directory path for all config files to be written.
* `dotfiles.files`: Files to be written to the configured directory, where key is the relative path to the file and value is the content of the file.
||Description|Default|
|-|-|-|
|`dotfiles.directory`|Base directory path for all config files to be written.|`""`, meaning `$XDG_CONFIG_HOME` or `$HOME/.config` if unset.|
|`dotfiles.files`|Files to be written to the configured directory, where key is the relative path to the file and value is the content of the file.|`{}`|
|`dotfiles.autoUpdate`|Whether to automatically apply changes to files on workbench open, and persist changes back into settings from the editor.|`false`|
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"description": "Apply dotfiles from settings",
"icon": "images/icon-small.png",
"version": "0.1.2",
"version": "1.0.0",
"license": "MIT",
"preview": true,
"engines": {
Expand Down

0 comments on commit ab3743e

Please sign in to comment.