Skip to content

hmvege/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

Dotfiles repository for hmvege, managed with Chezmoi.

Feel free to use on your own risk, or to draw inspiration.

🎯 Goals

The goal for this dotfiles project repository, is following,

  • Have a, as close to as possible, fully automatized dotfiles setup.
  • Have the setup install packages automatically.
  • Have a cross-platform dotfiles setup, working for
    • MacOS
    • Ubuntu 20.04
    • Ubuntu 22.04
    • WSL
  • Have it be easily maintained. I.e. changes applied at one machine, will be easily transferable to another machine.

📜 Installation

Install Chezmoi and initialize, ensure curl and sudo is installed,

apt-get update && apt-get install -y curl sudo

then download and apply the dotfiles,

sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin/" init -S ~/dotfiles --apply hmvege

which will download the Chezmoi binary to $HOME/bin, and use ~/dotfiles as source for Chezmoi by downloading this repository to this location.

Pulling latest changing from repository

Pull latest changes from repository.

chezmoi update -v -S ~/dotfiles

Apply changes

Apply the changes made to the dotfiles made through chezmoi edit [$FILE]

chezmoi apply -v -S ~/dotfiles

-v displays what changes is being made. If -n, a dry run will be performed.

Add changes to Chezmoi dotfiles

Apply the changes made to the dotfiles made through chezmoi edit [$FILE]

chezmoi add -S ~/dotfiles <dotfile-path>

-v displays what changes is being made. If -n, a dry run will be performed.

Removing dotfiles

In the case you wish to remove the dotfiles, run

chezmoi purge -S ~/dotfiles

Re-initializing

If the prompt for GitHub mail (or similar templated parameters) are not prompted, this can be initialized by running

chezmoi init -S ~/dotfiles

and then the dotfiles can be applied again.

📥 Packages to be installed

Vim plugins

Plugins used in Vim is,

Oh-my-zsh

ohmyzsh is used as framework for managing the zsh configuration.

Following plugins are used:

  • colored-man-pages
  • copybuffer
  • copypath
  • copyfile
  • git
  • history
  • jsontools
  • sublime
  • tmux
  • z
  • zsh-autosuggestions
  • zsh-syntax-highlighting

Sublime Text 4

Currently, Sublime Text 4 is my preferred editor, with Vim supporting me on the side every now and then. Package Control is used for managing plugins.

Plugins used:

  • AutoDocstring
  • AutoPEP8
  • ColorPicker
  • DockBlockr 2021 (DoxyDoxygen powered)
  • Dockerfile Syntax Highlighting
  • Figlet Big ASCII Text
  • GithubEmoji
  • Gruvebox Material Theme
  • Indent XML
  • LSP
  • LSP-pyright
  • MarkdownPreview
  • PackageResourceViewer
  • python-black
  • SublimeCodeIntel
  • SublimeLinter
  • SublimeLinter-contrib-mypy
  • SublimeLinter-flake8
  • TodoReview
  • TOML

Note these packages may need to be downloaded manually.

VSCode

Settings for VSCode have been added, and will continue being updated.

Gogh

Terminal color provided by Gogh, using the theme Afterglow.

⚗️ Testing

To test that the dotfiles work as intended, you can use the provided Dockerfile.

docker build . -t dotfiles-test-img
docker run -it --name dotfiles-test dotfiles-test-img

when running inside the Docker container, run following command and verify it runs without any issues:

sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin/" init -S ~/dotfiles --apply --verbose hmvege

❓ Troubleshooting

Shell not changing

If the shell is not changed, run chsh and set the path to the new shell, and then re-log into your user.

Gogh theme not activated

If terminal theme does not change, create a new profile which you names Default and restart the terminal and then rerun.

After installing the theme, make sure the profile is selected to be the installed one.

📂 File structure

dotfiles
├── README.md
├── bin
│  └── chezmoi
└── home
   ├── .chezmoiexternal.toml
   ├── .chezmoiignore
   ├── dot* (dotfiles)
   ├── .chezmoiscripts
   │  ├── run_once_after* (scripts that run after core installation)
   │  ├── run_once_core_linux.sh.tmpl
   │  └── run_once_core_osx.sh.tmpl
   └── dot_config
      └── dotfiles stored in ~/.config

📚 Resources

💡 Inspiration

⚖️ License

MIT License.