zshify 12.2.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/script.zsh +15 -23
  2. package/package.json +1 -1
package/bin/script.zsh CHANGED
@@ -1,33 +1,25 @@
1
1
  #!/bin/zsh
2
2
  mkdir -p ~/.zshify
3
3
 
4
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/prompt.zsh | cat >~/.zshify/config/prompt.zsh
5
- grep "source ~/.zshify/config/prompt.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/prompt.zsh" >>~/.zshrc
6
-
7
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/profile.zsh | cat >~/.zshify/config/profile.zsh
8
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/background.zsh | cat >~/.zshify/config/background.zsh
9
- grep "source ~/.zshify/config/background.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/background.zsh" >>~/.zshrc
10
-
11
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/fx.zsh | cat >~/.zshify/config/fx.zsh
12
- grep "source ~/.zshify/config/fx.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/fx.zsh" >>~/.zshrc
13
-
14
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/alias.zsh | cat >~/.zshify/config/alias.zsh
15
- grep "source ~/.zshify/config/alias.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/alias.zsh" >>~/.zshrc
16
-
17
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/plugins.zsh | cat >~/.zshify/config/plugins.zsh
18
- grep "source ~/.zshify/config/plugins.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/plugins.zsh" >>~/.zshrc
19
-
20
- curl -s https://raw.githubusercontent.com/nrjdalal/zshify/master/config/user.zsh | cat >~/.zshify/config/user.zsh
21
- grep "source ~/.zshify/config/user.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/user.zsh" >>~/.zshrc
22
-
4
+ # Clone the repository
5
+ git clone https://github.com/nrjdalal/zshify.git ~/.zshify
23
6
  curl -s https://raw.githubusercontent.com/nrjdalal/pglaunch/main/bin/fx.sh | cat >~/.zshify/config/postgres.zsh
24
- grep "source ~/.zshify/config/postgres.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/postgres.zsh" >>~/.zshrc
25
7
 
26
- which brew &>/dev/null || echo "\n$(tput setaf 1)brew not installed! install via -$(tput sgr0)\n/bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\"
8
+ # Source the files
9
+ for config in prompt background fx alias plugins user postgres; do
10
+ grep "source ~/.zshify/config/${config}.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/${config}.zsh" >>~/.zshrc
11
+ done
27
12
 
28
- echo "\n$(tput setaf 2)zshify enabled! to reload, run -$(tput sgr0) exec zsh"
13
+ # Check if Homebrew is installed
14
+ if command -v brew &>/dev/null; then
15
+ echo "\n$(tput setaf 2)brew is already installed!$(tput sgr0)"
16
+ else
17
+ echo "\n$(tput setaf 1)brew not installed!$(tput sgr0) Install via:"
18
+ echo "/bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
19
+ fi
29
20
 
30
- # cleanup
21
+ echo "\n$(tput setaf 2)zshify enabled! to reload, run -$(tput sgr0) exec zsh"
31
22
 
23
+ # Cleanup
32
24
  [ -f ~/.zshrc ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zshrc >~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
33
25
  [ -f ~/.zprofile ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zprofile >~/.zprofile.tmp && mv ~/.zprofile.tmp ~/.zprofile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zshify",
3
- "version": "12.2.0",
3
+ "version": "13.0.0",
4
4
  "description": "A minimalistic touch to your prompt!",
5
5
  "bin": {
6
6
  "prompt": "bin/script.zsh"