项目作者: excentrik

项目描述 :
Personalized dotfiles installation
高级语言: JavaScript
项目地址: git://github.com/excentrik/dotfiles.git
创建时间: 2016-09-15T15:15:16Z
项目社区:https://github.com/excentrik/dotfiles

开源协议:MIT License

下载


Dotfiles

Dotfile management using Dotbot.

Brief introduction to dotfiles:

Dependencies

  • git
  • python

Optional dependencies depending on the environment.

Installation

  1. ~$ git clone --recursive git@github.com:excentrik/dotfiles.git ~/.dotfiles

For default installation (automatically detects host):

  1. ~/.dotfiles$ ./install

For installing a specific host:

  1. ~/.dotfiles$ ./install <host> [<roles...>]
  2. # see meta/hosts/ for available hosts
  3. # see meta/roles/ for available roles

For installing a single role/package:

  1. ~/.dotfiles$ ./install-role <roles...>
  2. # see meta/roles/ for available roles

If you don’t want dotfiles to ask for any user input, you can use the DOTFILES_NO_INTERACTIVE flag, such as:

  1. ~/.dotfiles$ DOTFILES_NO_INTERACTIVE=1 ./install

You can run these installation commands safely multiple times, if you think that helps with better installation.

Loading source files

In order to load the dotfiles, you need to run:

  1. ~$ source ~/.bash_profile

Customization

All linked files should be left as they are, unless you plan to commit changes to the dotfiles repo.

To add a custom behaviour to your shell, such as personal aliases, etc:

  1. ~/$ touch .extra
  2. # Edit .extra with whatever customization you want.
  3. # Example (for default OSX prompt):
  4. # export PS1="\h:\w \u\$ ";
  5. ~/$ source .extra # To load .extra for current shell

TODO

  • Implement OSX packages (xcode)
  • Windows ???
  • install roles according to host (osx - use brew to install packages, unix - use apt-get)
  • Make sure backups are done correctly
  • Add a copy plugin to dotbot
  • First time starting vi opens two buffer windows

License

See LICENSE.md for details.

Commands available

Run list_dotfiles_functions to get a list of available commands:

  1. cleanup_ds # Recursively delete `.DS_Store` files under the current path
  2. confirm # Confirmation wrapper. Usage: confirm rm -rf /tmp/folder
  3. dot_progress # Fancy progress function from Landley's Aboriginal Linux. Usage: rm -rfv /foo | dot_progress
  4. escape # Uber useful when you need to translate a weird path into single-argument string.
  5. external_ip # Get external IP address
  6. extract # Extra many types of compressed packages
  7. fs # Determine size of a file or total size of a directory
  8. kill_processes # Kill all process that match a pattern (`kill_processes ssh` kills all processes that contain ssh in their CMD string
  9. la # List all files colorized in long format, including dot files
  10. list_dotfiles_functions # List all function available in a shell
  11. ll # Alias to use GNU ls and print directories first, with alphanumeric sorting
  12. man # Enable coloured manuals
  13. manpdf # Open man page as PDF
  14. mkd # Create a new directory and enter it
  15. msh # Open a tmux terminal inside a mosh session. Usage: msh <hostname> {session_name}
  16. prettyjson # Pretty print json. Usage: echo {"foo": "lorem", "bar": "ipsum"} | prettyjson
  17. pyclean # Clean all python cache files (works for both py2 and py3)
  18. reload # Reload the shel
  19. report_local_port_forwardings # Display all local port forwarding tunnels
  20. report_remote_port_forwardings # Display all remote port forwarding tunnels
  21. run_under_tmux # Run $1 under session or attach if such session already exist. Example usage: run_under_tmux 'rtorrent' '/usr/local/rtorrent-git/bin/rtorrent';
  22. shell_is_interactive # Checks if shell is interactive
  23. targz # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
  24. timer # Stopwatch to count execution time for a command. Usage example: timer ls -la
  25. title # Set terminal titles in OSX
  26. tsh # Open a tmux terminal inside an ssh session. Usage: tsh <hostname> {session_name}
  27. update_dotfiles # Update and install latest dotfiles version
  28. urlencode # URL-encode strings