Code Monkey home page Code Monkey logo

dotfiles's Introduction

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.

dotfiles's People

Contributors

hmvege avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dotfiles's Issues

[MAINTENANCE] Update Python versions and other

It's time to do some maintenance.

  • Update Python versions
  • Check if any other packages are outdated or needs to be updated
  • Test scripts and make sure they run
  • Look into adding a docker container for testing and verifying the setup

Update for WSL

Have dotfiles be able to be set up on WSL.

To check is we are running on WSL, type:

if [[ $(grep Microsoft /proc/version) ]]; then
    echo "Bash is running on WSL"
fi

or use the Chezmoi way (preferred).

Disable:

  • Editors such as Sublime Text, Sublime Merge, and VSCode, as these all require GUIs.
  • Gogh. Consider ColorTool, although that seems to require setup outside of WSL terminal window, i.e. it should only be a prompt to user to do this.

To verify it performs as intended,

  1. Reset WSL
  2. Upgrade to Ubuntu 22.04. See this guide for how.
  3. Install dotfiles from scratch, and verify it all installs as required.

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.