If you're looking for a souped up Zshell with lots of useful tools and decorations, look no further. If you're not into oh-my-zsh because you think it's bloated and offers way more than you need, look no further. I don't have a snazzy name for any of this. These are just my dotfiles, but I did put in a bunch of work trying to do what oh-my-zsh does without using oh-my-zsh because, after initially using it, I was really disappointed. I spent quite a while making everything pretty, only to realize my prompt tool took over 4 seconds to load... Uh, no. So will the hours I spent doing everything manually make up for the seconds I'll save every time I load Zsh? Perhaps not, but maybe if enough people use these dotfiles, then at some point, the time saved will have been worth the effort. Enjoy! 😁
This took way longer than it should have, but I like the result and hope you do, too. The terminal window needs to be small width-wise before the formatting is broken, so there shouldn't be any problems there. The quote of the day loads from the .zshrc file with a simple curl command. No API key is requited. 'Jq' JSON parser (automatically installed with my 'new-mac-setup script) is a prerequisite to reading the API output, though.👍
If my skull ascii is too much you could always change the .zshrc to load neofetch instead, or do what I do, use both. I have the motd set to load when I use the 'r' alias, and I have the neofetch set to load when I clear the screen with the 'c' alias. Of course, you can always <control>+l if you want neither.
.. = back one directory
... = back two directories
.... = back three directories
..... = back four directories
...... = back five directories
home = home directory
root = root directory
ave = ansible-vault encrypt
avd = ansible-vault decrypt
_ = sudo
ga = git add
gs = git status
gc = git commit -m
gp = git push origin master
rm = verbose remove w/ confirmation when removing more than 3 files
c = clear and load neofetch (for when skulls are too edge lord)
mkcd = make a directory and cd into it
md = mkdir
rmd = rmdir (verbose)
del = unsafe remove (no confirmation and recursive deletion)
rms = save removal (verbose with confirmation for every file)
la = list all files including hidden (uses ls)
ls = list w/ colors (uses ls)
l = list w/ long format, all files including hidden and human-readable byte sizes (uses ls)
ll = list w/ long format and human readable byte sizes (uses lsd)
ld = list only directories (uses eza)
lf = list only files (uses eza)
brave = open Brave browser
logseq = open LogSeq app
chathistory = open chat history for aichat (chatGPT tool for command line)
speedtest = network speedtest check
pb = copy to clipboard via piping
notes = LogSeq git repository
repos = git repositories directory
trash = trash with Finder instead of system API
dnsflush = flush DNS cache (password needed)
r = clear && source ~/.zshrc
psmem = list computer processes by memory use with clean formatting
pscpu = list computer processes by CPU use with clean formatting
dusage = list disk usage for items in the current directory with clean formatting
dust = enhance 'du' written in rust
dustf = 'dust' for files only
dustd = 'dust' for directories only
greph = grep command line history
grepa = grep aliases
grep = standard grep with colors added
egrep = grep -E with colors and ignores common hidden file types
fgrep = grep -F with colors and ignores common hidden file types
zsh = load .zshrc and its source files: .motd.sh .functions.sh and .alias.sh in VS code
acp = git automation - check for changes to commit, then git add -A, git commit -m, and git push origin {current branch}. No need to use quotes for commit message.
orgimg = takes a directory and organizes all images into folders named with the file extension.
jpg2png = .jpg and .jpeg conversion to .png
jpg2webp = .jpg and .jpeg conversion to webp
png2jpg = .png conversion to .jpg
png2webp = .png conversion to .webp
webp2jpg = .webp conversion to .jpg
webp2png = .webp conversion to .png
pdf2jpg = .png conversion to .jpg
vector2png = .ai, .eps, or .svg conversion to .png
heic2jpg = Apple's latest HEIC image conversion to .jpg
optjpg = optimize all .jpg's in a directory
optpng = optimize all .png's in a directory
symlink = creates a backup of a directory and then creates a symlink of the directory with the original name makegif = creates an optimized gif from any segment of a full-length video. You can run it by calling 'makegif' and following the prompts or you can use it immediately by inputting all the correct arguments when you call the script. torrent = starts downloading a torrent with aria2. Usage: torrent
ddg: search Duck Duck Go. Usage: ddg
google: search google. Usage: google
youtube: search YouTube for specific terms. Usage: youtube
gmailsearch: search gmail for specific terms. Usage: gmailsearch
I've set up the starship.toml config file to have the prompt look like the powerline prompt. I've set it up using iTerm2, so the colors may be broken on another terminal app. Also 'magenta' wasn't working for some reason. Still determining if it's a bug with starship or with iTerm2. I got around it by hard-coding the color with a hex color.
Dynamic icons! 🥹
You'll want these two lines at the bottom of your .zshrc:
export STARSHIP_CONFIG=~/path/to/starship.toml
eval "$(starship init zsh)"
If you're using my 'new-mac-setup' script, it will automatically retrieve my dotfiles, so the lines will be there. However, since my actual dotfiles are in this repo, the 'path/to/starship. tool' is a symlink, and you'll want to change that anyway. For reference, my symlink is in ~/.config/starship/starship.toml
.
This is overboard for some people. You can simply delete the sections you don't want from the 'format' block at the top of 'starship.toml'. You don't have to worry about deleting formatting and styling blocks lower in the file.
Example Delete these lines for a minimalist prompt with only the user name, directories, git branch & status, and last-command status:
Result
The file, zsh-colors.itermcolors, is to load the colors I use into iTerm2. Feel free to use your own, but I figured I'd include this as well to avoid any legibility or contrast issues on your machine. The less tweaking, the better, right? Just import them from this 'color presets' menu in iTerm2 settings.