-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.zshrc
150 lines (131 loc) · 4.93 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='nerdfont-complete'
# Please only use this battery segment if you have material icons in your nerd font (or font)
# Otherwise, use the font awesome one in "User Segments"
prompt_zsh_battery_level() {
local percentage1=`acpi | grep -o '[0-9]*%'`
local percentage=`echo "${percentage1//\%}"`
local color='%F{red}'
local symbol="\uf00d"
acpi | grep "Discharging" > /dev/null
if [ $? -eq 0 ]; then
local charging="false";
else
local charging="true";
fi
if [ $percentage -le 20 ]
then symbol='\uf579' ; color='%F{red}' ;
#10%
elif [ $percentage -gt 19 ] && [ $percentage -le 30 ]
then symbol="\uf57a" ; color='%F{red}' ;
#20%
elif [ $percentage -gt 29 ] && [ $percentage -le 40 ]
then symbol="\uf57b" ; color='%F{yellow}' ;
#35%
elif [ $percentage -gt 39 ] && [ $percentage -le 50 ]
then symbol="\uf57c" ; color='%F{yellow}' ;
#45%
elif [ $percentage -gt 49 ] && [ $percentage -le 60 ]
then symbol="\uf57d" ; color='%F{blue}' ;
#55%
elif [ $percentage -gt 59 ] && [ $percentage -le 70 ]
then symbol="\uf57e" ; color='%F{blue}' ;
#65%
elif [ $percentage -gt 69 ] && [ $percentage -le 80 ]
then symbol="\uf57f" ; color='%F{blue}' ;
#75%
elif [ $percentage -gt 79 ] && [ $percentage -le 90 ]
then symbol="\uf580" ; color='%F{blue}' ;
#85%
elif [ $percentage -gt 89 ] && [ $percentage -le 99 ]
then symbol="\uf581" ; color='%F{blue}' ;
#85%
elif [ $percentage -gt 98 ]
then symbol="\uf578" ; color='%F{green}' ;
#100%
fi
if [ $charging = "true" ];
then color='%F{green}'; if [ $percentage -gt 98 ]; then symbol='\uf584'; fi
fi
echo -n "%F{white}\uE0B3 %{$color%}$symbol %F{white}$percentage%% " ;
}
prompt_zsh_internet_signal(){
local symbol="\uf7ba"
local strength=`iwconfig wlp5s0 | grep -i "link quality" | grep -o "[0-9]*/[0-9]*"`
echo -n "%F{white}\uE0B3 $symbol $strength"
}
prompt_codetalk() {
local content='\uF17C c{}deTalk'
$1_prompt_segment "$0" "$2" "black" "white" "$content" "#"
}
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_beginning"
POWERLEVEL9K_RVM_BACKGROUND="black"
POWERLEVEL9K_RVM_FOREGROUND="249"
POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_COLOR="red"
POWERLEVEL9K_TIME_BACKGROUND="black"
POWERLEVEL9K_TIME_FOREGROUND="white"
POWERLEVEL9K_TIME_FORMAT="\UF43A %D{%I:%M \UF133 %m.%d.%y}"
POWERLEVEL9K_RVM_BACKGROUND="black"
POWERLEVEL9K_RVM_FOREGROUND="249"
POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_COLOR="red"
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_VCS_CLEAN_FOREGROUND='black'
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='green'
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='black'
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='orange'
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='black'
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='yellow'
POWERLEVEL9K_VCS_HIDE_TAGS='false'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='black'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='white'
POWERLEVEL9K_FOLDER_ICON=''
POWERLEVEL9K_STATUS_OK_IN_NON_VERBOSE=true
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
POWERLEVEL9K_VCS_UNTRACKED_ICON='\u25CF'
POWERLEVEL9K_VCS_UNSTAGED_ICON='\u00b1'
POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON='\u2193'
POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON='\u2191'
POWERLEVEL9K_VCS_COMMIT_ICON="\uf417"
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%F{blue}\u256D\u2500%f"
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%F{blue}\u2570\uf460%f "
POWERLEVEL9K_CUSTOM_BATTERY_STATUS="prompt_zsh_battery_level"
POWERLEVEL9K_CUSTOM_BATTERY_STATUS_BACKGROUND='blue'
POWERLEVEL9K_CUSTOM_BATTERY_STATUS_BACKGROUND='black'
#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(codetalk context custom_internet_signal ssh root_indicator dir dir_writable vcs)
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context custom_internet_signal ssh root_indicator dir dir_writable vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(command_execution_time status custom_battery_status_joined zsh_internet_signal time)
HIST_STAMPS="dd/mm/yyyy"
DISABLE_UPDATE_PROMPT=true
POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='black'
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='purple'
POWERLINE9K_CODETALK_DEFAULT_BACKGROUND='black'
POWERLINE9K_CODETALK_DEFAULT_FOREGROUND='red'
# Which plugins would you like to load? (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-syntax-highlighting
zsh-autosuggestions
extract
colored-man-pages
sudo
history
catimg
npm
pip
python
bindkey
chucknorris
)
alias ll='colorls -lA --sd --group-directories-first'
alias ls='colorls --group-directories-first'
bindkey '^`' autosuggest-clear
LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=36:*.rpm=90'
export LS_COLORS