This is my custom ZSH configuration. It uses antidote to install ZSH plugins.
- zshbop
- Installation
- Custom Configuration File
- Commands/Aliases
- Installation Notes
- Font Installation Notes
- ZSH Installation Issues
- Issues
- ToDo Found markers
Created by gh-md-toc
zshbop is a frankenstien project to improve my own workflow. It utilizes a number of third party software an scripts. At the core the following are used.
- Oh My ZSH
- Antidote
- Antigen
- Powerlevel10k
- Customized Powerlevel10k prompt
- A knowledge base of common topics
- A library of alises, functions for common tasks for various workflows around the following.
- Cloudflare
- Docker
- Git
- WordPress
- Linux
- AWS
- curl
- php
- main - production releases, fully functional.
- next-release - Next release branch, may be broken.
Ive designed zshbop to have a number of commands
These commands are available as just commands in the shell
help
- zshbop help screeninit
- Initialize zshbopkb
- Knowledge Basemotd
- Print out motdos
- Return OSreport
- Print out errors and warningsrepos
- Install popular github.com repositories.
These commands are shortened aliases for zshbop commands
zb
- zshbop main command and list of commandszbd
- Change directory to $ZBRzbqr
- Quick reload zshbopzbr
- Reload zshbopzbu
- Update zshbopzbuf
- Update and reset zshbopzbuqr
- Update and quick reload zshbopzbur
- Update and reload zshbop
zb
- zshbop main command and list of commandszb branch
- Switch between main and next-release branchzb cache-clear
- Clear cache for antigen + morezb cache-clear-super
- Clear everything, including zsh autocompletionzb check
- Check environment for installed software and toolszb check-system
- Print out errors and warningszb check-updates
- Check for zshbop update, not completed yetzb cleanup
- Cleanup old thingszb custom
- Custom zshbop configurationzb custom-load
- Load zshbop custom configzb debug
- Turn debug on and offzb formatting
- List variables for using colorzb help
- zshbop help screenzb install-env
- Install environment toolszb issue
- Create zshbop issue on Githubzb reload
- Reload zshbopzb report
- Print out errors and warningszb update
- Update zshbopzb version
- Get version information
There is an included install.sh bash script that will guide you through the installation process. It will ask you questions and install the required packages, such as zsh which is a requirement.
Install Method | Command |
---|---|
Quick Install | bash <(curl -sL https://zshrc.pl) |
Fallback Install | bash <(curl -sL https://raw.githubusercontent.com/jordantrizz/zshbop/master/install.sh) |
Next Release Install | bash <(curl -sL https://raw.githubusercontent.com/jordantrizz/zshbop/next-release/install.sh) |
Usage: install -h|-s (clean|skipdeps|default|home|git|)|(custom <branch> <location>)
Options
-h - This help screen
-s - Skip all dependencies
-o - Skip optional software check
-d - Debug mode
Commands
clean - Remove zshbop
default - Default install
home - Install in home directory
git - Install in ~/git with dev branch
custom <branch> <location> - Custom install
Custom Install: * Note: Custom install skips optional software check
branch (main|next-release)
location (home|system|git)
- home = $HOME/zshbop
- systen = /usr/local/sbin/zshbop
- git = $HOME/git/zshbop
bash <(curl -sL https://zshrc.pl) custom main home
bash <(curl -sL https://zshrc.pl) custom next-release system
bash <(curl -sL https://zshrc.pl) custom main git
bash <(curl -sL https://zshrc.pl) -o custom next-release system
The most important part of zshbop is the powerlevel10k prompt, which requires a specific font. With Powerline10k you need patched font files. The patch font files are "MesloLGS NF" and are located on the following Github repository.
As per the font.md file above.
Automatic font installation If you are using iTerm2 or Termux,
p10k configure
can install the recommended font for you. Simply answer Yes when asked whether to install Meslo Nerd Font.
cp fonts/* ~/Library/fonts
N/A
Then use the windows_terminal.json
in this repository.
There is an issue with some of the Powerline fonts I downloaded and installed in windows. So I opted for this set of fonts using a script in a GIST https://gist.github.com/romkatv/aa7a70fe656d8b655e3c324eb10f6a8b
You can simply run this command within WSL
bash -c "$(curl -fsSL https://gist.githubusercontent.com/romkatv/aa7a70fe656d8b655e3c324eb10f6a8b/raw/install_meslo_wsl.sh)"
You can create a custom configuration file to override zshbop settings and variables. This is useful if you want to use a different plugin manager or override zshbop settings.
Copy .zshbop.config.example
to $HOME/.zshbop.config
and modify as needed.
Variable | Description | Values | Default |
---|---|---|---|
ZSHBOP_ROOT |
Location of zshbop installation | String | Detected |
ZSHBOP_CUSTOM_SSHKEY |
Set a custom SSH key to be loaded | String | Detected |
ZSHBOP_PLUGIN_MANAGER |
Override plugin manager, can be init_antidote or init_anitgen | String | init_antidote |
ZSHBOP_GIT_CHECK |
zshbop git check on logout, this will run and will $GIT_HOME for any repositories that have uncommited code. | Number | 1 |
GIT_HOME |
A location where you have all your git repositories. | String | $HOME/git |
ZSHBOP_UPDATE_GIT |
Git Repositores to update when running zshbop update | Array | ${HOME}/git/cloudflare-cli ${GIT_HOME}/plik |
ZSH_IP_PROVIDER |
IP Provider for zshbop | String | eg. ipinfo.io |
ZSH_IP_API_KEY |
API Key for ip-info commmand | String |
- Exbin https://exbin.call-cc.be
Variable | Description | Values | Default |
---|---|---|---|
EXBIN_TYPE |
Choose either netcat or api for exbin posting. |
String | netcat |
EXBIN_HOST |
Exbin host, for netcat just the hostname and for api the full URL. | String | exbin.call-cc.be |
EXBIN_PORT |
If you don't use the standard 9999 port for exbin. | Number | 9999 |
You can create a custom startup script to run when zshbop starts. This is useful if you want to run a script that's not included in zshbop.
Uncomment the following in $HOME/.zshbop.config
function init_custom_startup () {
}
Nothing at this time!
Windows Terminal is a means to manage the various terminals installed in Windows.
- WSL
- Command Prompt
- Powershell
- Custom Powershell (Azure + Exchange)
You'll need the WSL Subsystem installed.
- Open PowerShell as Administrator and run
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Open a command prompt on Windows 10 and run the following command to confirm what version of WSL you're running.
wsl --list --verbose
I used this guide https://www.tenforums.com/tutorials/164301-how-update-wsl-wsl-2-windows-10-a.html
- Upgrade WSL via elevated PowerShell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Install VMP via elevated PowerShell. The following enables the Virtual Machine Platform. This is important for WSL 2 for some reason. https://docs.microsoft.com/en-us/windows/wsl/faq#does-wsl-2-use-hyper-v--will-it-be-available-on-windows-10-home-
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Restart your Computer
- Set WSL to version 2
wsl --set-default-version 2
- Convert your existing linux distro from WSL 1 to 2
wsl --set-version <distro_name> 2
Note: If you have an error converting your distro, look at this thread microsoft/WSL#4929
If you want to run Xserver for a GUI under WSL, this guide will help.
sudo yum update -y
sudo yum install -y git make ncurses-devel gcc autoconf man yodl
git clone -b zsh-5.7.1 https://github.com/zsh-users/zsh.git /tmp/zsh
cd /tmp/zsh
./Util/preconfig
./configure
sudo make -j 20 install
All issues are makred with @@ISSUE
and need to be addressed.
- Place all included files into directory inc
- Check for ssh-key id_rsa if chmod 600 and if not ask to do it.
- If any packages aren't installed ask to install them.
- Flight check command to confirm what's setup and isn't, check packacges installed.
- Borrow or steal https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/upgrade.sh
- Install jq and md5sum via brew for macos
- Figure out FZF wget https://github.com/junegunn/fzf-bin/releases/download/0.17.4/fzf-0.17.4-linux_amd64.tgz
- Look into diff so fancy wget https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy
- Add https://github.com/skx/sysadmin-util.git
- Devise method to override antidote and antigen plugins.
- Look into these plugins
antigen bundle wfxr/forgit
antigen bundle djui/alias-tips
antigen bundle desyncr/auto-ls
antigen bundle MikeDacre/careful_rm
antigen bundle viasite-ansible/zsh-ansible-server
antigen bundle micha/resty
https://github.com/horosgrisa/mysql-colorize
https://github.com/thetic/extract.git
https://github.com/picatz/hunter
https://github.com/ExplainDev/kmdr-cli
https://github.com/daveearley/cli.fyi
https://github.com/tldr-pages/tldr
https://github.com/isacikgoz/tldr