from dotinstall import packages, util


def run():
    if util.distro_name() == "arch":
        packages.try_install("fzf")  # super opener
        packages.try_install(
            "silver-searcher-git"
        )  # super grep (vim-fzf dependency)
        packages.try_install("ripgrep")  # super grep (shell)
    elif util.distro_name() == "linuxmint":
        packages.try_install("silversearcher-ag")
        if not packages.has_installed("ripgrep"):
            util.run_verbose(
                [
                    "curl",
                    "-LO",
                    "https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb",
                ]
            )
            util.run_verbose(
                ["sudo", "dpkg", "-i", "ripgrep_11.0.2_amd64.deb"]
            )

    util.create_symlink("./agignore", "~/.agignore")

@@ -1,8 +1,34 @@
+from pathlib import Path%0A%0A
 from dot
@@ -57,16 +57,16 @@
 s, util%0A
-
 %0A%0Adef ru
@@ -330,16 +330,17 @@
 (shell)%0A
+%0A
     elif
@@ -425,16 +425,17 @@
 er-ag%22)%0A
+%0A
         
@@ -819,16 +819,16 @@
 4.deb%22%5D%0A
-
         
@@ -834,16 +834,504 @@
      )%0A%0A
+        fzf_dir = Path(%22~/.fzf%22).expanduser()%0A        util.run_verbose(%0A            %5B%0A                %22git%22,%0A                %22clone%22,%0A                %22--depth%22,%0A                %221%22,%0A                %22https://github.com/junegunn/fzf.git%22,%0A                fzf_dir,%0A            %5D%0A        )%0A        util.run_verbose(%0A            %5B%0A                fzf_dir / %22install%22,%0A                %22--key-bindings%22,%0A                %22--completion%22,%0A                %22--no-update-rc%22,%0A            %5D%0A        )%0A%0A
     util

install fzf on mint