-
Notifications
You must be signed in to change notification settings - Fork 1
/
styles.cmd
173 lines (137 loc) · 2.67 KB
/
styles.cmd
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
goto :select_%1
rem =============================================
rem PROFILES
rem =============================================
:p_default
net session 1>nul 2>nul && (
set segments=cwd:01 git:03
) || (
set segments=cwd:06 git:03
)
set "separator="
set "margin=$S"
goto :eof
:p_demo2
set segments=cwd-compact:01 git-compact:03
set "separator="
set "margin="
goto :eof
:p_demo3
set segments="" cwd:04 git:03
set "separator="
set "margin=$S"
goto :eof
:p_demo4
set segments="" user:02 "" os:05 "" cwd:03 "" git:06
set "separator="
set "margin=$_$S"
goto :eof
:p_demo5
set segments="" user:05 os:03 cwd:40 git:01
set "separator=$S"
set "margin=$_$S"
goto :eof
:p_demo6
set segments="" user:03 "" os:07 "" cwd:06 "" git:02
set "separator="
set "margin=$_$$$S"
goto :eof
:p_demo7
set segments="" cwd_stack:01 git:03
set "separator=$S"
set "margin=$S"
goto :eof
:p_-user
set segments=user:02 %segments%
goto :eof
:p_-os
set segments=os:0D %segments%
goto :eof
:p_-pad
set segments="" %segments%
goto :eof
:p_-sep-round
set "separator="
goto :eof
:p_-sep-angle-b
set "separator=$S"
goto :eof
:p_-sep-angle-t
set "separator=$S"
goto :eof
:p_-sep-flames
set "separator=$S"
goto :eof
:p_-sep-pixels
set "separator="
goto :eof
:p_-sep-spikes
set "separator="
goto :eof
:p_-margin-newline
set "margin=$_$G$S"
goto :eof
:p_-margin-dollar
set "margin=$_$$$S"
goto :eof
rem =============================================
rem SEGMENTS
rem =============================================
:s_cwd
set text=$S$P$S
goto :eof
:s_cwd_stack
set text=$S$+$P$S
goto :eof
:s_user
set text=$S%USERNAME%@%COMPUTERNAME%$S
goto :eof
:s_os
set text=$S%OS%$S
goto :eof
:s_arch
set text=$S%PROCESSOR_ARCHITECTURE%$S
goto :eof
:s_session
set text=$S%%SESSIONNAME%%$S
goto :eof
:s_cwd_short
set var="delims=" %%i
set cmd='"%~dp0scripts\cwd_short.cmd"'
set text=$S%%i$S
goto :eof
:s_git
set var="delims=" %%i
set cmd='"%~dp0scripts\git_status.cmd"'
set text=$S$S%%i$S
goto :eof
:s_py_ver
set var="tokens=2" %%i
set cmd='python --version 2^>nul'
set text=$S$S%%i$S
goto :eof
:s_py_venv
set var="delims=" %%i
set cmd='if defined VIRTUAL_ENV echo %%VIRTUAL_ENV%%'
set text=$S$S%%~nxi$S
goto :eof
rem :s_my_script
rem set var="delims=" %%i
rem set cmd='"%~dp0scripts\my_script.cmd"'
rem set text=$S%%i$S
rem goto :eof
:s_compact
set "text=%text:$S=%"
set "text=%text: =%"
goto :eof
rem =============================================
rem DO NOT EDIT BELOW!!!
:select_p
shift
if not "%1" == "" call :p_%1 & goto :select_p
exit /b
:select_s
set arg=%2
for %%i in (%arg:-= %) do call :s_%%i
exit /b
rem =============================================