iMcG33k / dotfiles-1

my dotfiles for Linux and Mac OS X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Synopsis

This repository contains my dotfiles settings for Linux (Ubuntu 16.04 LTS) and Mac OS X(10.12), also a bit FreeBSD (10.0); See Windots for Windows settings.

LICENSE

MIT License.

Setup

git clone --recursive git@github.com:HongxuChen/dotfiles.git /path/to/dotfiles
# or https://github.com/HongxuChen/dotfiles.git
# my personal dotfiles folder is ~/tools/dotfiles

## close other applications for a safe/smooth installation
cd /path/to/dotfiles

# see its usage
./install.py -h

# dryrun to see whether there are dangerous operations
./install.py -n

# install (if you're feeling lucky)
./install.py
  • Use install.py to setup the environment, which merely adds symlinks to $HOME directory as well as backups your original settings (if they do exist). It's better to dryrun it beforehand with install.py -n (more details with install.py -h) to see the effects. It is suggested to close other applications (e.g., google-chrome, emacs) during setup(especially on Linux).

  • Some of my personal information should be changed, you can grepor ag(see the_silver_searcher) and replace them.

    # grep my personal info (containing "hongxu") and open in Vi
    git ls-files *[^*.md] | xargs ag 'hongxu' | vi -
    # then you'd change these settings yourself
    
  • Extra fonts are available on Dropbox. Caveats: they are not all free fonts and not under MIT license.

    • can be used by urxvt, etc;
    • note: on Debian derivatives, make sure urxvt is from rxvt-unicode-256color;
    • xterm is not recommended as it has poor support for unicode characters.

Package managers

Apart from editors' plugin managers (see below), other package managers are used and the lists are inside misc directory:

  1. Debian -- debian package management

    • linuxbrew frequently causes compilation and linkage errors when buiding tools on your own therefore not recommended
  2. Mac OS X -- homebrew

    • homebrew should be used whenever possible, otherwise it's better to build from source code yourself;
    • use brew doctor to see potential issues;
    • brew cask is not recommended due to the issues caused by check for updates in Mac apps.
  3. Haskell -- Stack and Cabal

  4. Python -- pip/pip3

  5. Ruby -- gem

  6. Node.js -- npm & yarn

  7. OCaml -- opam

Settings

Fundamentals

  1. Vim(managed by vundle)(~/.vimrc, ~/.vim)

  2. Emacs(24+, based on puremell's settings, managed by package.el)(~/.emacs.d)

    • start emacs, elisp extensions should be installed automatically for the first time;
    • Configured with company-mode and auto-complete for completions however the former is preferred;
    • C++ development is fully configured using rtags (TODO, homebrew seems already containing it however depending on a special version of llvm);
    • note: there are some configurations for org and an additional git submodule for reavel.js for org-reavel(although it's NOT advised to use that)
  3. Zsh(modified from oh-my-zsh)

    • relevant files:

      • ~/.profile
      • ~/.aliases
      • ~/.zshenv
      • ~/.zprofile
      • ~/.zshrc
      • ~/.omz/
    • brew install zsh-history-substring-search zsh-syntax-highlighting and change login shell (with chsh) to zsh to make it really work; enjoy it!

  4. IPython(especially for sh/nb profile)(~/.ipython/)

    • for sh profile (check command alias: p_sh), lots of packages are pre-imported(installed via pip)
    • ipython-notebook (check command alias: p_nb) is based on sh profile, a few extensions are in ~/.ipython/extensions/
  5. sbt(~/.sbt, ~/.sbtrc)

  6. pry(~/.pryrc)

  7. git(~/.gitconfig)

  8. tmux(~/.tmux.conf)

Extras

  1. ack(~/.ackrc)

    • but prefer ag to ack-grep
  2. hg(aka mercurial) (~/.hgrc)

  3. irb(~/.irbrc)

    • irb also support tab completion, but inferior to pry
  4. htop

    • ~/config/.htoprc on Linux
    • ~/.htoprc on Mac
  5. curl(~/.curlrc)

Linux Specific

They are not exactly linux only, but I tend not to use them on Mac OSX. They lie inside Linux/ and are also symlinked to $HOME by install.py. (Ditto for files in Darwin/, which is supposed to be Mac specific.)

  • gdb(~/.gdbinit, ~/.gdb)

    • gdb is superseded by lldb on newer Mac OSX.
  • X11 settings

    • ~/.Xresources: for XTerm, URxvt, Emacs; should run xrdb -load ~/.Xresources firstly
    • ~/.xscreensaver
  • wget(~/.wgetrc)

    • since wget is GPL
  • svn(~/.subversion/)

    • Mac has better GUI clients
  • mplayer(~/.mplayer)

    • Mac has better players
  • Valgrind(~/.valgrindrc)

  • aptitude(~/.aptitude/)

  • bash(~/.bashrc)

    • share ~/.profile, ~/.aliases with zsh;
    • used when there's no alternatives.
  • Freedesktop configs(~/.config/)

    • LXDE(autostart/, gtk-2.0/, gtk-3.0/, lxpanel/, lxsession/, lxterminal/, openbox/, pcmanfm/, user-dirs.dirs, user-dirs.locale)
    • Fcitx(fcitx/)
    • Zathura(zathura/)

Mac Specific

  • GVim(~/.gvimrc)

    • for brewed MacVim;
    • Linux Vimers doesn't need GUI 😄.
  • slate(~/.slate)

Submit an Issue

Report here.

Bonus

About

my dotfiles for Linux and Mac OS X

License:MIT License


Languages

Language:Python 32.5%Language:Emacs Lisp 25.6%Language:Perl 15.5%Language:CSS 7.9%Language:Shell 7.4%Language:TeX 5.6%Language:GDB 2.7%Language:Vim Script 1.0%Language:Lua 0.7%Language:JavaScript 0.4%Language:Roff 0.3%Language:C 0.2%Language:Scala 0.2%Language:Go 0.0%