This repository provides a comprehensive .bashrc
configuration along with supporting scripts and configuration files to enhance your terminal experience in Unix-like operating systems. It configures the shell session by setting up aliases, defining functions, customizing the prompt, and more, significantly improving the terminal's usability and power.
- Installation
- Uninstallation
- Configuration Files
- Key Features
- Advanced Functions
- System-Specific Configurations
- Conclusion
To install the .bashrc
configuration, execute the following commands in your terminal:
git clone --depth=1 https://github.com/ChrisTitusTech/mybash.git
cd mybash
./setup.sh
The setup.sh
script automates the installation process by:
- Creating necessary directories (
linuxtoolbox/mybash
) - Cloning the repository
- Installing dependencies (bash-completion, neovim, starship, fzf, zoxide)
- Installing the MesloLGS Nerd Font required for the prompt
- Linking configuration files (
.bashrc
andstarship.toml
) to your home directory - Setting up additional utilities like
fastfetch
Ensure you have the required permissions and a supported package manager before running the script.
To uninstall the .bashrc
configuration, run:
cd mybash
chmod +x uninstall.sh
./uninstall.sh
The uninstall.sh
script reverses the installation process by:
- Removing installed dependencies
- Uninstalling fonts
- Removing symbolic links to configuration files
- Deleting the
linuxtoolbox
directory - Cleaning up additional utilities like
starship
,fzf
, andzoxide
After running the script, it's recommended to restart your shell to apply the changes.
The .bashrc
file defines aliases, functions, and environment variables to enhance your shell experience. Key features include:
- Aliases: Shortcuts for common commands (e.g.,
alias cp='cp -i'
) - Functions: Custom functions for tasks like extracting archives and copying files with progress
The starship.toml
file configures the Starship prompt, providing a highly customizable and informative shell prompt. It includes:
- Theme Settings: Defines colors and symbols for different prompt segments
- Module Configurations: Customizes modules like
python
,git
,docker_context
, and various programming languages - Format Customization: Structures the layout and truncation of paths for a cleaner look
The config.jsonc
file configures fastfetch, a system information tool. It includes:
- Logo and Display Settings: Customizes the appearance of system logos and separators
- Modules: Defines which system information modules to display, such as CPU, GPU, OS, kernel, and uptime
- Custom Sections: Adds custom formatted sections for hardware and software information
-
Aliases and Functions
- Shortcuts for common commands
- Custom functions for complex operations (e.g., extracting archives, copying with progress)
-
Prompt Customization and History Management
- Configures PROMPT_COMMAND for automatic history saving
- Manages history file size and handles duplicates
-
Enhancements and Utilities
- Improves command output readability with colors
- Introduces safer file operations (e.g., using
trash
instead ofrm
) - Integrates Zoxide for easy directory navigation
-
Installation and Configuration Helpers
- Auto-installs necessary utilities based on system type
- Provides functions to edit important configuration files
- System information display
- Networking utilities (e.g., IP address checks)
- Resource monitoring tools
- Editor settings (NeoVim as default)
- Conditional aliases based on system type
- Package manager-specific commands
This .bashrc
configuration offers a powerful and customizable terminal environment suitable for various Unix-like systems. It enhances productivity through smart aliases, functions, and integrated tools while maintaining flexibility for system-specific needs. Whether you're a developer, system administrator, or power user, this setup aims to make your terminal experience more efficient and enjoyable.
For any issues, suggestions, or contributions, please open an issue or pull request in this repository. We welcome community involvement to make this configuration even better!