From 4bf25ae02fe719b1f0a4ac23dea3826ed922a18b Mon Sep 17 00:00:00 2001 From: developomp Date: Thu, 7 Jul 2022 10:25:10 +0900 Subject: [PATCH] build pomky only when it's not installed --- src/setup/apps/pomky.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/setup/apps/pomky.py b/src/setup/apps/pomky.py index 03f9d40..07c5737 100644 --- a/src/setup/apps/pomky.py +++ b/src/setup/apps/pomky.py @@ -1,4 +1,4 @@ -from src.util import run, copy_file +from src.util import run, copy_file, command_exists from src.constants import tmp_dir name = "pomky" @@ -7,6 +7,8 @@ name = "pomky" def setup(): """conky but rusty""" - run(f"git clone --depth 1 https://github.com/developomp/pomky {tmp_dir}/pomky") - run(f"cd {tmp_dir}/pomky && cargo install --path .") + if not command_exists("pomky"): + run(f"git clone --depth 1 https://github.com/developomp/pomky {tmp_dir}/pomky") + run(f"cd {tmp_dir}/pomky && cargo install --path .") + copy_file("home/.config/autostart/pomky.desktop")