-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprompta
More file actions
executable file
·35 lines (30 loc) · 966 Bytes
/
Copy pathprompta
File metadata and controls
executable file
·35 lines (30 loc) · 966 Bytes
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
#!/bin/zsh
function promptoid() {
echo "%K{${1}}%F{${2}}${3}%k%f"
}
function promptina() {
local nl=$'\n'
local mer=$(date '+%P')
case "$1" in
"dark")
local clk=$(promptoid 1 0 " %D{%I:%M}${mer} ")
local zsh=$(promptoid 2 0 " zsh ")
local me=$(promptoid 4 0 " %n ")
local us=$(promptoid 6 0 " %m ")
;;
"light")
local clk=$(promptoid 9 0 " %D{%I:%M}${mer} ")
local zsh=$(promptoid 10 0 " zsh ")
local me=$(promptoid 12 0 " %n ")
local us=$(promptoid 14 0 " %m ")
;;
"alt")
local clk=$(promptoid 10 0 " %D{%I:%M}${mer} ")
local zsh=$(promptoid 12 0 " zsh ")
local me=$(promptoid 13 0 " %n ")
local us=$(promptoid 14 0 " %m ")
;;
esac
echo "${nl}${clk}${zsh}${me}${us}${nl}%F{7}┌── %~${nl}└─%f "
}
PROMPT="$(promptina light)"