File tree 2 files changed +35
-0
lines changed 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ themes/easy
163
163
themes/essential
164
164
themes/githelpers.theme.bash
165
165
themes/inretio
166
+ themes/lambda
166
167
themes/modern
167
168
themes/norbu
168
169
themes/oh-my-posh
@@ -172,6 +173,7 @@ themes/powerline
172
173
themes/pure
173
174
themes/purity
174
175
176
+
175
177
# vendor init files
176
178
#
177
179
vendor/.gitattributes
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # shellcheck disable=SC1090,SC2034
3
+
4
+ function set_prompt {
5
+ local user_color=" \[\033[1;31m\]" # bold red for username
6
+ local at_color=" \[\033[1;37m\]" # bold white for @ symbol
7
+ local host_color=" \[\033[1;31m\]" # bold red for hostname
8
+ local in_color=" \[\033[1;37m\]" # bold white for "in"
9
+ local dir_color=" \[\033[1;35m\]" # bold purple for current working directory
10
+ local git_color=" \[\033[1;36m\]" # bold cyan for Git information
11
+ local time_color=" \[\033[1;32m\]" # bold green for time taken
12
+ local reset_color=" \[\033[0m\]" # reset color
13
+ local prompt_symbol_color=" \[\033[1;31m\]" # bold red for the prompt symbol
14
+
15
+ local end_time=$( date +%s%3N) # current time in milliseconds
16
+ local time_taken=$(( (end_time - start_time) )) # time in milliseconds
17
+
18
+ PS1=" ${user_color} ╭─\\ u" # username
19
+ PS1+=" ${at_color} @${host_color} \\ h" # @ symbol and hostname
20
+ PS1+=" ${in_color} in" # "in" between hostname and current directory
21
+ PS1+=" ${dir_color} \\ w" # current working directory
22
+
23
+ # Git information (status symbol)
24
+ PS1+=" ${git_color} $( __git_ps1 " [%s]" ) ${reset_color} "
25
+
26
+ if [ $time_taken -gt 0 ]; then
27
+ PS1+=" ${time_color} took ${time_taken} ms" # time taken in milliseconds
28
+ fi
29
+
30
+ PS1+=" \n${prompt_symbol_color} ╰─λ${reset_color} " # red color for the prompt symbol, reset color after
31
+ }
32
+
33
+ PROMPT_COMMAND=' start_time=$(date +%s%3N); set_prompt'
You can’t perform that action at this time.
0 commit comments