/dotfiles

My dotfiles.

Primary LanguagePython

dotfiles

How to setup

Clone this repository into your $HOME directory.

$ cd $HOME
$ git clone git@github.com:m-b-t-n/dotfiles.git -b master

Run setup.sh on your $HOME directory.

$ bash dotfiles/setup.sh

After that, set your global user/email settings of Git into dotfiles/env/git/user. The sample is following;

$ cat ~/dotfiles/env/git/user
[user]
        email = mbtn_0xff@outlook.com
        name = m-b-t-n

How to test setup.sh

Run test_setup.sh on your $HOME directory.

$ bash dotfiles/test_setup.sh

You can check the result by seeing dotfiles/test_setup.sh.log.

Requirements

Common

OS-specific

For Windows
  • Install Git for Windows

  • If you have been used WSL/WSL2, see below Linux section

For macOS
  • Install Homebrew

    ### Below is the **DEAD COPY** of official installation
    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install newly bash (v5+)

    ### Install newly bash
    $ brew install bash
    
    ### Check the version of bash
    ### The sample is following at 2023/06/09
    $ bash --version
    GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin21.6.0)
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    
    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
  • Change default shell from zsh to bash

    ### Change default shell
    $ BASH_PATH="$(brew --prefix)/bin/bash"
    $ sudo echo "${BASH_PATH}" >> /etc/shells
    $ sudo chsh -s "${BASH_PATH}" $(whoami)
    $ sudo reboot
For Linux
  • I think there is no need to do because most distro have been selected bash for default shell

  • If not, you need to change default shell to bash, refer to macOS section

Structures

ℹ️ Some elements have been omitted.

$ tree -L 3 dotfiles/
├── README.md
├── bash
│   ├── bash_profile           # -> ~/.bash_profile
│   ├── bashrc                 # -> ~/.bashrc
│   ├── linux/
│   ├── macos/
│   └── windows/
├── broot/                      # -> ~/.config/broot/
├── editorconfig
│   └── editorconfig           # -> ~/.editorconfig
├── env
│   ├── environment_vars       # Need to create by your own
│   └── git
│       └── user               # Need to create by your own
├── gh
│   └── config.yml             # -> ~/.config/gh/config.yml
├── git                         # -> ~/.config/git/
│   ├── alias
│   └── config
├── plantuml
│   ├── bin/
│   └── txt2plantuml.sh
├── ranger
│   ├── config/                # -> ~/.config/ranger/
│   └── ranger.sh
├── setup.sh
├── test_setup.sh
├── tig
│   └── tigrc                  # -> ~/.tigrc
├── tmux/
├── vim
│   ├── cheatsheet.md
│   ├── coc
│   │   └── coc-settings.json # -> ~/.vim/coc-settings.json
│   ├── dein/
│   ├── gvimrc                 # -> ~/.gvimrc
│   ├── template/
│   └── vimrc                  # -> ~/.vimrc
└── wezterm                     # -> ~/.config/wezterm/
    ├── keys.lua
    └── wezterm.lua