jivkok / dotfiles

OSX/Linux/Windows dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSX, Linux, and Windows machine configuration scripts

Table of Contents

OS Details

macOS / Linux (Debian-based, Arch)

What is included

  • Aliases
  • Functions
  • Shell options: Bash / Zsh
  • Shell theme: Bash / Zsh
  • Shell packages: macOS (Homebrew), Debian (apt), Arch (pacman)
  • ZSH configuration
  • Git configuration
  • Tmux configuration
  • Vim configuration

Installation

The setup script will configure shell options, theme, aliases, functions, and packages. The setup script will ask whether to run each of the optional steps. There is option to change the default shell to Zsh.

Note: Dotfiles default location is $HOME/dotfiles. If you want to change it, specify a different directory prior to running the setup scripts by setting the dotdir variable: export dotdir=$HOME/path/to/my/dotfiles

# OSX
cd $HOME
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Homebrew
brew install git
git clone https://github.com/jivkok/dotfiles.git dotfiles
./dotfiles/setup.sh

# Linux (Debian-based)
cd $HOME
sudo apt-get install -y git
git clone https://github.com/jivkok/dotfiles.git dotfiles
./dotfiles/setup.sh

# Linux (Arch)
cd $HOME
sudo pacman -S --noconfirm git
git clone https://github.com/jivkok/dotfiles.git dotfiles
./dotfiles/setup.sh

Customizations

Specify custom $PATH

If $HOME/.path exists, it will be sourced along with the other files.

Custom commands without creating a new fork

If $HOME/.profile.local exists, it will be sourced along with the other files. You can use this to add custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository. Since $HOME/.profile.local is sourced at the end, it allows for overriding of existing settings, functions, and aliases.

Upgrade

cd ~/dotfiles
git pull

Windows (Command shell and Powershell)

What is included

  • Packages with Chocolatey
  • Command shell / Powershell setup
  • Console configuration
  • Command shell configuration
  • Powershell configuration

Installation

The setup script will install packages with Chocolatey, configure a multi-tabbed console and its desktop shortcut, and configure system options / theme / aliases / functions.

Note: run the shell commands from an elevated shell.

Option #1 (concise, with Boxstarter & Chocolatey)

Open http://j.mp/jivkokshell in a browser. It is same as:

START http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/jivkok/Chocolatey-Packages/master/jivkok.Shell/shell.boxstarter.ps1

Option #2 (concise)

rem With Command shell:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/jivkok/dotfiles/master/setup/setup.ps1'))"
# With Powershell:
Set-ExecutionPolicy Bypass
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/jivkok/dotfiles/master/setup/setup.ps1'))

Option #3 (with Chocolatey)

rem With Command shell:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
cinst jivkok.shell -y -source http://www.myget.org/F/jivkok-chocolatey
# With Powershell:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
cinst jivkok.shell -y -source http://www.myget.org/F/jivkok-chocolatey

Option #4 (manual repo cloning)

rem With Command shell:
git clone https://github.com/jivkok/dotfiles.git %USERPROFILE%\dotfiles
@powershell -NoProfile -ExecutionPolicy Bypass -File %USERPROFILE%\dotfiles\setup\setup.ps1
# With Powershell:
git clone https://github.com/jivkok/dotfiles.git $HOME\dotfiles
. $HOME\dotfiles\setup\setup.ps1

Customizations

Custom commands without creating a new fork

If custom profile script ( %USERPROFILE%\profile.cmd for Command shell, $Home\profile.ps1 for Powershell ) exists, it will be included along with the other files. You can use this to add custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository. Since this local profile is included at the end, it allows for overriding of existing settings, functions, and aliases.

Upgrade

rem With Command shell:
cd /d %USERPROFILE%\dotfiles
git pull
# With Powershell:
cd $HOME\dotfiles
git pull

Credits

About

OSX/Linux/Windows dotfiles

License:MIT License


Languages

Language:Shell 63.9%Language:Vim Script 28.8%Language:PowerShell 5.6%Language:Python 0.7%Language:AutoHotkey 0.5%Language:Batchfile 0.5%