All Projects β†’ XuehaiPan β†’ Dev-Setup

XuehaiPan / Dev-Setup

Licence: MIT license
Automation scripts for setting up a basic development environment.

Programming Languages

shell
77523 projects
powershell
5483 projects
python
139335 projects - #7 most used programming language
Vim Script
2826 projects

Projects that are alternatives of or similar to Dev-Setup

Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! πŸš€
Stars: ✭ 254 (+1236.84%)
Mutual labels:  vimrc, zshrc
dotfiles
dotfiles
Stars: ✭ 13 (-31.58%)
Mutual labels:  vimrc, zshrc
terminal-themes
rc files for vim, tmux, iterm and zsh
Stars: ✭ 18 (-5.26%)
Mutual labels:  vimrc, zshrc
dotfiles
My amazing vim, zsh and tmux config files
Stars: ✭ 25 (+31.58%)
Mutual labels:  vimrc, zshrc
dotfiles
πŸ€ Vim/Neovim + Tmux + Zsh + Alacritty = Build your own fantastic development environment
Stars: ✭ 65 (+242.11%)
Mutual labels:  vimrc, zshrc
dotfiles
/home/yous
Stars: ✭ 43 (+126.32%)
Mutual labels:  vimrc, zshrc
dotfiles
πŸ”― A collection of my rc files (tmux, neovim, zsh, fish, poetry, git, ...etc) and utilities that make everyday coding fun!
Stars: ✭ 23 (+21.05%)
Mutual labels:  vimrc, zshrc
Dotfiles
My configurations and scripts
Stars: ✭ 82 (+331.58%)
Mutual labels:  vimrc, zshrc
dotfiles
my personal dotfiles managed by dotbot, zinit
Stars: ✭ 65 (+242.11%)
Mutual labels:  vimrc, zshrc
dotfiles
alias, bash, brewfile, duti, function, i3, irssi, iterm2, jailbreak, macos, prompt, refind, searchengines, sessionbuddy, vscode, zsh
Stars: ✭ 18 (-5.26%)
Mutual labels:  setup-macos, setup-development-environment
dotfiles
Dotfiles of Coelacanthus
Stars: ✭ 17 (-10.53%)
Mutual labels:  vimrc, zshrc
anyrc
🐚 Bring your shell environment to anywhere
Stars: ✭ 28 (+47.37%)
Mutual labels:  vimrc, zshrc
Dotfiles
⚑️ Awesome configurations for the development environments
Stars: ✭ 137 (+621.05%)
Mutual labels:  vimrc, zshrc
dotfiles
This is a dotfiles repository created and maintained by @erdaltsksn. It contains a collection of `.files`.
Stars: ✭ 16 (-15.79%)
Mutual labels:  vimrc, vscode-settings
Dotfiles
My configuration files
Stars: ✭ 89 (+368.42%)
Mutual labels:  vimrc, zshrc
dotfiles
Setup git, vim, zsh, SublimeText, tmux etc. using one command
Stars: ✭ 107 (+463.16%)
Mutual labels:  vimrc, zshrc
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+5084.21%)
Mutual labels:  vimrc, zshrc
Dotfiles
Hack away :)
Stars: ✭ 78 (+310.53%)
Mutual labels:  vimrc, zshrc
dotfiles
A total nord dotfiles used by me. Forever work in progress.
Stars: ✭ 35 (+84.21%)
Mutual labels:  vimrc, zshrc
setup
Automate the macOS setup for productive React Developer
Stars: ✭ 13 (-31.58%)
Mutual labels:  setup-script, setup-development-environment

Dev-Setup

δΈ­ζ–‡η‰ˆ πŸ‘ˆ

Automation scripts for setting up a basic development environment. (screenshots)

Table of Contents

Usage

Installation

Download the script file using wget / curl / git or any browser (click here to download zip). Open Terminal and run:

via wget

# Download and run via wget
/bin/bash -c "$(wget -O - https://github.com/XuehaiPan/Dev-Setup/raw/HEAD/setup.sh)"

via curl

# Download and run via curl
/bin/bash -c "$(curl -fL https://github.com/XuehaiPan/Dev-Setup/raw/HEAD/setup.sh)"

via git or browser

# Download via git
git clone --depth=1 https://github.com/XuehaiPan/Dev-Setup.git

# Run the script file
cd Dev-Setup
/bin/bash setup.sh

Options:

  • SET_MIRRORS (default false): set the source of package managers to open source mirrors at TUNA (@China) to speed up downloading. (see Packages for more details). If you want to bypass the prompt, run:

    # Bypass the prompt
    SET_MIRRORS=true bash setup.sh    # set mirrors to TUNA (@China) (recommended for users in China)
    SET_MIRRORS=false bash setup.sh   # do not modify mirror settings

Note: If you are using WSL on Windows, you need to run Windows Terminal as administrator to get the permissions to copy fonts to C:\Windows\Fonts. Otherwise, the fonts will not be installed successfully on Windows. You can download them from nerdfonts.com and install them manually. See Font Settings for more details.

After running the script, all the old configuration files involved will be backed up to the folder ${HOME}/.dotfiles/backups/<DATETIME>, and a symbolic link ${HOME}/.dotfiles/backups/latest will link to the latest one. You can compare the differences using:

# Compare the differences
colordiff -uEB ~/.dotfiles/backups/latest ~/.dotfiles
colordiff -uEB ~/.dotfiles/backups/latest/.dotfiles ~/.dotfiles

# Ignore miscellaneous directories
colordiff -uEB -x 'backups' -x '.dotfiles' ~/.dotfiles/backups/latest ~/.dotfiles
colordiff -uEB -x 'backups' ~/.dotfiles/backups/latest/.dotfiles ~/.dotfiles

There is a nice way to inspect and move changes from one version to another version of the same file using vimdiff or meld. Run:

# Inspect and move changes using vimdiff
vim -c "DirDiff ~/.dotfiles ~/.dotfiles/backups/latest/.dotfiles"

You can get vimdiff reference manual from https://vimhelp.org/diff.txt.html, or type command :help diff inside Vim.

Rollback

You can rollback to your previous dotfiles using:

# Rollback to the latest backup in "${HOME}/.dotfiles/backups/latest"
bash restore_dotfiles.sh

# Rollback to a specific version
bash restore_dotfiles.sh "${HOME}/.dotfiles/backups/<DATETIME>"

Note: the packages installed by setup.sh (see Packages) will remain in your system.

Upgrade Packages

You can upgrade your packages just by running:

upgrade_packages

By default, upgrade_packages will not upgrade your conda environments. If you want to always keep your conda up-to-date, you can uncomment the corresponding line in ${HOME}/.dotfiles/utilities.sh. Or run the script as:

upgrade_packages; upgrade_conda

Font Settings

The login shell for the current user will be set to zsh. In order to get a wonderful and enjoyable terminal experience, please change your terminal font to a Nerd Font. You can download any nerd font you like from nerdfonts.com manually. The script will download and install DejaVu Sans Mono Nerd Font for macOS, Linux and Windows (administrator privilege is required to install fonts on Windows).

Configure your terminal to use nerd fonts:

  • For macOS and Linux users, change the terminal font setting to "Nerd Font Complete" (e.g. 'DejaVuSansMono Nerd Font Book').
  • For WSL on Windows users, change the terminal font setting to "Nerd Font Complete Windows Compatible" (e.g. 'DejaVuSansMono NF').

See Font configurations for Powerlevel10k for more details.

Or use Zsh with Powerlevel10k Lean style:

chsh -s /usr/local/bin/zsh-lean   # change the login shell

which do not need additional font settings.

zsh-lean

Note: If you are using WSL on Windows, you need to run Windows Terminal as administrator to get the permissions to copy fonts to C:\Windows\Fonts. If you forgot to obtain the appropriate privileges, you can open WSL in a new terminal window with administrator privilege. Then run the following command:

find -L ~/.local/share/fonts -not -empty -type f -name '*.tt[fc]' -print0 | xargs -0 -I '{}' bash -c \
    'file="{}"
    font=${file##*/}
    echo "Installing \"${font}\" to \"/mnt/c/Windows/Fonts\""
    cp -f "${file}" /mnt/c/Windows/Fonts
    /mnt/c/Windows/System32/reg.exe add "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts" \
        /v "${font%.tt[fc]} (TrueType)" /t REG_SZ /d "${font}" /f'

Customization

Make your own setup scripts. Add a new config file to the script:

  1. fork this repository;
  2. copy the contents of your config file to a temp file temp.txt;
  3. replace all identifiers of your home directory with ${HOME} in temp.txt;
  4. replace all identifiers of your user name with ${USER} in temp.txt;
  5. replace all \ with \\ in temp.txt;
  6. replace all $ with \$ in temp.txt;
  7. add the following lines to script setup_<OS_NAME>.sh:
cd "${HOME}"   # this line has already been added at the top of the script

# Replace <CFG_FILE> with the config file's name
backup_dotfiles <CFG_FILE> .dotfiles/<CFG_FILE>

cat >.dotfiles/<CFG_FILE> <<EOF
# Paste the contents in the temp file `temp.txt` here
EOF

ln -sf .dotfiles/<CFG_FILE> .
  1. add <CFG_FILE> and .dotfiles/<CFG_FILE> to DOTFILES in restore_dotfiles.sh.

Packages

The source of package managers (Homebrew (macOS), APT (Ubuntu), Pacman (Manjaro), CPAN, Gem, Conda and Pip) will be set to the open source mirrors at TUNA (@China).

The following packages will be setup:

Package macOS Ubuntu Linux Manjaro Linux
Mirrors at TUNA (@China) βœ” βœ” βœ”
Homebrew βœ” βœ” βœ”
bash βœ” βœ” βœ”
bash-completion βœ” βœ” βœ”
zsh & oh-my-zsh βœ” βœ” βœ”
powerlevel10k βœ” βœ” βœ”
zsh-syntax-highlighting βœ” βœ” βœ”
zsh-autosuggestions βœ” βœ” βœ”
zsh-completions βœ” βœ” βœ”
colorls βœ” βœ” βœ”
git & git-lfs βœ” βœ” βœ”
vim & vim-plug βœ” βœ” βœ”
tmux & oh-my-tmux βœ” βœ” βœ”
reattach-to-user-namespace / xclip βœ” βœ” βœ”
fzf βœ” βœ” βœ”
ranger βœ” βœ” βœ”
fd βœ” βœ” βœ”
bat βœ” βœ” βœ”
highlight βœ” βœ” βœ”
ripgrep βœ” βœ” βœ”
wget βœ” βœ” βœ”
curl βœ” βœ” βœ”
openssh βœ” βœ” βœ”
ruby & rubygems βœ” βœ” βœ”
perl & cpan βœ” βœ” βœ”
htop βœ” βœ” βœ”
net-tools βœ” βœ” βœ”
exfat-utils βœ” βœ” βœ”
atool βœ” βœ” βœ”
tree βœ” βœ” βœ”
git-extras βœ” βœ” βœ”
diffutils βœ” βœ” βœ”
colordiff βœ” βœ” βœ”
diff-so-fancy βœ” βœ” βœ”
jq βœ” βœ” βœ”
shfmt βœ” βœ” βœ”
shellcheck βœ” βœ” βœ”
Miniconda3 βœ” βœ” βœ”
mamba βœ” βœ” βœ”
gcc βœ” βœ” βœ”
gdb βœ” βœ” βœ”
clang & llvm βœ” βœ” βœ”
lldb βœ” βœ” βœ”
make βœ” βœ” βœ”
cmake βœ” βœ” βœ”
automake βœ” βœ” βœ”
autoconf βœ” βœ” βœ”
DejaVu Sans Mono Nerd Font βœ” βœ” βœ”
Cascadia Code Font βœ” βœ” βœ”
Menlo Font βœ” βœ” βœ”
Microsoft YaHei Mono Font βœ” βœ” βœ”

Currently macOS only casks installed by Homebrew:

Package Description macOS Ubuntu / Manjaro Linux
iTerm2 A terminal emulator for macOS that does amazing things βœ” ✘
Google Chrome A fast, secure, and free web browser built for the modern web βœ” ✘
Keka The macOS file archiver βœ” ✘
IINA The modern media player for macOS βœ” ✘
Typora A truly minimal markdown editor βœ” ✘
Visual Studio Code A lightweight but powerful source code editor βœ” ✘
XQuartz An open-source effort to develop a version of the X.Org X Window System that runs on macOS βœ” ✘

Screenshots

Shell:

shell

tmux:

tmux

fzf:

fzf

Vim:

vim

Live markdown preview support for Vim:

markdown

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].