From 1016fe4f64ddb280c6e92ca6f3204024bb1dfecb Mon Sep 17 00:00:00 2001 From: Clumsy-Coder <19594044+Clumsy-Coder@users.noreply.github.com> Date: Sun, 8 May 2022 17:51:48 -0600 Subject: [PATCH] docs(readme): update repo README.md --- README.md | 510 +++++++++++++----------------------------------------- 1 file changed, 120 insertions(+), 390 deletions(-) diff --git a/README.md b/README.md index 406c155e..c63fd598 100644 --- a/README.md +++ b/README.md @@ -1,472 +1,202 @@ # dotfiles -terminal config for installing applications and setting up shell config +my configs, settings, installation scripts, etc -Ex: +## Quick start -- installing applications from APT -- Setting up all your custom aliases -- Environment variables -- Vim config -- Tmux config -- Loading plugins for ZSH +```bash +git clone https://github.com/clumsy-coder/dotfiles && cd dotfiles +``` ---- +### Profile installations - - -- [dotfiles](#dotfiles) -- [Quick start](#quick-start) - - [Debian based OS](#debian-based-os) - - [Note: Powerline fonts](#note-powerline-fonts) -- [Directory deepdive](#directory-deepdive) - - [index.sh](#indexsh) - - [alias/](#alias) - - [environment/](#environment) - - [environment.sh](#environmentsh) - - [exports.sh](#exportssh) - - [antigen/](#antigen) - - [exports/](#exports) - - [neofetch/](#neofetch) - - [theme/](#theme) - - [setup/](#setup) - - [debian/](#debian) - - [install.sh](#installsh) - - [programs/](#programs) - - [applist](#applist) - - [gui-based/](#gui-based) - - [terminal-based/](#terminal-based) - - [tools/](#tools) - - [tools.sh](#toolssh) - - [neovim/](#neovim) - - [tmux/](#tmux) - - [tmux.sh](#tmuxsh) - - [hotkeys.tmux.conf](#hotkeystmuxconf) - - [plugins.tmux.conf](#pluginstmuxconf) - - [theme.tmux.conf](#themetmuxconf) - - [tmux.conf](#tmuxconf) - - [vim/](#vim) - - [vim.sh](#vimsh) - - [editor.vim](#editorvim) - - [hotkeys.vim](#hotkeysvim) - - [plugins.vim](#pluginsvim) - - [VimPlug commands](#vimplug-commands) - - [Installing Vim plugins](#installing-vim-plugins) - - [Updating Vim plugins](#updating-vim-plugins) - - [pluginConfig/](#pluginconfig) - - [Directory tree view](#directory-tree-view) - - - -# Quick start - -## Debian based OS - -clone repo in home directory **~** - -`git clone https://github.com/clumsy-coder/dotfiles` - -run install script - -`~/dotfiles/setup/debian/install.sh` - -## Note: Powerline fonts - -The dotfiles .zshrc uses Powerline font for the terminal. This means the terminal used (iterm2, default debian terminal, etc) needs to have their fonts changed that supports powerline fonts. - -Check [install powerline font](https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions#step-2-install-a-powerline-font) - -# Directory deepdive - -What each directory and file is used for +Run a dotbot profile script from `dotfiles/meta/profiles/` folder ---- +[Available profiles](./meta/profiles) -## index.sh - -[`dotfiles/index.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/index.sh) +```bash +./install-profile +``` -The main dotfile index used when starting ZSH. +#### MacOS -It will run in `~/.zshrc` using `source ~/dotfiles/index.sh`. +```bash +./install-profile macos # MacOS ONLY +``` -Will load relevant ENV variables, oh-my-zsh plugins, tools configs (tmux, vim, Powerline, etc) and alias (based on the OS running). +#### Debian -- `~/dotfiles/environment/environment.sh` - - Load Powerline terminal config. - - Load oh-my-zsh plugins - - Load ENV exports based on the OS running -- `~/dotfiles/tools/tools.sh` - - Load tmux config - - Load vim config - - Load neovim config -- `~/dotfiles/alias/alias.sh` - - Load alias based on the OS running +```bash +./install-profile debian-terminal # Terminal configs ONLY +``` -Runs the following: +```bash +./install-profile debian-gui # Gui configs ONLY +``` -- [`~/dotfiles/environment/environment.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/environment.sh). Check [environment.sh](#environmentsh) section. -- [`~/dotfiles/tools/tools.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tools.sh). Check [tools.sh](#tools) section. -- [`~/dotfiles/alias/alias.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/alias/alias.sh). Check [alias.sh](#alias) section. +#### Fedora -## alias/ +```bash +./install-profile fedora-terminal # Terminal configs ONLY +``` -[`dotfiles/alias/alias.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/alias/alias.sh) will load alias commands based on the OS +```bash +./install-profile fedora-gui # Gui configs ONLY +``` -Runs the following: +#### Raspberry Pi (Pi-hole) -- [`dotfiles/alias/debian/alias.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/alias/debian/alias.sh) for debian based OS. -- [`dotfiles/alias/osx/alias.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/alias/osx/alias.sh) for MacOS. +```bash +./install-profile raspberrypi-pihole # Raspberry Pi terminal ONLY +``` --- -## environment/ - -Setting up config for ZSH in runtime. - -### environment.sh - -[`~/dotfiles/environment/environment.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/environment.sh) - -Load config for antigen, oh-my-zsh powerline theme, ENV exports, etc - -Runs shell script when using the terminal: - -- Powerline theme. [`dotfiles/environment/theme/powerlevel9k/powerlevel9k.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/theme/powerlevel9k/powerlevel9k.sh). Check [theme/](#theme) -- Running [`dotfiles/environment/exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports.sh). Check [exports.sh](#exportssh) -- Running [`dotfiles/environment/antigen/antigen.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/antigen/antigen.sh). Check [antigen/](#antigen) - -### exports.sh - -[`dotfiles/environment/exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports.sh) +### Indivdual config installations -Export ENV based on the OS running. +Run indivdual configs from `dotfiles/meta/configs` folder. -- [`dotfiles/environment/exports/debian-exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports/debian-exports.sh) for debian based OS. -- [`dotfiles/environment/exports/osx-exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports/osx-exports.sh) for MacOS. +[Availble configs](./meta/configs) -### antigen/ +NOTE: leave out file extensions -ZSH and oh-my-zsh plugin manager +#### Running a single config -[`dotfiles/environment/antigen/antigen.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/antigen/antigen.sh) - -Does the following: - -- Check if antigen is installed - - If Antigen is NOT installed, download and install Antigen plugin manager -- Load Antigen -- Load oh-my-zsh plugins using Antigen - -### exports/ - -Load ENV variables used based on the OS - -[`dotfiles/environment/exports/debian-exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports/debian-exports.sh) +```bash +./install-standalone +``` -[`dotfiles/environment/exports/osx-exports.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/exports/osx-exports.sh) +Example: -### neofetch/ +```bash +./install-standalone spacevim +``` -Custom config for displaying system information. +#### Running a config with sudo -[`dotfiles/environment/neofetch/config.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/neofetch/config.conf) +NOTE: to run a config as sudo, append `-sudo` to the config being used -Note: By default neofetch WON'T use the config. +```bash +./install-standalone -sudo +``` -To use the config use `neofetch --config ~/dotfiles/environment/neofetch/config.conf` +Example: -### theme/ +```bash +./install-standalone apt-sudo +``` -Powerline theme. Uses Powerlevel9k for oh-my-zsh +#### Running multiple configs -[`dotfiles/environment/theme/powerlevel9k/powerlevel9k.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/environment/theme/powerlevel9k/powerlevel9k.sh) +```bash +./install-standalone ... +``` -NOTE: make sure Powerline font is installed and used by the terminal (ex: iterm2) +Example: -check [Powerline font](#note-powerline-fonts) +```bash +./install-standalone spacevim apt-sudo alacritty +``` --- -## setup/ - -Contains installation files depending on OS. -These are meant to install terminal and/or GUI based applications for the OS. - -### debian/ - -#### install.sh - -Install script to run for debian based OS. - -What [`dotfiles/setup/debian/install.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/setup/debian/install.sh) does - -1. Asks if you wish to install Terminal and GUI based software (outside of APT) -2. Update and upgrade APT packages -3. Install APT packages from [`dotfiles/setup/debian/programs/applist`](https://github.com/Clumsy-Coder/dotfiles/blob/master/setup/debian/programs/applist) -4. Install software outside of APT repos - 1. Install terminal based software. [`dotfiles/setup/debian/programs/terminal-based/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/setup/debian/programs/terminal-based) - 2. Install GUI based software. [`dotfiles/setup/debian/programs/gui-based/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/setup/debian/programs/gui-based) -5. Install Vim plugins -6. Install ZSH and Oh-my-zsh -7. Download default .zshrc from oh-my-zsh (will overwrite existing ~/.zshrc) -8. Source dotfiles ZSH config to ~/.zshrc - 1. `source ~/dotfiles/index.sh` -9. Install oh-my-zsh plugins (done with antigen plugin manager) - -#### programs/ +## How does it work? -##### applist +[dotbot](https://github.com/anishathalye/dotbot) is used to bootstrap and setup dotfiles. -Contains all APT packages to be installed. +This can be used for installing packages, linking config files, creating folder, etc. -[`dotfiles/setup/debian/programs/applist`](https://github.com/Clumsy-Coder/dotfiles/blob/master/setup/debian/programs/applist) +All dotbot files are located in [meta/](./meta/) folder -##### gui-based/ +`install-standalone` script is used to run a config from `dotfiles/meta/configs/` folder. -Contains scripts to install GUI based applications that couldn't be installed using `dotfiles/setup/debian/programs/applist` +Check [meta/configs/](./meta/configs/) for more details -Ex: Installing VScode requires extra work. +`install-profile` script is used to run a collection configs (from `dotfiles/meta/configs/`) defined as profiles in `dotfiles/meta/profiles/` -- Adding VScode PPA -- adding gpg cert -- installing VScode -- installing VScode extensions - -NOTE: [`dotfiles/setup/debian/install.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/setup/debian/install.sh) will run all bashscript files in [`dotfiles/setup/debian/programs/gui-based/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/setup/debian/programs/gui-based) folder - -##### terminal-based/ - -Contains scripts to install terminal based applications that couldn't be installed using `dotfiles/setup/debian/programs/applist` - -Ex: Installing Docker, NodeJS, NVM - -Note: [`dotfiles/setup/debian/install.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/setup/debian/install.sh) will run all bashscript files in [`dotfiles/setup/debian/programs/terminal-based/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/setup/debian/programs/terminal-based) folder +Check [meta/profiles/](./meta/profiles/) for more details --- -## tools/ - -Custom config for specific tools. -Ex: config for Vim, tmux, etc - -### tools.sh - -Runs all the scripts in [`dotfiles/tools/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/tools) sub-folders - -### neovim/ - -Uses Vim config [`dotfiles/tools/vim/.vimrc`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/.vimrc) to run neovim - -### tmux/ - -#### tmux.sh - -[`dotfiles/tools/tmux/tmux.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/tmux.sh) - -Creates a symbolic link of [`dotfiles/tools/tmux/tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/tmux.conf) to `~/.tmux.conf` - -tmux will load the other `.tmux.conf` without the need to copy the files over. - -#### hotkeys.tmux.conf - -Contains all the hotkeys used to operate tmux. - -NOTE: this was made for **iterm2**. At the time this was being developed on **MacOS**. So in order for the hotkeys to work on a debian based terminal, some extra work needs to be done. Such as send extra commands when a specific hotkey is pressed (the terminal catches it and sends out it corresponding hotkeys to the shell). +## File/Folder structure -Check [`dotfiles/tools/tmux/hotkeys.tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/hotkeys.tmux.conf) for more details +
 
-Summary:
+dotfiles/
+├── .github/
+├── meta/
+├── tools/
+├── .gitignore
+├── .gitmodules
+├── .releaserc.js
+├── CHANGELOG.md
+├── install-profile
+├── install-standalone
+├── LICENSE
+├── package.json
+├── README.md
+└── yarn.lock
+
-- **Prefix** is changed to `Ctrl + a` -- **Meta** is changed to `Alt` -- **S** is changed to `Shift` -- Create a vertical pane: `prefix + |` -- Create a horizontal pane: `prefix + -` -- Reload tmux config: `prefix + r` -- Switch active pane - - Go to up pane: `Meta + ↑` - - Go to down pane: `Meta + ↓` - - Go to left pane: `Meta + ←` - - Go to right pane: `Meta + →` -- Resizing active pane - - Resize pane up: `prefix + ↑` - - Resize pane down: `prefix + ↓` - - Resize pane left: `prefix + ←` - - Resize pane right: `prefix + →` -- Switch window of current tmux session - - Switch window left: `shift + meta + ←` - - Switch window right: `shift + meta + →` +### .github/ -#### plugins.tmux.conf +Github CI files -[`dotfiles/tools/tmux/plugins.tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/plugins.tmux.conf) +Check [.github/](.github) -Plugins for tmux. Tmux plugin manager is installed automatically in [`dotfiles/tools/tmux/tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/tmux.conf) +### meta/ -#### theme.tmux.conf +Contains all [dotbot](https://github.com/anishathalye/dotbot) files -Some custom config for tmux theme. +Check [meta/](./meta/) -Using https://github.com/egel/tmux-gruvbox as the main tmux theme. +### tools/ -#### tmux.conf +Contains all application configs. -[`dotfiles/tools/tmux/tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/tmux.conf) +Check [tools/](./tools/) -- Set tmux config. -- Load tmux config - - [`dotfiles/tools/tmux/hotkeys.tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/hotkeys.tmux.conf) - - [`dotfiles/tools/tmux/plugins.tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/plugins.tmux.conf) - - [`dotfiles/tools/tmux/theme.tmux.conf`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/tmux/theme.tmux.conf) -- Load tmux plugin manager - - Download tmux plugin manager **IF** not installed -- Load tmux plugins +### .gitmodules -### vim/ +Contains all git submodules for this repo -Config for Vim. +### .releaserc.js -- Vim editor config -- hotkeys -- plugins -- custom plugin config +Used by npm package semantic-release -#### vim.sh +### CHANGELOG.md -[`dotfiles/tools/vim/vim.sh`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/vim.sh) +Changlog generated by semantic-release-bot -Creates a symbolic link of [`dotfiles/tools/vim/.vimrc`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/.vimrc) to `~/.vimrc` +### install-standalone -#### editor.vim +dotbot script used for running a config located in `dotfiles/meta/configs/`. -[`dotfiles/tools/vim/editor.vim`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/editor.vim) +Check [meta/configs/](./meta/configs/) -Setting basic editor config. Ex +Script obtained from: [dotbot-template/install-standalone](https://github.com/ecarlson94/dotbot-template/blob/main/install-standalone) -- show line number -- set tab size -- setting theme -- using airline powerline font +### install-profile -#### hotkeys.vim +dotbot script used for running a collection of dotbot configs. -[`dotfiles/tools/vim/hotkeys.vim`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/hotkeys.vim) +Script obtained from: [dotbot-template/install-profile](https://github.com/ecarlson94/dotbot-template/blob/main/install-profile) -- Toggle NerdTree with `Ctrl + n` -- Toggle NERDCommenterToggle comments for current line with `Ctrl + /` - - **NOTE:** NERDCommenterToggle uses `//` in normal mode to toggle comments. iTerm2 has hotkey `Ctrl + /` to send `//` to vim +Check [meta/profiles/](./meta/profiles/) -#### plugins.vim +### package.json -[`dotfiles/tools/vim/plugins.vim`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/plugins.vim) - -All the plugins installed for Vim. - -Does the following: - -- Check if VimPlug is installed - - Download VimPlug is its NOT installed -- Load vim plugins -- Load custom plugin configs in [`dotfiles/tools/vim/pluginConfig/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/tools/vim/pluginConfig) folder - -##### VimPlug commands - -Check [VimPlug commands ](https://github.com/junegunn/vim-plug#commands) - -###### Installing Vim plugins - -You can install vim plugins with `:PlugInstall` in vim running under NORMAL mode - -or you can install Vim plugins in **bash, or zsh, etc** with `vim +PlugInstall +qall` - -###### Updating Vim plugins - -You can update vim plugins in vim using `:PlugUpdate` under NORMAL mode - -or you can update Vim plugins in **bash, or zsh, etc** with `vim +PlugUpdate +qall` - -#### pluginConfig/ - -Custom plugin configs to load. - -[`dotfiles/tools/vim/pluginConfig/*`](https://github.com/Clumsy-Coder/dotfiles/tree/master/tools/vim/pluginConfig) - -The files in this folder are being run in [`dotfiles/tools/vim/plugins.vim`](https://github.com/Clumsy-Coder/dotfiles/blob/master/tools/vim/plugins.vim) +Contains npm packages for running semantic-release --- -## Directory tree view +## Inspiration -``` -. -├── alias -│   ├── debian -│   │   └── alias.sh -│   ├── osx -│   │   └── alias.sh -│   └── alias.sh -├── apps -│   ├── debian -│   ├── osx -│   │   ├── README.md -│   │   ├── applist -│   │   ├── casklist -│   │   └── taplist -│   └── README.md -├── environment -│   ├── antigen -│   │   └── antigen.sh -│   ├── exports -│   │   ├── debian-exports.sh -│   │   └── osx-exports.sh -│   ├── images -│   │   ├── one-punch-man-ok-rs.jpg -│   │   └── one-punch-man.png -│   ├── neofetch -│   │   └── config.conf -│   ├── theme -│   │   └── powerlevel9k -│   │   └── powerlevel9k.sh -│   ├── environment.sh -│   └── exports.sh -├── setup -│   └── debian -│   ├── programs -│   │   ├── gui-based -│   │   │   └── vscode.sh -│   │   ├── terminal-based -│   │   │   ├── docker.sh -│   │   │   ├── node.sh -│   │   │   └── nvm-npm-node-packages.sh -│   │   └── applist -│   └── install.sh -├── tools -│   ├── neovim -│   │   ├── init.vim -│   │   └── neovim.sh -│   ├── tmux -│   │   ├── hotkeys.tmux.conf -│   │   ├── plugins.tmux.conf -│   │   ├── theme.tmux.conf -│   │   ├── tmux.conf -│   │   └── tmux.sh -│   ├── vim -│   │   ├── pluginConfig -│   │   │   ├── nerdcommenter.config.vim -│   │   │   └── nerdtree.config.vim -│   │   ├── editor.vim -│   │   ├── hotkeys.vim -│   │   ├── plugins.vim -│   │   └── vim.sh -│   └── tools.sh -├── CHANGELOG.md -├── LICENSE -├── README.md -├── index.sh -├── package.json -└── yarn.lock - -23 directories, 43 files +- [Dotfiles in 100 seconds](https://www.youtube.com/watch?v=r_MpUP6aKiQ) by Firship + - [eieioxyz/dotfiles_macos](https://github.com/eieioxyz/dotfiles_macos) Brief intro to Dotbot +- [anishathalye/dotbot](https://github.com/anishathalye/dotbot) A tool that bootstraps your dotfiles ⚡️ +- [ecarlson94/userspace](https://github.com/ecarlson94/userspace) Build dev container using dotfiles +- [ecarlson94/dotbot-template](https://github.com/ecarlson94/dotbot-template) Template repository for advanced Dotbot setup +- [ecarlson94/dotfiles](https://github.com/ecarlson94/dotfiles) ecarlson94's dotfiles and machine setup scripts. -``` +---