My configurations and shell scripts.
Currently, it is only a personal workplace rather than a framework. So you should FORK the REPO first before using it.
- Environments
- Dependencies
- Features
- Preview
- Installation
- Configuration
- Usage
- File Structure
- Bash initialization process
- Bash-it Enables/Disables
- Customize your Bash
- Version
- Suggestion, Bug Reporting, Contributing
- Copyright and License
- iTerm2 Build 3.0.14 (Terminal.app compatible)
- GNU bash 4.4.12(1)-release (x86_64-apple-darwin15.6.0) (GNU bash v3 compatible)
- Tmux 2.3 (Not necessary. Tmux compatible)
- git: It is required. Make sure it available before installation.
- git-prompt: If omitted, PS1 will not show git prompt.
- dotbot: To create symbolic links and manage the map via
install.conf.yaml
. There is no need to install dotbot manually. It is a part of this repo. - bash-it (modified version): To manage all shell scripts in modules: aliases, plugins, completions and shell appearance theme. It is required. Make sure it available before installation.
- Manage collections of dotfiles via dotbot. See the configuration.
- Manage shell scripts/completions/aliases/plugins by modules via bash-it.
- Most features are implemented in separate plugins, which could be disabled by yourself.
- All my plugins are put in
bash-custom/
folder. And some enabled plugins provided by bash-it. Refer to Bash-it Enables/Disables. - Compatible with bash-completion (for bash 3.x) and bash-completion2 (for bash 4.x). See the configuration
- Auto-execute specific scripts for different system (ubuntu/macos and so on).
- Responsive and pretty PS1, and personalized theme
π¬
. Refer to Preview. - Collections of shell commands, which locates in
bin/
directory. Refer to Binary executables. - Manage sub commands, which locates in
bin/sub/
directory. The manage framework is modified from sub.- Default
SUB_NAME=a
οΌpressa help
to see help. You can modify the enterpoint (SUB_NAME) in Plugin: sub.plugin.bash - Refer to Sub-commands for more.
- Default
- My best practices for shell (bash).
- My best practices for todo.cli.
- My best practices for neovim. See the configuration.
- My best practices for tmux. See the configuration.
- My best practices for git. See the configuration.
- My cheat sheets based on chrisallenlane/cheat.
- Maintain your classified data in
secrets/
folder, which is ignored by git. Refer to Secret Data. - Integrated with spencertipping/cd.
- Integrated with fzf. See the configuration.
Responsive UI (Adjust with window width). No need to restart Terminal. Only press Enter:
Highlight Backgound jobs:
Use sub commands:
# Clone this repo
DOTFILE_DIR=~/dotfiles
git clone --depth 1 --recursive https://github.com/adoyle-h/dotfiles.git $DOTFILE_DIR
# Install bash_it framework which is required
git clone --depth 1 https://github.com/adoyle-h/bash-it ~/.bash_it
~/.bash_it/install.sh --no-modify-config
${DOTFILE_DIR}/bash_it/reset.sh
# Put your classified data in `secrets/` folder
mkdir -p ${DOTFILE_DIR}/secrets
# cheat is optional
git clone --depth 1 https://github.com/adoyle-h/my-command-cheat.git ${DOTFILE_DIR}/cheat
# neovim-config is optional
git clone --depth 1 --recursive https://github.com/adoyle-h/neovim-config.git ${DOTFILE_DIR}/nvim
# spencertipping/cd is optional
mkdir -p ~/.cd && git clone --depth 1 https://github.com/spencertipping/cd.git ~/.cd/core
# check `install.conf.yaml` file
# make soft-links for dotfiles
./install
# checkout the output
And then read the Configuration - Modifications by yourself section.
These parts of below files you should modify:
./configs/gitconfig:
[user]
name = <your-username>
email = <your-email>
$TERM
should be xterm-256color
or screen-256color
for best appearance.
- Font: DejaVuSansMonoForPowerline Nerd Font Book
- Color Scheme: Deep. Installation Instructions
Edit the install.conf.yaml
file.
IT IS UNDER DEVELOPMENT. DO NOT USE!
Run ./bootstrap
to initialize in a new environment.
Do not call the script under sudo.
Run ./install
to create symbolic links.
Do not call the script under sudo.
.
βββ README.md
βββ bash/
β βββ bash_profile # Link to ~/.bash_profile
β βββ bashrc # Link to ~/.bashrc
β βββ inputrc # Link to ~/.inputrc
β βββ profile # Link to ~/.profile
βββ bash-custom/ # your bash scripts
β βββ Debian/ # bash scripts for Linux Debian
β β βββ core.bash
β βββ aliases.shell.bash # same to bash_it aliases
β βββ available/ # Custom available bash scripts
β β βββ zzz_last_cd.plugin.bash # Ensure the plugin should be loaded at last
β βββ bash_4.plugin.bash
β βββ cheat.plugin.bash
β βββ completions.shell.bash # same to bash_it completions
β βββ editor.env.bash
β βββ enabled/ # Custom enabled bash scripts
β β βββ zzz_last_cd.plugin.bash -> ../available/zzz_last_cd.plugin.bash
β βββ env.shell.bash
β βββ functions.shell.bash # same to bash_it lib
β βββ fzf.plugin.bash
β βββ gvm.plugin.bash
β βββ lesspipe.plugin.bash
β βββ Macos/ # bash scripts for Macos
β β βββ core.bash
β βββ optionals.shell.bash # Shell Optional Behavior settings
β βββ path.env.bash # change environment variable PATH
β βββ proxy.env.bash # application proxy settings
β βββ secrets.env.bash -> ../secrets/secrets.env.bash
β βββ system-detect.shell.bash # detect system and run its bash scripts
β βββ themes/ # the bash_it theme
β β βββ π¬/
β β βββ π¬.theme.bash
β βββ tmux.plugin.bash
β βββ variables.shell.bash # Shell Variables settings
β βββ xcode.plugin.bash
βββ bash_it/ # https://github.com/Bash-it/bash-it#your-custom-scripts-aliases-themes-and-functions
β βββ aliases.bash
β βββ completions.bash
β βββ enable.bash # bash_it configuration and entrance
β βββ lib.bash # Reset $PATH and $MANPATH, and set common functions
β βββ plugins.bash
β βββ reset.sh # custom reset bash-it aliases/plugins/completions
βββ bin/ # link to ~/bin
β βββ sub/ # Collections of sub commands
β βββ sub-bin* # Sub main file
β βββ a -> ./sub-bin # Enterpoint of sub commands
βββ bootstrap -> ./bootstrap.bash*
βββ bootstrap.bash*
βββ cheat/ # It is ignored in git. git clone https://github.com/adoyle-h/my-command-cheat cheat
βββ completions/ # bash completions
βββ configs/ # application configuration
βββ dotbot/ # https://github.com/anishathalye/dotbot
βββ install*
βββ install.conf.yaml # dotbot configuration
βββ nvim/ # neovim configuration. It is ignored in git. git clone https://github.com/adoyle-h/neovim-config nvim
βββ secrets/ # Put your sensitive data here. It is ignored in git. mkdir secrets
βββ secrets.env.bash
It will generally execute these scripts in order:
- bash/bashrc
- bash_it/enable
- bash_it framework
- bash_it/{lib,aliases,completions,plugins}
- bash-custom/*.bash
- system-detect.shell.bash
- Macos/*.bash
- Debian/*.bash
- system-detect.shell.bash
- bash-custom/enabled/*.bash
The aliases/plugins/completions I enabled could be referred in bash_it/reset.sh
.
All your own plugins should be put in bash-custom/
.
Sometimes, you could modify the files in bash_it/
for prior execution.
You should leave the bash/
folder alone. DO NOT CHANGE ANYTHING IN IT.
All your own binary executables should be put in bin
folder.
These executables could also be put in bin/sub/
which is included in $PATH
,
and it could be referred as sub-command. Example:
a help
a comments
a 256color
All sub-commands are auto-completed. Type a <Tab>
to see all sub-commands.
Type ll bash-custom/secrets.env.bash
, and you will see that:
bash-custom/secrets.env.bash@ -> ../secrets/secrets.env.bash
So, you could maintain your classified data in secrets/secrets.env.bash
.
The secrets/
folder is ignored by git. You could put anything in this folder.
No version yet
Sorry, the project is a personal project which do not accept any Pull Requests. You could fork the repo to build your own project.
Any comments and suggestions are always welcome. Please open an issue to contact with me.
Copyright (c) 2017 ADoyle. The project is licensed under the BSD 3-clause License.
See the LICENSE file for the specific language governing permissions and limitations under the License.
See the NOTICE file distributed with this work for additional information regarding copyright ownership.