diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..26fbd72 --- /dev/null +++ b/Makefile @@ -0,0 +1,58 @@ +.PHONY: help git lftp npm nvim ssh sway urxvt zsh clean + +.DEFAULT: help + +help: + @echo "all # Sets up everything" + @echo "git # Sets up default git config" + @echo "lftp # Set up lftp" + @echo "npm # Set up npm" + @echo "nvim # Sets up neovim" + @echo "ssh # Set up ssh" + @echo "sway # Set up sway" + @echo "urxvt # Set up urxvt" + @echo "zsh # Set up zsh" + @echo "clean # deletes absolutely everything" + @echo "" + @echo " mostly, i'm just lazy" + +all: git lftp npm nvim ssh sway urxvt zsh + +git: + @stow -t ~/ git + +lftp: + @stow -t ~/ lftp + +npm: + @mkdir -p ~/.cache/npm ~/.local/share/npm + @stow -t ~/ npm + +nvim: + @stow -t ~/ nvim + curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + @echo "Run :PlugInstall when nvim is first run!" + +ssh: + @stow -t ~/ ssh + +sway: + @stow -t ~/ sway + +urxvt: + @stow -t ~/ urxvt + +zsh: + git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh + git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions + @stow -t ~/ zsh + +clean: + @stow -D git lftp npm nvim ssh sway urxvt zsh + @rm -rf ~/.config/git \ + ~/.config/lftp ~/.local/share/lftp \ + ~/.config/npm ~/.cache/npm ~/.local/share/npm \ + ~/.config/nvim \ + ~/.config/sway \ + ~/.oh-my-zsh diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..f7b558c --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,5 @@ +[user] + email = george@rawlinson.net.nz + name = George Rawlinson +[push] + default = simple diff --git a/go/README.md b/go/README.md deleted file mode 100644 index 0ff5cf9..0000000 --- a/go/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Go - -Define $GOPATH ([source][1]) - -[1]: https://golang.org/doc/install diff --git a/lftp/lftprc b/lftp/.config/lftp/rc similarity index 100% rename from lftp/lftprc rename to lftp/.config/lftp/rc diff --git a/lftp/.local/share/lftp/bookmarks b/lftp/.local/share/lftp/bookmarks new file mode 100644 index 0000000..083b385 --- /dev/null +++ b/lftp/.local/share/lftp/bookmarks @@ -0,0 +1 @@ +host sftp://username:password@host:port/path/to/dir diff --git a/lftp/README.md b/lftp/README.md deleted file mode 100644 index ef34a86..0000000 --- a/lftp/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# LFTP - -## Ease of use - -* Added bookmark for default SFTP server. - -## Performance - -* Disabled cache. Force server to send up-to-date list of files. -* Set pget chunks to 30. Aim is to completely saturate the connection. -* Disabled logging by LFTP. - -## Cosmetic - -* Use colours. -* Changed default prompt. - -[Source][1] - -## Connect - -`lftp ` - -Create a symlink for `.lftprc` - -`ln -s ~/.dotfiles/lftp/lftprc ~/.lftprc` - -Create folders for bookmarks & copy over `bookmarks`. - -`mkdir -p ~/.lftp` - -`cp ~/.dotfiles/lftp/bookmarks ~/.lftp/bookmarks` - -[1]: http://lftp.yar.ru/lftp-man.html diff --git a/lftp/bookmarks b/lftp/bookmarks deleted file mode 100644 index 02814ff..0000000 --- a/lftp/bookmarks +++ /dev/null @@ -1 +0,0 @@ -host sftp://username:password@host:port/path/to/dir diff --git a/link-zsh.sh b/link-zsh.sh deleted file mode 100755 index bde55de..0000000 --- a/link-zsh.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# Links all ZSH plugins from dotfiles in oh-my-zsh plugin directory - -DOTFILES_DIR="$HOME/.dotfiles" -ZSH_DIR="$HOME/.oh-my-zsh/custom/" - -# Check if zsh installed & directories reachable -if [ ! command -v zsh &> /dev/null ]; then - echo "zsh not installed" - exit 1 -fi - -if [ ! -d ${DOTFILES_DIR} ]; then - echo "${DOTFILES_DIR} does not exist" - exit 1 -fi - -if [ ! -d ${ZSH_DIR} ]; then - echo "${ZSH_DIR} does not exist" - exit 1 -fi - -# Recursively find all ZSH files in ~/.dotfiles -declare -a ZSH_FILES=(`find $DOTFILES_DIR -type f -name "*.zsh"`) - -# Copy array -declare -a ZSH_NAMES=("${ZSH_FILES[@]}") - -# Remove path, we only want filenames -ZSH_NAMES=("${ZSH_NAMES[@]/*\//}") - -# Get number of ZSH files -NUM_FILES=${#ZSH_FILES[@]} - -# Check if there are actually any files to symlink -if [ ${NUM_FILES} -lt 1 ]; then - echo "No files found." - exit 1 -else - echo "${NUM_FILES} files to be symlinked." -fi - -# Print all files w/ symlinked path -for (( i=0; i<${NUM_FILES}; i++ )); do - - # Check if symlinked file exists - if [ -f ${ZSH_DIR}${ZSH_NAMES[$i]} ]; then - # Delete symlink - rm -f ${ZSH_DIR}${ZSH_NAMES[$i]} - fi - - # Perform symlink - echo "Symlink: ${ZSH_FILES[$i]} > ${ZSH_DIR}${ZSH_NAMES[$i]}" - ln -s ${ZSH_FILES[$i]} ${ZSH_DIR}${ZSH_NAMES[$i]} -done - -# All done -echo "Done!" - -exit 0 diff --git a/npm/.config/npm/config b/npm/.config/npm/config new file mode 100644 index 0000000..5a10b62 --- /dev/null +++ b/npm/.config/npm/config @@ -0,0 +1,2 @@ +# Save exact version instead of a 'loose' version. +save-exact=true diff --git a/npm/README.md b/npm/README.md deleted file mode 100644 index 43b473e..0000000 --- a/npm/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# NPM - -* Install NPM packages globally without requiring sudo. ([source][1]) -* Save exact version instead of a 'loose' version. ([source][2]) - -Create directory for global packages - -`mkdir ~/.npm-packages` - -Copy `.npmrc` - -`cp ~/.dotfiles/npm/npmrc ~/.npmrc` - -[1]: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md -[2]: https://docs.npmjs.com/misc/config#save-exact diff --git a/npm/npmrc b/npm/npmrc deleted file mode 100644 index e963901..0000000 --- a/npm/npmrc +++ /dev/null @@ -1,5 +0,0 @@ -# Install NPM packages globally without requiring sudo. -prefix=${HOME}/.npm-packages - -# Save exact version instead of a 'loose' version. -save-exact=true diff --git a/nvim/init.vim b/nvim/.config/nvim/init.vim similarity index 100% rename from nvim/init.vim rename to nvim/.config/nvim/init.vim diff --git a/nvim/README.md b/nvim/README.md deleted file mode 100644 index a0e9ecf..0000000 --- a/nvim/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# neovim (nvim) - -Install [nvim][url-nvim] with [vim-plug][url-vim-plug] (plugin manager) - -## Plugins - -* [vim-airline][url-vim-airline] -* [vim-airline-plugins][url-vim-airline-plugins] -* [vim-monokai][url-vim-monokai] -* [vim-gitgutter][url-vim-gitgutter] -* [vim-sensible][url-vim-sensible] - -## Installation - -```shell -curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -``` - -## Configuration - -`ln -s ~/.dotfiles/nvim/init.vim ~/.config/nvim/init.vim` - -`nvim +PlugInstall +qall` - -[url-nvim]:https://github.com/neovim/neovim -[url-vim-plug]:https://github.com/junegunn/vim-plug -[url-vim-airline]:https://github.com/vim-airline/vim-airline -[url-vim-airline-plugins]:https://github.com/vim-airline/vim-airline -[url-vim-monokai]:https://github.com/sickill/vim-monokai -[url-vim-gitgutter]:https://github.com/airblade/vim-gitgutter -[url-vim-sensible]:https://github.com/tpope/vim-sensible diff --git a/ssh/config b/ssh/.ssh/config similarity index 100% rename from ssh/config rename to ssh/.ssh/config diff --git a/ssh/README.md b/ssh/README.md deleted file mode 100644 index 74e1440..0000000 --- a/ssh/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# SSH - -Create SSH directory & copy config there. - -`mkdir -p ~/.ssh/` - -`cp config ~/.ssh/` - -Generate SSH key(s) - -`ssh-keygen -t ed25519 -C "comment" -f /path/to/ssh/key` - -## TODO - -Update config variables with proper variables (user/port/keys) diff --git a/sway/i3status.config b/sway/.config/i3status/config similarity index 100% rename from sway/i3status.config rename to sway/.config/i3status/config diff --git a/sway/sway.config b/sway/.config/sway/config similarity index 100% rename from sway/sway.config rename to sway/.config/sway/config diff --git a/sway/README.md b/sway/README.md deleted file mode 100644 index 7dc7043..0000000 --- a/sway/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# SWAY - -[Sway][1] is an i3-compatible window manager for Wayland. -Using i3status for the menu bar. Run with `sway`. - -## Dependencies - -* sway -* i3status -* ttf-font-icons -* rxvt-unicode - -## Setup - -`mkdir -p ~/config/{i3status,sway}` - -`ln -s ~/.dotfiles/sway/sway.config ~/.config/sway/config` - -`ln -s ~/.dotfiles/sway/i3status.config ~/.config/i3status/config` - -[1]: https://github.com/SirCmpwn/sway diff --git a/urxvt/xresources b/urxvt/.Xresources similarity index 100% rename from urxvt/xresources rename to urxvt/.Xresources diff --git a/urxvt/README.md b/urxvt/README.md deleted file mode 100644 index 4b66876..0000000 --- a/urxvt/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# urxvt - -a.k.a. rxvt-unicode. - -Uses following perl extensions: - -* Clickable URLs -* Simple Tabbing - -## Installation - -Create a symlink for `.Xresources` - -`ln -s ~/.dotfiles/urxvt/xresources ~/.Xresources` - -## Daemon - -[Startup][url-daemon] with `urxvtd -q -o -f` - -[url-daemon]:https://wiki.archlinux.org/index.php/Rxvt-unicode/Tips_and_tricks#Daemon-client diff --git a/vitasdk/README.md b/vitasdk/README.md deleted file mode 100644 index 4484401..0000000 --- a/vitasdk/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# VitaSDK - -Unofficial SDK for the PS Vita. Development moves fast, so breaks often. - -Check [vitasdk-cmake][url-vitasdk-cmake] and -[vitasdk][url-vitasdk] for prereqs & changes. - -[url-vitasdk-cmake]: https://github.com/codestation/vitasdk-cmake -[url-vitasdk]: https://github.com/vitasdk diff --git a/zsh/alert.zsh b/zsh/.oh-my-zsh/custom/alert.zsh similarity index 100% rename from zsh/alert.zsh rename to zsh/.oh-my-zsh/custom/alert.zsh diff --git a/go/go.zsh b/zsh/.oh-my-zsh/custom/go.zsh similarity index 100% rename from go/go.zsh rename to zsh/.oh-my-zsh/custom/go.zsh diff --git a/npm/npm.zsh b/zsh/.oh-my-zsh/custom/npm.zsh similarity index 52% rename from npm/npm.zsh rename to zsh/.oh-my-zsh/custom/npm.zsh index 15cee9d..e9d29ac 100644 --- a/npm/npm.zsh +++ b/zsh/.oh-my-zsh/custom/npm.zsh @@ -1,9 +1,13 @@ # Install NPM packages globally without requiring sudo. # Source: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md -NPM_PACKAGES="${HOME}/.npm-packages" -PATH="$NPM_PACKAGES/bin:$PATH" +export NPM_CONFIG_USERCONFIG=$HOME/.config/npm/config +export NPM_CONFIG_CACHE=$HOME/.cache/npm +export NPM_CONFIG_TMP=$XDG_RUNTIME_DIR/npm +export NPM_CONFIG_PREFIX=$HOME/.local/share/npm + +PATH="$NPM_CONFIG_PREFIX/bin:$PATH" # Unset manpath so we can inherit from /etc/manpath via the `manpath` command unset MANPATH # delete if you already modified MANPATH elsewhere in your config -export MANPATH="$NPM_PACKAGES/share/man:$(manpath)" +export MANPATH="$NPM_CONFIG_PREFIX/share/man:$(manpath)" diff --git a/nvim/nvim.zsh b/zsh/.oh-my-zsh/custom/nvim.zsh similarity index 100% rename from nvim/nvim.zsh rename to zsh/.oh-my-zsh/custom/nvim.zsh diff --git a/zsh/steam.zsh b/zsh/.oh-my-zsh/custom/steam.zsh similarity index 100% rename from zsh/steam.zsh rename to zsh/.oh-my-zsh/custom/steam.zsh diff --git a/vitasdk/vita.zsh b/zsh/.oh-my-zsh/custom/vita.zsh similarity index 100% rename from vitasdk/vita.zsh rename to zsh/.oh-my-zsh/custom/vita.zsh diff --git a/zsh/zshrc b/zsh/.zshrc similarity index 100% rename from zsh/zshrc rename to zsh/.zshrc diff --git a/zsh/README.md b/zsh/README.md deleted file mode 100644 index 87b592b..0000000 --- a/zsh/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# ZSH - -* oh-my-zsh. ([source][1]) -* zsh-completions plugin. ([source][2]) - -## Install - -### Main package - -`pacman -S zsh` - -`chsh -s /bin/zsh` - -### oh-my-zsh - -`git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh` - -### zsh-completions plugin - -`git clone https://github.com/zsh-users/zsh-completions - ~/.oh-my-zsh/custom/plugins/zsh-completions` - -## Configuration - -`ln -s ~/.dotfiles/zsh/zshrc ~/.zshrc` - -[1]: https://github.com/robbyrussell/oh-my-zsh -[2]: https://github.com/zsh-users/zsh-completions