The purpose of this is to create a consistent bash experience across multiple devices that run bash; MacOS, Ubuntu, Raspbian, Windows 10 (WSL).
This was initially inspired by Mathias Bynens' dotfiles.
This is a WIP and is how I set up my systems but could be used for your systems.
$ git clone https://github.com/camalot/symmetry.git && cd symmetry && bash bootstrap.sh
Run the system application install (bundle is optional).
$ symmetry install [bundle]
Run the initialization scripts (this happens automatically when bootstrapped).
$ symmetry init
Set the prompt to one of the defined prompts (currently only default
).
$ symmetry set-prompt [prompt]
Get the prompt that is currently loaded by Symmetry.
$ symmetry get-prompt
List out the available action groups, or actions in a group available for load
.
$ symmetry list [action_group]
Load an action group, or a single action in a group
$ symmetry load action_group [action]
-
..
:cd ..
...
:cd ../..
....
:cd ../../..
.....
:cd ../../../..
~
:cd ~
-
:cd -
-
dl
:~/Downloads
dt
:~/Desktop
dev
:~/Development
g
:git
got
:git
gitpush
:git push
This exists because I constantly type this without the space.nom
:npm
h
:history
j
:jobs
n
:nano
epoch
: unix timeversion
: bash versionreload
: reload the login shellpath
: list all paths in$PATH
map
: intuitive mapping functionupdate
: run system updates (varies per system)whatsmyip
: get public ip addressips
: get ip addressesifactive
: show active network interfacesurlencode
: url encode a stringweek
: get week numbertimer
: a stop watchsniff
: view http traffichttpdump
: dump http traffic
adb
repo
awscli
bash
brew
bundler
defaults
docker
docker-compose
docker-machine
dotnet
gem
git
git-flow
gradle
grunt
gulp
hub
kubectl
makefile
maven
npm
nvm
packer
pip
pip3
powershell
rake
sdkman
ssh
symmetry
terraform
test-kitchen
vagrant
vault
virtualbox
virtualenv
Extras are a set of scripts that you can use to configure your system for settings that you do not want checked in to source control.
Only extras/default.bash
is checked in to source, everything else in this directory is ignored.
Example:
extras/git.bash
git config --global user.name "John Q. Public";
git config --global user.email "[email protected]";
Initializers run on bootstrap, and on launch of bash shell. This can be used to do initalization of symlinks or making sure that ruby environment is configured. system.*.bash
, default.bash
, and *.default.bash
will NOT run automatically
- CKB NEXT (macOS)
- dotnet
- bash
- nodejs
- octoprint (raspberry pi)
- powershell
- python3
- ruby
- screenfetch
- sdkman
- subsonic (music streaming server)
- tldr
- webmin (only tested on raspberry pi)
git
repository aware prompt
ryan@bane ~/Development/projects/github/symmetry [develop 1↑]
$
npm module
aware prompt
ryan@bane ~/Development/projects/github/osiris [osiris v1.0.0-alpha1] [develop ≡]
$
extras/*
(expect for.default.bash
) are gitignored so you can create additional scripts that may contain things you don't want to check in to git.- system scripts can be loaded based on the envrionment (windows, macos, rasbian, etc)
- Create
~/.symmetry/initializers/.authorized_keys
file and put your public keys in there that you want to have added to~/.ssh/authorized_keys
. (this file is git ignored)
- Get Windows environment variables (prefixed with
WIN_
)
$ printwinenv
- Import current Windows environment variables
$ $(winenv)
powershell
interop from native bash
$ powershell Write-Host "Hello World"
Hello World
$ powershell ~/powershell-scripts/my-ps-file.ps1
- Get the full
lxss
path of a path within WSL
$ lxssdir ~
/mnt/c/Users/rconr/AppData/Local/lxss/home/rconr
- Convert from a Windows path to WSL path
$ windir "c:\\Windows\\System32\\"
/mnt/c/Windows/System32/
- Convert from a WSL (linux) path to Windows path
$ wsldir /mnt/c/Windows/System32/
C:\Windows\System32\