Skip to content

daizeng1984/dotfiles

Repository files navigation

Configuration

This configuration is my personal laptop/desktop dotfile setup repo and now it grows into a bootstrap setup for my working environments (mainly linux/mac) and this bootstrap, unlike Laptop, heavily relies on conda/nix. Why? because of linux more flavor and for more details please see here and there

There are 3 level of setup: Minimal, Conda & Nix.

Minimal is just to setup basics of bashrc etc. and hopefully for vimrc as well; Conda is used to setup a nice (python, nodejs, etc.) CLI dev on linux/mac without desktop experience (mostly keybindings and desktop app); Nix is aiming for fully automation of CLI and desktop app install on *nix (but outdated due to tremendous maintainence effort and Nix's flaky support on mac).

Minimal

This setup only provides dotfiles for bash/zsh and good old vim. It aims for less intrusive and relies on remote ssh machine default setup. Right in this mode, bash, screen & vim is the only thing you get.

cd && git clone https://github.com/daizeng1984/dotfiles.git .dotfiles && cd .dotfiles && ./createSymlink.sh

Then restart the shell.

Conda and Desktop App

This setup provides nicest CLI experience for myself and desktop as well. It heavily relies conda to deploy all packages needed. No root access is needed so unlike Nix X/Desktop app is done separately. Conda is managed in ~/.dotfiles/.local folders.

Linux

Should be good out of box for most distros. Just need something providing: git, curl etc. If missing, try install package like build-essential.

cd && git clone https://github.com/daizeng1984/dotfiles.git .dotfiles && cd .dotfiles && ./createSymlink.sh && source ~/.bashrc && source ./installConda.sh

For desktop:

cd $HOME/.dotfiles/linux && source ./installLinuxDesktop.sh

TODO: manually install tweak tool to disable capslock key TODO: install more desktop apps

Mac

Run in Terminal:

xcode-select --install
git clone --depth=1 https://github.com/Homebrew/brew ~/.brew # install brew locally, since mostly cask it
if [ -e ~/.brew/ ]; then eval "$(~/.brew/bin/brew shellenv)"; fi
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"  # install as admin
brew install wget

Then just run:

cd && git clone https://github.com/daizeng1984/dotfiles.git .dotfiles && cd .dotfiles && ./createSymlink.sh && source ~/.bashrc && source ./installConda.sh

For desktop:

cd $HOME/.dotfiles/mac && source ./installMacDesktop.sh

TODO: manually config the Karabiner-Element for keybindings...

Windows (WSL)

First install scoop to bootstrap in powershell by running:

Set-Itemproperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -value 0
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
scoop install sudo
sudo scoop install git
scoop bucket add extras
scoop update
scoop install wget

Still in powershell, for wsl and desktop:

cd
git clone https://github.com/daizeng1984/dotfiles.git .dotfiles
cd .dotfiles/windows
cd ~/.dotfiles/windows
./installScoop.ps1

Then delete homefolder's [Downloads, Documents, Music, Pictures, Videos, Workspace] same in powershell, run:

cd
source .dotfiles/windows/linkWSLHomeFolder.ps1

Different Profile (Non-Windows)

This is to customize shell script for different machine etc.. Register a name to samples/var.def with username $(whoami) and hostname $(hostname) and then customize the scripts. For example:

__mapToDef '<your whoami output>' '<your hostname output>' 'macconda.def' 'homemac' 'reddust'

this would map current host and user to macconda.def scripts and homemac is for nix setup and should just leave it there. The reddust is to assign the tmux color theme.