Add common virtualenv segment
This commit is contained in:
parent
35de8a192b
commit
504e212f14
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Default color scheme for terminal prompts",
|
||||
"name": "Default color scheme for shell prompts",
|
||||
"colors": {
|
||||
"black": 16,
|
||||
"white": 231,
|
||||
|
@ -10,6 +10,7 @@
|
|||
"brightgreen": 148,
|
||||
|
||||
"darkestcyan": 23,
|
||||
"darkcyan": 74,
|
||||
"mediumcyan": 117,
|
||||
"brightcyan": 159,
|
||||
|
||||
|
@ -55,6 +56,7 @@
|
|||
"groups": {
|
||||
"user": { "fg": "white", "bg": "darkblue", "attr": ["bold"] },
|
||||
"superuser": { "fg": "white", "bg": "brightred", "attr": ["bold"] },
|
||||
"virtualenv": { "fg": "white", "bg": "darkcyan" },
|
||||
"branch": { "fg": "gray9", "bg": "gray2" },
|
||||
"cwd": { "fg": "gray9", "bg": "gray4" },
|
||||
"cwd:current_folder": { "fg": "gray10", "bg": "gray4", "attr": ["bold"] },
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
{
|
||||
"name": "user"
|
||||
},
|
||||
{
|
||||
"name": "virtualenv"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"args": {
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
{
|
||||
"name": "user"
|
||||
},
|
||||
{
|
||||
"name": "virtualenv"
|
||||
},
|
||||
{
|
||||
"name": "branch",
|
||||
"before": " "
|
||||
|
|
|
@ -211,3 +211,7 @@ def network_load(interface='eth0', measure_interval=1, suffix='B/s', binary_pref
|
|||
rx_diff=humanize_bytes((b2[0] - b1[0]) / measure_interval, suffix, binary_prefix),
|
||||
tx_diff=humanize_bytes((b2[1] - b1[1]) / measure_interval, suffix, binary_prefix),
|
||||
)
|
||||
|
||||
|
||||
def virtualenv():
|
||||
return os.path.basename(os.environ.get('VIRTUAL_ENV', '')) or None
|
||||
|
|
Loading…
Reference in New Issue