diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ec0c07d --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/.zsh_history +/.zcompdump-* +*.session + +custom.sh +.DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6d550e6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "cSpell.words": [ + "lazygit", + "Meslo", + "Powerline", + "rlogin", + "Scrollback", + "slogin", + "Zurg" + ] +} \ No newline at end of file diff --git a/.zprofile b/.zprofile new file mode 100644 index 0000000..08a24ba --- /dev/null +++ b/.zprofile @@ -0,0 +1,2 @@ +# Sets default .zsh to use zurg-cli. This is added from running zurg install. +ZDOTDIR=$HOME/zurg-cli/ \ No newline at end of file diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..079f86a --- /dev/null +++ b/.zshrc @@ -0,0 +1,123 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="${HOME}/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes +ZSH_THEME="spaceship" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in ~/.oh-my-zsh/plugins/* +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git zsh-autosuggestions zsh-syntax-highlighting fzf-zsh-plugin) + +# Zurg init image and text +echo "" +printf '%b\n' "$(cat $HOME/zurg-cli/ascii-zurg.ans)" +echo " ------------------------------ Zurg initialized -----------------------------" + +source $ZSH/oh-my-zsh.sh + +# User configuration + +export EDITOR='micro' + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# + +# Import from .bash_profile +export PATH="$PATH:/usr/local/sbin:$HOME/bin:$HOME/.composer/vendor/bin" + +# Valet+ +export PATH="$PATH:$HOME/.composer/vendor/bin" + +# Zurg Binaries +export PATH="$PATH:/usr/local/sbin:$HOME/bin:$HOME/zurg-cli/bin" + +# Python +export PATH=$PATH:~/Library/Frameworks/Python.framework/Versions/3.6/bin +alias python="python3" + +# Disable annoying confirm +setopt rmstarsilent + +# Path to additional addons to .zshrc +source $HOME/zurg-cli/.zurg + +export LC_CTYPE=C +export LANG=C \ No newline at end of file diff --git a/.zurg b/.zurg new file mode 100644 index 0000000..5b43a14 --- /dev/null +++ b/.zurg @@ -0,0 +1,5 @@ +source ~/zurg-cli/functions.sh +source ~/zurg-cli/aliases.sh +source ~/zurg-cli/fzf.sh + +source ~/zurg-cli/custom.sh \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..5d3b56a --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,11 @@ +# Install zurg-cli + +- Set the directory to be in your install of `zurg-cli`. The recommended directory house Zurg is `$HOME/` on Mac. +- Execute `$ sh install.sh` +- Quit your terminal and reset the session. + + +# Uninstall + +- Zurg can be uninstalled by running `$ sh uninstall.sh` in the `zurg-cli` directory. +- Quit your terminal and reset the session. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b8bc25 --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +# zurg-cli + +![](/images/zurg.gif) + +**Zurg-cli** is a custom layer on top of Oh My Zsh[Oh My ZSH](https://ohmyz.sh). It helps configure settings that have been pleasant, powerful, extendable, and simple to use over the years. + +## Main Features + +#### Auto Completion + +![](/images/auto-complete.gif) + +#### syntax-highlighting + +![](/images/syntax-highlighting.gif) + +### Third Party Integrated Tools + +#### Fuzzy Finder (fzf) + +##### - Fuzzy Find Directory + +`fdr` + +![](/images/fuzzy-find.gif) + +##### - Fuzzy Switch Branch + +`fbr` + +![](/images/fuzzy-branch.gif) + +#### - Fuzzy History + +- History CTRL+R + +![](/images/fuzzy-history.gif) + +### CLI Tool Details +##### ZSH + +ZSH is an extended version of the Bourne Shell with plenty of new features and support for plugins and themes. Since it’s based on the same shell as Bash, ZSH has many of the same features, and switching over is a very simple and straight forward. + +##### Oh My ZSH + +https://ohmyz.sh/ + +Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, and themes. + +##### FZF (Fuzzy Finder) + +https://github.com/junegunn/fzf#key-bindings-for-command-line + +fzf is a general-purpose command-line fuzzy finder. + +##### Micro + +https://github.com/zyedidia/micro + +The best terminal editor open source can buy. + +`micro` + +![](/images/micro.gif) + +##### HTOP + +https://hisham.hm/htop/ + +This is htop, an interactive process viewer for Unix systems. + +`htop` + +![](/images/htop.gif) + + +## Extending Zurg + +If you want to add any additional things to the terminal, the best place to do that is the `custom.sh` file. The contents will be gitignored and they are appended to Zurg last. \ No newline at end of file diff --git a/aliases.sh b/aliases.sh new file mode 100644 index 0000000..363d47b --- /dev/null +++ b/aliases.sh @@ -0,0 +1,10 @@ +function showalias () { + echo "------------------------------ Shell ------------------------------" + echo "" + echo "modzsh: code ~/zsh-config" + echo "modzurg: code ~/zurg-cli" +} + +# Shell +alias modzsh="code ~/zsh-config" +alias modzurg="code ~/zurg-cli" diff --git a/ascii-zurg.ans b/ascii-zurg.ans new file mode 100644 index 0000000..ba6e169 --- /dev/null +++ b/ascii-zurg.ans @@ -0,0 +1,26 @@ +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////*/////////////////////////// +///////////////////////////#////////////////////////*#////////////////////////// +//////////////////////////#*//////////////////////////##//////////////////////// +////////////////////////###*///////////////////////////##*////////////////////// +////////////*//////////####///////////////////////////####/////////* /////////// +/////////////***/*////*########*//////////////////########////*///.*//////////// +////////////////* ///////*####/////////////////////####*///*///*./////////////// +//////////////////* /////*/////*///////*//*//////////////////  ///////////////// +////////////////////  ///////*///***/**//*////*////////////  /////////////////// +//////////////////////  /////////////////////////*///////  ///////////////////// +///////////////////////  ./////*///*##(////##*//////////  *///////////////////// +////////////////////////  ////////##############///*///  *////////////////////// +////////////////////////   //*/*##################*////  /////////////////////// +////////////////////////   //*/###/**///////////###//*/   ////////////////////// +////////////////////////   ////////////*////////////////  ////////////////////// +////////////////////////  ./////////*  #((. */////////*/   ///////////////////// +/////////////////*######(             //#//(             ########/////////////// +///////////////////#############                 (##############//////////////// +////////////////////#####################/#####################///////////////// +////////////////////*//*#################/#################*/**///////////////// +//////////////////////////////*##########/##########*/////////////////////////// +/////////////////////////////////*///***///*****//////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + \ No newline at end of file diff --git a/functions.sh b/functions.sh new file mode 100644 index 0000000..6083bc2 --- /dev/null +++ b/functions.sh @@ -0,0 +1,16 @@ +function showfunc () { + echo "---------------------------- Functions ----------------------------" + echo "------------------------------ Shell ------------------------------" + + echo "" + echo "cl: code ~/zsh-config" + echo "rosetta: Appends the -x86_64 flag before the given command" +} + +function cl () { + cd "$@" && ll +} + +function rosetta () { + -x86_64 "$@" +} \ No newline at end of file diff --git a/fzf.sh b/fzf.sh new file mode 100644 index 0000000..26a3a24 --- /dev/null +++ b/fzf.sh @@ -0,0 +1,30 @@ +fd() { + local dir + dir=$(find ${1:-.} -path '*/\.*' -prune \ + -o -type d -print 2> /dev/null | fzf +m) && + cd "$dir" +} + +fshow() { + git log --graph --color=always \ + --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | + fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \ + --bind "ctrl-m:execute: + (grep -o '[a-f0-9]\{7\}' | head -1 | + xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF' + {} + FZF-EOF" +} + +fda() { + local dir + dir=$(find ${1:-.} -type d 2> /dev/null | fzf +m) && cd "$dir" +} + +fbr() { + local branches branch + branches=$(git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format="%(refname:short)") && + branch=$(echo "$branches" | + fzf-tmux -d $(( 2 + $(wc -l <<< "$branches") )) +m) && + git checkout $(echo "$branch" | sed "s/.* //" | sed "s#remotes/[^/]*/##") +} diff --git a/images/auto-complete.gif b/images/auto-complete.gif new file mode 100644 index 0000000..5156923 Binary files /dev/null and b/images/auto-complete.gif differ diff --git a/images/fuzzy-branch.gif b/images/fuzzy-branch.gif new file mode 100644 index 0000000..0a8eee5 Binary files /dev/null and b/images/fuzzy-branch.gif differ diff --git a/images/fuzzy-find.gif b/images/fuzzy-find.gif new file mode 100644 index 0000000..7ceaaa1 Binary files /dev/null and b/images/fuzzy-find.gif differ diff --git a/images/fuzzy-history.gif b/images/fuzzy-history.gif new file mode 100644 index 0000000..ea10694 Binary files /dev/null and b/images/fuzzy-history.gif differ diff --git a/images/htop.gif b/images/htop.gif new file mode 100644 index 0000000..e593014 Binary files /dev/null and b/images/htop.gif differ diff --git a/images/micro.gif b/images/micro.gif new file mode 100644 index 0000000..1a675ed Binary files /dev/null and b/images/micro.gif differ diff --git a/images/syntax-highlighting.gif b/images/syntax-highlighting.gif new file mode 100644 index 0000000..c3ecf63 Binary files /dev/null and b/images/syntax-highlighting.gif differ diff --git a/images/zurg-anscii.jpeg b/images/zurg-anscii.jpeg new file mode 100644 index 0000000..94dbebc Binary files /dev/null and b/images/zurg-anscii.jpeg differ diff --git a/images/zurg.gif b/images/zurg.gif new file mode 100644 index 0000000..cea660f Binary files /dev/null and b/images/zurg.gif differ diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..b6c920d --- /dev/null +++ b/install.sh @@ -0,0 +1,103 @@ +source ~/zurg-cli/packages.txt + +InstallCore () { + # Create custom.sh file + touch custom.sh + + # Check for Homebrew, install if it does not exist + echo "Looking for Homebrew..." + if test ! $(which brew); then + echo "Installing homebrew..." + if [[ `uname -m` == 'arm64' ]]; then + echo "Apple Silicon Detected 🍎" + echo "Installing Rosetta CLI 🌹" + /usr/sbin/softwareupdate --install-rosetta --agree-to-license + echo "Installing Rosetta Homebrew 🌹🍻" + arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + else + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + fi + fi + echo "Homebrew Installed βœ…" + + if [[ !`uname -m` == 'arm64' ]]; then + + echo "Installing packages πŸ“¦" + brew install ${PACKAGES[@]} + else + echo "Installing packages using Rosetta πŸŒΉπŸ“¦" + -x86_64 brew install ${PACKAGES[@]} + fi + + # Moving .zprofile to home directory. This points default zsh to use zurg instead. + cp ${HOME}/zurg-cli/.zprofile ${HOME} + + # Install Oh My ZSH + echo "Installing Oh My ZSH and plugins" + if [ ! -d "/Users/${USER}/.oh-my-zsh" ]; then + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + else + echo "Oh My ZSH is already installed βœ…" #duplicated code + fi + + echo "Cleaning up 🧹" + brew cleanup +} + +InstallPlugins () { + # zsh-autosuggestions + if [ ! -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]; then + git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions + else + echo "zsh-autosuggestions is already installed βœ…" #duplicated code + fi + + # zsh-syntax-highlighting + if [ ! -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting ]; then + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + else + echo "zsh-syntax-highlighting is already installed βœ…" #duplicated code + fi + + # fzf-zsh-plugin + if [ ! -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin ]; then + git clone https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin + else + echo "fzf-zsh-plugin is already installed βœ…" #duplicated code + fi + + #Spaceship + git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 + ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" + + # -> Powerline fonts for Spaceship theme + git clone git@github.com:powerline/fonts.git ${HOME}/Documents/Github + + # Iterm2 Integrated Shell Commands + curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash + + #Install fzf terminal integrations + /usr/local/opt/fzf/install +} + +InstallFinish () { + echo "Changing default shell πŸ”€" + chsh -s /bin/zsh + + echo "Zurg install complete βœ…" + echo "Please restart your session for changes to take effect" +} + +# Verify the user wants to install +while true; do + read -p "Would you like to install Zurg CLI tools? (y/n): " yn + case $yn in + [Yy]* ) + InstallCore; + InstallPlugins; + InstallFinish; + break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done \ No newline at end of file diff --git a/iterm2/Zurg Dracula.json b/iterm2/Zurg Dracula.json new file mode 100644 index 0000000..dcd0124 --- /dev/null +++ b/iterm2/Zurg Dracula.json @@ -0,0 +1,357 @@ +{ + "Use Non-ASCII Font" : false, + "Tags" : [ + + ], + "Ansi 12 Color" : { + "Green Component" : 0.57647058823529407, + "Red Component" : 0.74117647058823533, + "Blue Component" : 0.97647058823529409 + }, + "Ansi 0 Color" : { + "Green Component" : 0, + "Red Component" : 0, + "Blue Component" : 0 + }, + "Normal Font" : "MesloLGLForPowerline-Regular 11", + "Bold Color" : { + "Green Component" : 0.90237069129943848, + "Red Component" : 0.90237069129943848, + "Blue Component" : 0.90237069129943848 + }, + "Ansi 1 Color" : { + "Green Component" : 0.3333333432674408, + "Red Component" : 1, + "Blue Component" : 0.3333333432674408 + }, + "Horizontal Spacing" : 1, + "Ansi 3 Color" : { + "Green Component" : 0.98039215686274506, + "Red Component" : 0.94509803921568625, + "Blue Component" : 0.5490196078431373 + }, + "Rows" : 25, + "Default Bookmark" : "No", + "Cursor Guide Color" : { + "Red Component" : 0.70213186740875244, + "Color Space" : "sRGB", + "Blue Component" : 1, + "Alpha Component" : 0.25, + "Green Component" : 0.9268307089805603 + }, + "Non-ASCII Anti Aliased" : true, + "Use Bright Bold" : true, + "Ansi 10 Color" : { + "Green Component" : 0.98039215686274506, + "Red Component" : 0.31372549019607843, + "Blue Component" : 0.4823529411764706 + }, + "Ambiguous Double Width" : false, + "Jobs to Ignore" : [ + "rlogin", + "ssh", + "slogin", + "telnet" + ], + "Ansi 15 Color" : { + "Green Component" : 1, + "Red Component" : 1, + "Blue Component" : 1 + }, + "Foreground Color" : { + "Green Component" : 0.90032327175140381, + "Red Component" : 0.90032327175140381, + "Blue Component" : 0.90032327175140381 + }, + "Bound Hosts" : [ + + ], + "Working Directory" : "$HOME", + "Blinking Cursor" : false, + "Disable Window Resizing" : true, + "Sync Title" : false, + "Prompt Before Closing 2" : false, + "BM Growl" : true, + "Command" : "", + "Description" : "Default", + "Mouse Reporting" : true, + "Screen" : -1, + "Selection Color" : { + "Green Component" : 0.27843138575553894, + "Red Component" : 0.26666668057441711, + "Blue Component" : 0.35294118523597717 + }, + "Columns" : 80, + "Idle Code" : 0, + "Ansi 13 Color" : { + "Green Component" : 0.47450980392156861, + "Red Component" : 1, + "Blue Component" : 0.77647058823529413 + }, + "Custom Command" : "No", + "ASCII Anti Aliased" : true, + "Non Ascii Font" : "Monaco 12", + "Vertical Spacing" : 1, + "Use Bold Font" : true, + "Option Key Sends" : 0, + "Selected Text Color" : { + "Green Component" : 1, + "Red Component" : 1, + "Blue Component" : 1 + }, + "Background Color" : { + "Green Component" : 0.12215272337198257, + "Red Component" : 0.11765811592340469, + "Blue Component" : 0.15977837145328522 + }, + "Character Encoding" : 4, + "Ansi 11 Color" : { + "Green Component" : 0.98039215686274506, + "Red Component" : 0.94509803921568625, + "Blue Component" : 0.5490196078431373 + }, + "Use Italic Font" : true, + "Unlimited Scrollback" : false, + "Keyboard Map" : { + "0xf700-0x260000" : { + "Action" : 10, + "Text" : "[1;6A" + }, + "0x37-0x40000" : { + "Action" : 11, + "Text" : "0x1f" + }, + "0x32-0x40000" : { + "Action" : 11, + "Text" : "0x00" + }, + "0xf709-0x20000" : { + "Action" : 10, + "Text" : "[17;2~" + }, + "0xf70c-0x20000" : { + "Action" : 10, + "Text" : "[20;2~" + }, + "0xf729-0x20000" : { + "Action" : 10, + "Text" : "[1;2H" + }, + "0xf72b-0x40000" : { + "Action" : 10, + "Text" : "[1;5F" + }, + "0xf705-0x20000" : { + "Action" : 10, + "Text" : "[1;2Q" + }, + "0xf703-0x260000" : { + "Action" : 10, + "Text" : "[1;6C" + }, + "0xf700-0x220000" : { + "Action" : 10, + "Text" : "[1;2A" + }, + "0xf701-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x42" + }, + "0x38-0x40000" : { + "Action" : 11, + "Text" : "0x7f" + }, + "0x33-0x40000" : { + "Action" : 11, + "Text" : "0x1b" + }, + "0xf703-0x220000" : { + "Action" : 10, + "Text" : "[1;2C" + }, + "0xf701-0x240000" : { + "Action" : 10, + "Text" : "[1;5B" + }, + "0xf70d-0x20000" : { + "Action" : 10, + "Text" : "[21;2~" + }, + "0xf702-0x260000" : { + "Action" : 10, + "Text" : "[1;6D" + }, + "0xf729-0x40000" : { + "Action" : 10, + "Text" : "[1;5H" + }, + "0xf706-0x20000" : { + "Action" : 10, + "Text" : "[1;2R" + }, + "0x34-0x40000" : { + "Action" : 11, + "Text" : "0x1c" + }, + "0xf700-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x41" + }, + "0x2d-0x40000" : { + "Action" : 11, + "Text" : "0x1f" + }, + "0xf70e-0x20000" : { + "Action" : 10, + "Text" : "[23;2~" + }, + "0xf702-0x220000" : { + "Action" : 10, + "Text" : "[1;2D" + }, + "0xf703-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x43" + }, + "0xf700-0x240000" : { + "Action" : 10, + "Text" : "[1;5A" + }, + "0xf707-0x20000" : { + "Action" : 10, + "Text" : "[1;2S" + }, + "0xf70a-0x20000" : { + "Action" : 10, + "Text" : "[18;2~" + }, + "0x35-0x40000" : { + "Action" : 11, + "Text" : "0x1d" + }, + "0xf70f-0x20000" : { + "Action" : 10, + "Text" : "[24;2~" + }, + "0xf703-0x240000" : { + "Action" : 10, + "Text" : "[1;5C" + }, + "0xf701-0x260000" : { + "Action" : 10, + "Text" : "[1;6B" + }, + "0xf702-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x44" + }, + "0xf72b-0x20000" : { + "Action" : 10, + "Text" : "[1;2F" + }, + "0x36-0x40000" : { + "Action" : 11, + "Text" : "0x1e" + }, + "0xf708-0x20000" : { + "Action" : 10, + "Text" : "[15;2~" + }, + "0xf701-0x220000" : { + "Action" : 10, + "Text" : "[1;2B" + }, + "0xf70b-0x20000" : { + "Action" : 10, + "Text" : "[19;2~" + }, + "0xf702-0x240000" : { + "Action" : 10, + "Text" : "[1;5D" + }, + "0xf704-0x20000" : { + "Action" : 10, + "Text" : "[1;2P" + } + }, + "Window Type" : 0, + "Background Image Location" : "", + "Blur" : false, + "Badge Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0, + "Alpha Component" : 0.5, + "Green Component" : 0.1491314172744751 + }, + "Scrollback Lines" : 1000, + "Send Code When Idle" : false, + "Close Sessions On End" : true, + "Terminal Type" : "xterm-256color", + "Visual Bell" : true, + "Flashing Bell" : false, + "Silence Bell" : false, + "Ansi 14 Color" : { + "Green Component" : 0.9137254901960784, + "Red Component" : 0.54509803921568623, + "Blue Component" : 0.99215686274509807 + }, + "Name" : "Dracula", + "Cursor Text Color" : { + "Green Component" : 1, + "Red Component" : 1, + "Blue Component" : 1 + }, + "Shortcut" : "", + "Cursor Color" : { + "Green Component" : 0.73333334922790527, + "Red Component" : 0.73333334922790527, + "Blue Component" : 0.73333334922790527 + }, + "Transparency" : 0.071011887383215164, + "Guid" : "1D4FBBF0-7DAC-4F94-89AD-E62B22AD5392", + "Ansi 2 Color" : { + "Green Component" : 0.98039215686274506, + "Red Component" : 0.31372549019607843, + "Blue Component" : 0.4823529411764706 + }, + "Link Color" : { + "Red Component" : 0, + "Color Space" : "sRGB", + "Blue Component" : 0.73423302173614502, + "Alpha Component" : 1, + "Green Component" : 0.35916060209274292 + }, + "Custom Directory" : "No", + "Right Option Key Sends" : 0, + "Ansi 6 Color" : { + "Green Component" : 0.9137254901960784, + "Red Component" : 0.54509803921568623, + "Blue Component" : 0.99215686274509807 + }, + "Ansi 7 Color" : { + "Green Component" : 0.73333334922790527, + "Red Component" : 0.73333334922790527, + "Blue Component" : 0.73333334922790527 + }, + "Ansi 8 Color" : { + "Green Component" : 0.33333333333333331, + "Red Component" : 0.33333333333333331, + "Blue Component" : 0.33333333333333331 + }, + "Ansi 9 Color" : { + "Green Component" : 0.33333333333333331, + "Red Component" : 1, + "Blue Component" : 0.33333333333333331 + }, + "Ansi 4 Color" : { + "Green Component" : 0.57647058823529407, + "Red Component" : 0.74117647058823533, + "Blue Component" : 0.97647058823529409 + }, + "Ansi 5 Color" : { + "Green Component" : 0.47450980392156861, + "Red Component" : 1, + "Blue Component" : 0.77647058823529413 + } +} \ No newline at end of file diff --git a/packages.txt b/packages.txt new file mode 100644 index 0000000..a436706 --- /dev/null +++ b/packages.txt @@ -0,0 +1,8 @@ +PACKAGES=( + zsh + fzf + micro + htop + terminal-notifier + lazygit +) \ No newline at end of file diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..0c48601 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,30 @@ +source ~/zurg-cli/packages.txt + +Uninstall() { + echo "Uninstalling packages πŸ“¦" + brew uninstall ${PACKAGES[@]} + + echo "Cleaning up 🧹" + brew cleanup + + echo "Removing .zprofile to restore default config" + if [ ! -d "/Users/${USER}/.zprofile" ]; then + rm "/Users/${USER}/.zprofile" + else + echo ".zprofile has already been removed" #duplicated code + fi +} + +# Verify the user wants to uninstall +while true; do + read -p "Would you like to uninstall Zurg CLI tools? (y/n): " yn + case $yn in + [Yy]* ) + Uninstall; + echo "Uninstall successful βœ…"; + echo "Please restart the terminal to see changes" + break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done \ No newline at end of file