All Projects → adoyle-h → dotfiles

adoyle-h / dotfiles

Licence: BSD-3-Clause license
An elegant way to manage dotfiles, commands, completions, configurations for terminal players.

Programming Languages

shell
77523 projects
perl
6916 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to dotfiles

.tmux
🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
Stars: ✭ 15,594 (+57655.56%)
Mutual labels:  tmux, configuration
Tmux Powerline
A hackable statusbar for tmux consisting of dynamic & beautiful looking segments, inspired by vim-powerlline, written purely in bash.
Stars: ✭ 2,802 (+10277.78%)
Mutual labels:  tmux, configuration
tmux-conf
📝 TMUX Configuration for nerds with tpm
Stars: ✭ 31 (+14.81%)
Mutual labels:  tmux, configuration
Tmux Config
📗 Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.
Stars: ✭ 1,633 (+5948.15%)
Mutual labels:  tmux, configuration
dotfiles
Linux configuration files (dotfiles) and some useful scripts
Stars: ✭ 22 (-18.52%)
Mutual labels:  tmux, configuration
nvim configration
Neovim diy develop enviroment.This project integrates neovim tmux zsh and some very useful plugs of them including YouCompleteMe FZF auto pairs nerdtree ncm2 and so on.
Stars: ✭ 22 (-18.52%)
Mutual labels:  tmux, configuration
configuration
Config files
Stars: ✭ 12 (-55.56%)
Mutual labels:  tmux, configuration
protoconfig
ProtoConfig 1.0: Open Standard for using, defining, and consuming software configuration input in a unified way.
Stars: ✭ 24 (-11.11%)
Mutual labels:  configuration
appear
reveal terminal programs in the gui
Stars: ✭ 29 (+7.41%)
Mutual labels:  tmux
dart environment config
Environment specific config generator for Dart and Flutter applications during CI/CD builds
Stars: ✭ 87 (+222.22%)
Mutual labels:  configuration
tdab
Create side and top bars in tmux easily, along with a "devour" style command.
Stars: ✭ 14 (-48.15%)
Mutual labels:  tmux
setset
Powerful Incremental Type-driven Settings Engine.
Stars: ✭ 20 (-25.93%)
Mutual labels:  configuration
myconfig
my Linux Configuration
Stars: ✭ 23 (-14.81%)
Mutual labels:  configuration
Database-Naming-Convention
Database Naming Conventions & Best Practices
Stars: ✭ 76 (+181.48%)
Mutual labels:  best-practices
dotfiles
My configuration files
Stars: ✭ 24 (-11.11%)
Mutual labels:  tmux
ESP DoubleResetDetector
ESP_DoubleResetDetector is a library for the ESP32/ESP8266 Arduino platform to enable trigger configure mode by resetting twice.
Stars: ✭ 34 (+25.93%)
Mutual labels:  configuration
dashlord
The best-practices Dashboard
Stars: ✭ 41 (+51.85%)
Mutual labels:  best-practices
dotfiles-local
Personal configuration
Stars: ✭ 16 (-40.74%)
Mutual labels:  tmux
react-ssr-starter
🔥 ⚛️ A React boilerplate for a universal web app with a highly scalable, offline-first foundation and our focus on performance and best practices.
Stars: ✭ 40 (+48.15%)
Mutual labels:  best-practices
dotfiles
PJ's dotfiles - There are many like it but this one is mine
Stars: ✭ 24 (-11.11%)
Mutual labels:  tmux

Awesome Bash Dotfiles

An elegant way to manage dotfiles, commands, completions, configurations for terminal players.

Make Bash Great Again!

Currently, it is only a personal workplace rather than a framework. So you should FORK the REPO first before using it. The framework is coming soon.

TOC

Environments

  • iTerm2 Build 3.0.14 (Terminal.app compatible)
  • GNU bash 4.4+ and 5.0+ (Not support Bash 4.3 and lower versions)
  • Tmux 2.7+ (Not necessary. Tmux compatible)
  • MacOS Intel Arch
  • MacOS ARM Arch
  • Linux/Unix system
  • 🚫 Windows system
  • 🚫 Zsh. This project is just for Bash players. Zsh players should use Oh My Zsh.

Features

Preview

preview.png

The prompt is implemented by a-bash-prompt. See ./plugins/prompt.bash.

Responsive prompt. Press Enter to auto adjust with window width.

responsive-prompt.png

Show last command exit status

exit-status.png

Highlight Backgound jobs:

jobs-labels.png

Use sub commands:

sub-commands.jpeg

Version

See releases.

Core Dependencies

  • python: It is required. Make sure it available before installation. Python 2 and 3 are both supported.
  • 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 them by dotbot.conf.yaml. No need to install it manually. It is a submodule of project.

Optional Integrations

These integrations are not required for the project. It will improve the experience of terminal. Install them by yourself.

Related Projects

  • dotbot: A tool that bootstraps your dotfiles.
  • lobash: A modern, safe, powerful utility library for Bash script development.
  • a-bash-prompt: A Bash prompt written by pure Bash script.
  • bash-sensible: An attempt at saner Bash defaults.
  • neovim: Vim-fork focused on extensibility and usability
  • neovim-config: My neovim config

Inspired By

  • sub: A delicious way to organize programs created by basecamp. But no more maintained.
  • bash-it: A community Bash framework.

Installation

# Set your Dotfiles directory path
DOTFILES_DIR=~/dotfiles

git clone --depth 1 https://github.com/adoyle-h/dotfiles.git $DOTFILES_DIR

$DOTFILES_DIR/install

And then read the Configuration - User Modifications section.

Bootstrap

IT IS UNDER DEVELOPMENT. DO NOT USE!

Run ./bootstrap to initialize in a new environment.

Do not call the script under sudo.

Configuration

User Modifications

These parts of below files you should modify.

./configs/gitconfig:

cd $DOTFILES_DIR
mkdir ./secrets
cat <<EOF >./secrets/gitconfig.user
[user]
    name = your name
    email = your email
EOF

UI

$TERM should be xterm-256color or screen-256color for best appearance.

Install the font DejaVuSansMonoForPowerline Nerd Font and color scheme Deep (color scheme - installation) by yourself.

Soft-links

Edit the files in dotbot.conf/.

Usage

bashrc

The bashrc file is managed by yourself. You must export DOTFILES_DIR points to dotfiles directory.

For example,

# ~/.bashrc: executed by bash(1) for non-login shells.

# Only execute this file once
[[ -n "${_BASHRC_LOADED:-}" ]] && return
_BASHRC_LOADED=true

export DOTFILES_DIR=$HOME/dotfiles
readonly DOTFILES_SUB=a
source "$DOTFILES_DIR/bash/entry.bash"

Binary executables

All your own binary executables should be put in bin folder, which has been added to $PATH.

Sub-commands

Executable commands could be put in bin/sub/ . These commands are referred as sub-commands. For example,

  • a help to show help information
  • a bins to show all commands in ./bin/
  • a commands to show all commands in ./bin/sub/
  • a config DEBUG=on and a config DEBUG=off to open/close debug mode

All sub-commands are auto-completed. Type a <Tab> to see all sub-commands.

You can change the trigger word a to other word by setting readonly DOTFILES_SUB=<trigger_word> in bashrc. If DOTFILES_SUB not set, it defaults to DOTFILES_SUB=sub-bin.

The path bin/sub/ is not included in $PATH. So you cannot invoke sub-commands directly.

Enable custom plugins

The framework provides many custom plugins, aliases, completions. and some sub-commands to manage them.

  • a enable <type> <name>... to enable plugins in plugins/
  • a disable <type> <plugin-name>... to disable plugins in enabled/
  • a disable-all <type> to disable all plugins in enabled/
  • a list <type> to show all enabled plugins in enabled/
  • a list <type> -a to show all plugins in plugins/

Plugin Load Priority

Put # BASH_IT_LOAD_PRIORITY: <PRIORITY> at the head of script to set loading priority. The priority defaults to 500.

General priorities of plugs:

  • Plugin: 300~499, default 400
  • Completion: 500~699, default 600
  • Alias: 700~899, default 800

File Structure

.
├── README.md
├── aliases/                        # Available aliases
├── bash/
│   ├── inputrc                     # Set shortcut Key Character Sequence (keyseq). Link to ~/.inputrc
├── bash/
│   ├── bash_it.lib.bash            # Store essential helper functions for all dotfiles modules
│   ├── bash_profile                # Link to ~/.bash_profile
│   ├── bashrc                      # Link to ~/.bashrc
│   ├── bashrc.failover.bash        # failover for ~/.bashrc
│   ├── check-environment.bash
│   ├── debug.bash
│   ├── enable-plugs.bash
│   ├── entry.bash                  # The entrypoint of dotfiles
│   ├── failover.bash
│   ├── inputrc                     # Link to ~/.inputrc
│   ├── plugable.bash
│   ├── profile                     # Link to ~/.profile
│   ├── sub.bash                    # The entrypoint of SUB command
│   └── xdg.bash                    # Set XDG_ variables
├── bin/                            # Link to ~/bin
├── bootstraps/                     # Scripts for bootstraping
│   └── recommended_plugs*          # Enabled recommended plugins/completions/aliaes
├── bootstrap*                      # (WIP) To install dotfiles framework and system tools from bare system
├── install*                        # To install dotfiles framework
├── cheat/                          # It is ignored in git. git clone https://github.com/adoyle-h/my-command-cheat cheat
├── completions/                    # Available completions
├── configs/                        # Application configuration
├── docs/                           # The documents of this project
├── dotbot*                         # Create soft-links based on dotbot.conf.yaml
├── dotbot.conf                     # Dotbot configurations
│   ├── debian-server.yaml          # For Debian Server
│   ├── debian.yaml                 # For general Linux system
│   └── macos.yaml                  # For MacOS system
├── deps/                           # Git submodules
│   ├── a-bash-prompt/              # https://github.com/adoyle-h/a-bash-prompt
│   ├── dotbot/                     # https://github.com/anishathalye/dotbot
│   ├── nvim/                       # My neovim configurations.
│   ├── z.lua/                      # https://github.com/skywind3000/z.lua
│   ├── colors.bash
│   ├── dotfiles_l.bash             # Similar to lobash.bash. Work for dotfiles scripts.
│   └── lobash.bash                 # https://github.com/adoyle-h/lobash
├── enabled/                        # Enabled plugins/completions/aliases. soft-link files
│   └── 140---shell.plugin.bash -> ../plugins/shell.bash
├── plugins/                        # Available plugins
│   ├── completions.bash            # General completions and tab complete keymap
│   ├── preexec.bash                # Enable bash-preexec library
│   └── prompt.bash                 # Enable a-bash-prompt
├── runtime/                        # Available plugins
│   └── bash_config.bash            # Dotfiles runtime config
└── secrets/                        # This folder is ignored by git. Put your secret data here.

Bash initialization process

It will execute scripts in order:

  1. ./bash/bashrc
  2. ./bash/entry.bash
  3. ./enabled/*.bash

Advanced Usage

If you want to extend the framework. See this document.

There are many tricks you may be interested.

Suggestion, Bug Reporting, Contributing

Any comments and suggestions are always welcome. Please open an issue to contact with me.

Copyright and License

Copyright (c) 2017-2022 ADoyle ([email protected]). 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].