|
|
@@ -17,6 +17,7 @@ def main():
|
|
|
dua()
|
|
|
eza()
|
|
|
git_whence()
|
|
|
+ lazygit()
|
|
|
starship()
|
|
|
|
|
|
def delta():
|
|
|
@@ -111,6 +112,23 @@ def git_whence():
|
|
|
download(client, url, CURRENT_DIR / 'git-whence')
|
|
|
os.chmod(CURRENT_DIR / 'git-whence', 0o755)
|
|
|
|
|
|
+def lazygit():
|
|
|
+ if (CURRENT_DIR / 'lazygit').exists():
|
|
|
+ print('lazygit package already installed')
|
|
|
+ return
|
|
|
+
|
|
|
+ client = httpx.Client()
|
|
|
+ latest = gh_latest_version(client, 'jesseduffield', 'lazygit')
|
|
|
+ version = latest['name']
|
|
|
+ arch = platform.processor()
|
|
|
+ if arch == 'aarch64':
|
|
|
+ arch = 'arm64'
|
|
|
+ url = f'https://github.com/jesseduffield/lazygit/releases/download/{version}/lazygit_{version.lstrip("v")}_{platform.system()}_{arch}.tar.gz'
|
|
|
+ download(client, url, CURRENT_DIR / 'lazygit.tgz')
|
|
|
+ with tarfile.open(CURRENT_DIR / 'lazygit.tgz', 'r:gz') as tar:
|
|
|
+ tar.extract('lazygit', CURRENT_DIR)
|
|
|
+ os.unlink(CURRENT_DIR / 'lazygit.tgz')
|
|
|
+
|
|
|
def starship():
|
|
|
if platform.system() == 'Darwin':
|
|
|
print('$ brew install starship')
|