Skip to main content

Configure Windows using dotbot.


Table of contents

What you can do with it

The dotbot-windows plugin is able to configure Windows in the following ways:

  • Configure the desktop background color

  • Import registry files (*.reg) from a specified directory

Sample configuration:

windows:
  personalization:
    background-color: "#0099ff"

  registry:
    import: "my-registry-tweaks/"

Installation

There are two ways to install and use the plugin:

  1. Install it as a Python package.

  2. Add it as a git submodule in your dotfiles repository.

  3. Copy dotbot_windows.py into your dotfiles directory.

Python package

If you want to install dotbot-windows as a Python package (for example, if you’re using a virtual environment), then you can install the plugin using pip:

pip install dotbot-windows

Then, when running dotbot, use the -p or --plugin option to tell dotbot to load the plugin:

dotbot [...] --plugin dotbot_windows [...]

If you’re using one of dotbot’s install scripts, you’ll need to edit that file to add the --plugin option.

Git submodule

If you want to track dotbot-windows as a git submodule (for example, if you manage your dotfiles using git) then you can add the plugin repository as a submodule using git:

git submodule add https://github.com/kurtmckee/dotbot-windows.git

This will clone the repository to a directory named dotbot-windows. Then, when running dotbot, use the -p or --plugin option to tell dotbot to load the plugin:

dotbot [...] --plugin dotbot-windows/dotbot_windows.py [...]

Note that you may need to initialize the plugin’s git submodule when you clone your dotfiles repository or pull new changes to another computer. The command for this will look something like:

git submodule update --init dotbot-windows

Copy dotbot_windows.py

If desired, you can copy dotbot_windows.py to your dotfiles directory. You might choose to do this if you already use other plugins and have configured dotbot to load all plugins from a plugin directory.

If you copy dotbot_windows.py to the root of your dotfiles directory then, when running dotbot, use the -p or --plugin option to tell dotbot to load the plugin:

dotbot [...] --plugin dotbot_windows.py [...]

If you copy dotbot_windows.py to a directory containing other plugins, you can use dotbot’s --plugin-dir option to load all plugins in the directory. In the example below, the plugin directory is named dotbot-plugins:

dotbot [...] --plugin-dir dotbot-plugins [...]

Configuration

Personalization

You can configure the desktop background color using a hexadecimal color (like "#0099ff") or a triplet of decimal RGB values (like "0 153 255").

Here are examples demonstrating the two formats:

windows:
    personalization:
        background-color: "#0099ff"
windows:
    personalization:
        background-color: "0 153 255"

Registry

You can import registry files by specifying a directory containing *.reg files. The directory will be recursively searched for *.reg files, and each of them will be imported.

Note that registry imports may fail if the changes require administrator privileges.

Here’s a dotbot configuration file example:

windows:
    registry:
        import: "registry-export-files"

Development

To set up a development environment, clone the dotbot-windows plugin’s git repository. Then, follow these steps to create a virtual environment and run the unit tests locally:

# Create the virtual environment
$ python -m venv .venv

# Activate the virtual environment (Windows-only)
$ & .venv/Scripts/Activate.ps1

# Update pip and setuptools, and install wheel
(.venv) $ pip install -U pip setuptools wheel

# Install poetry and tox
(.venv) $ pip install poetry tox

# Install all dependencies
(.venv) $ poetry install

# Run the unit tests locally
(.venv) $ tox

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotbot_windows-1.0.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotbot_windows-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file dotbot_windows-1.0.0.tar.gz.

File metadata

  • Download URL: dotbot_windows-1.0.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dotbot_windows-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2f01a01595f2fa2739a20eea27fee94fa8fa2be1e40d8ded865c4819e4565f92
MD5 71240d306a85f692e705a7b9cd99c221
BLAKE2b-256 c3a88acdbc338eb7ae647e031e28697fe26bbfd2692a2e09ce7bb0f872a5a53f

See more details on using hashes here.

File details

Details for the file dotbot_windows-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dotbot_windows-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dotbot_windows-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ab6126a6f3cc5000433be0b9de3594a9203276cb92267685d76298437454829
MD5 8fccb83593da4a05045da6c2929a64a0
BLAKE2b-256 5638374edeab50c924b64535859e8128b0e4cddd332314a99286f39c9ca29f1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page