8000 GitHub - iledarn/dotfiles-7: mac, Arch Linux, and Debian/Ubuntu
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

iledarn/dotfiles-7

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

My dotfiles. https://github.com/davidosomething/dotfiles

terminal screenshot

Screenshot of my zsh prompt

Installation

For mac, see full install details in mac/README.md.

Clone and run the symlink script:

git clone --recurse-submodules https://git.io/vg0hV ~/.dotfiles
~/.dotfiles/bootstrap/symlink.sh

Post-Installation

Recommended steps

  • Create XDG child directories (run bootstrap/xdg.sh). The base directories are probably already initialized by /etc/xdg/autostart/user-dirs-update-gtk.desktop.
  • Install and use Fira (Fura) Mono for Powerline font (install to ${XDG_DATA_HOME}/fonts on *nix)
  • Install zsh and change default shell to it (ensure listed in /etc/shells) and restart shell (zplug will self-install)
  • See OS specific notes in mac/README.md and for linux linux/README.md and linux/arch.md
  • Chrome extensions I use are listed in chromium/README.md

Dev environment setup

Install these using the system package manager. For macOS/OS X there are helper scripts.

  • chruby, ruby-install, then use ruby-install to install a version of ruby
  • Install nvm MANUALLY via git clone into $XDG_CONFIG_HOME, then use it to install a version of node (and npm install --global npm@latest)
  • php, composer, use composer to install wp-cli
  • Use pyenv-installer for pyenv, pyenv-virtualenv, then create a new env with a new python/pip.
    • Create virtualenvs for neovim.

Provisioning scripts

These will assist in installing packages and dotfiles. Best to have the Environment set up first.

  • bootstrap/cleanup.sh moves some dotfiles into their XDG Base Directory supported directories
  • bootstrap/symlink.sh symlinks rc files for bash, zsh, ack, (neo)vim, etc.
  • bootstrap/terminfo.sh will copy/compile terminfo files for user to ~/.terminfo/*
  • bootstrap/x11.sh symlinks .xbindkeysrc, .xprofile
  • npm/install.sh install default packages, requires you set up nvm and install node first
  • ruby/install-default-gems.sh requires you set up chruby and install a ruby first
  • python/install.sh requires you set up pyenv. Install default pip packages

Updating

The sourced dko::dotfiles::main() function is available as the alias u. Use u without arguments for usage.

Notes

  • bin/
    • There's a readme in bin/ describing each script/binary. This directory is added to the $PATH.
  • local/
    • Unversioned folder, put zshrc, bashrc, npmrc, and gitconfig here and they will be automatically sourced, LAST, by the default scripts. No dots on the filenames.
  • git/
    • The comment character was changed from # to ; so I can use Markdown in my commit messages without trimming the headers as comments. This is also reflected in a custom Vim highlighting syntax in vim/after/syntax/gitcommit.vim.
  • python/
    • Never sudo pip. Set up a pyenv, and use a pyenv-virtualenv (which will delegate to pyvenv) if doing project specific stuff, and pip install into that userspace pyenv or virtualenv.
  • vim/
    • If curl is installed, vim-plug will be downloaded and plugins will install on run. See vim/README.md for more information.

rc script source order

echo $DKO_SOURCE to see what files were loaded to get to the current shell state. If you have node installed, the dko-sourced (bin/dko-sourced) command has better output formatting.

For X apps (no terminal) the value is probably:

/etc/profile
.xprofile
  shell/vars
    shell/xdg

Shell script code style

  • Script architecture
    • Use the #!/usr/bin/env bash shebang and write with bash compatibility
    • Create a private main function with the same name as the shell script. E.g. for a script called fun, there should be a __fun() that gets called with the original arguments __fun $@
    • Two space indents
  • Function names
    • My helpers for scripting and provisioning via these dotfiles are namespaced following google shell style as dko::function_name(). These functions are expected to persist for the lifetime of the script or in the shell if the script was sourced.
    • For private functions in a script, use two underscores __private_func() These function names are safe to reuse after script execution. When namespaced, they are in the form of __dko::function_name().
  • Variable interpolation
    • Always use curly braces around the variable name when interpolating in double quotes.
  • Variable names
    • Stick to nouns, lower camel case
  • Variable scope
    • Use local and readonly variables as much as possible over global/shell-scoped variables.

Credits

Logo from jglovier/dotfiles-logo

About

mac, Arch Linux, and Debian/Ubuntu

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 51.4%
  • Vim Script 46.3%
  • JavaScript 1.1%
  • Python 0.6%
  • CSS 0.3%
  • PHP 0.2%
  • CoffeeScript 0.1%
0