mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
update
This commit is contained in:
parent
87b176037f
commit
92cc6e9133
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "/usr/bin/python3"
|
||||
}
|
||||
17
powerline_shell/segments/rust.py
Normal file
17
powerline_shell/segments/rust.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import os
|
||||
import subprocess
|
||||
from ..utils import BasicSegment
|
||||
|
||||
|
||||
class Segment(BasicSegment):
|
||||
def add_to_powerline(self):
|
||||
powerline = self.powerline
|
||||
try:
|
||||
p1 = subprocess.run(
|
||||
["rustup", "toolchain", "list"], stdout=subprocess.PIPE)
|
||||
v = p1.stdout.decode("utf-8")
|
||||
for line in v:
|
||||
if "(default)" in line:
|
||||
powerline.append(line.split("-"), 15, 1)
|
||||
except OSError:
|
||||
return
|
||||
Loading…
Reference in a new issue