Skip to content

Commit e3ac19d

Browse files
committed
feat: use starship prompt
1 parent a4425c9 commit e3ac19d

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

zsh/.zshrc

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,13 @@ fi
1212
# zmodload zsh/zprof
1313
# Path to your oh-my-zsh installation.
1414
export ZSH="$HOME/.oh-my-zsh"
15-
ZSH_THEME="spaceship" # powerlevel9k/powerlevel9k
15+
# ZSH_THEME="spaceship" # powerlevel9k/powerlevel9k
1616
# Set name of the theme to load --- if set to "random", it will
1717
# load a random theme each time oh-my-zsh is loaded, in which case,
1818
# to know which specific one was loaded, run: echo $RANDOM_THEME
1919
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
2020

21-
# MacOS only
22-
zsh_wifi_signal(){
23-
if [[ `uname` == 'Darwin' ]]; then
24-
local output=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I)
25-
local airport=$(echo $output | grep 'AirPort' | awk -F': ' '{print $2}')
26-
27-
if [ "$airport" = "Off" ]; then
28-
local color='%F{yellow}'
29-
echo -n "%{$color%}Wifi Off"
30-
else
31-
local ssid=$(echo $output | grep ' SSID' | awk -F': ' '{print $2}')
32-
local speed=$(echo $output | grep 'lastTxRate' | awk -F': ' '{print $2}')
33-
local color='%F{yellow}'
34-
35-
[[ $speed -gt 100 ]] && color='%F{green}'
36-
[[ $speed -lt 50 ]] && color='%F{red}'
37-
38-
echo -n "%{$color%}$ssid $speed Mb/s%{%f%}" # removed char not in my PowerLine font
39-
fi
40-
else
41-
echo -n ''
42-
fi
43-
}
44-
45-
21+
eval "$(starship init zsh)"
4622
# Set list of themes to pick from when loading at random
4723
# Setting this variable when ZSH_THEME=random will cause zsh to load
4824
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
@@ -57,7 +33,7 @@ zsh_wifi_signal(){
5733
# HYPHEN_INSENSITIVE="true"
5834

5935
# Uncomment the following line to disable bi-weekly auto-update checks.
60-
# DISABLE_AUTO_UPDATE="true"
36+
DISABLE_AUTO_UPDATE="true"
6137

6238
# Uncomment the following line to automatically update without prompting.
6339
# DISABLE_UPDATE_PROMPT="true"
@@ -104,14 +80,12 @@ SAVEHIST=5000
10480
# Add wisely, as too many plugins slow down shell startup.
10581
plugins=(
10682
tmux
107-
git
10883
npm
10984
macos
11085
docker
11186
golang
11287
gcloud
113-
minikube
114-
vagrant-prompt
88+
vi-mode
11589
)
11690

11791
source $ZSH/oh-my-zsh.sh
@@ -145,9 +119,6 @@ fi
145119
# alias vm="vim"
146120
alias vim="nvim"
147121

148-
alias dlog="docker logs -f"
149-
alias dnet="docker network"
150-
151122
[ -f "/Users/macintosh/.ghcup/env" ] && source "/Users/macintosh/.ghcup/env" # ghcup-env
152123

153124
# Cleaning up after profiling

0 commit comments

Comments
 (0)