From dce677909d8916df9c57aeae1cafc1f35e1cadc4 Mon Sep 17 00:00:00 2001 From: Zezik <1+zezik@noreply.localhost> Date: Sat, 12 Sep 2026 06:56:08 +0000 Subject: [PATCH] =?UTF-8?q?Nahr=C3=A1t=20soubory=20do=20=E2=80=9E/?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mpis.py | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 mpis.py diff --git a/mpis.py b/mpis.py new file mode 100644 index 0000000..e941bb2 --- /dev/null +++ b/mpis.py @@ -0,0 +1,80 @@ +import curses, os + +items = [ + ["AirBattery ", "Get the battery usage of all your devices", "lihaoyun6/tap/airbattery"], + ["Crossover ", "Tool to run Windows software", "--cask crossover"], + ["Diffusion Bee ", "Run Stable Diffusion locally", "--cask diffusionbee"], + ["ffmpeg ", "Play, record, convert, and stream select audio and video codecs", "ffmpeg"], + ["fish ", "User-friendly command-line shell for UNIX-like operating systems", "fish"], + ["FreeTube ", "YouTube player focusing on privacy", "--cask freetube"], + ["Grayjay desktop ", "Multi-platform video player", "--cask grayjay"], + ["Helium ", "Chromium-based web browser", "--cask helium-browser"], + ["Heroic Games Launcher", "Game launcher", "--cask heroic"], + ["Hytale ", "Official Hytale Launcher", "--cask hytale"], + ["KeyClu ", "Find shortcuts for any installed application", "--cask keyclu"], + ["LibreOffice ", "Free cross-platform office suite, fresh version", "--cask libreoffice"], + ["Macs Fan Control ", "Controls and monitors all fans on Apple computers", "--cask macs-fan-control"], + ["mactop ", "Apple Silicon Monitor Top written in Go Lang", "mactop"], + ["micro ", "Modern and intuitive terminal-based text editor", "micro"], + ["mole ", "Deep clean and optimize your Mac", "mole"], + ["Mozilla Firefox ", "Web browser", "--cask firefox"], + ["Msty Studio ", "AI platform with local and online models", "--cask mstystudio"], + ["Orion Browser ", "WebKit based web browser", "--cask orion"], + ["Pinta ", "Simple Gtk# Paint Program", "--cask pinta"], + ["Prism Launcher ", "Minecraft launcher", "--cask prismlauncher"], + ["Steam ", "Video game digital distribution service", "--cask steam"], + ["Transmission ", "Open-source BitTorrent client", "--cask transmission"], + ["UTM ", "Virtual machines UI using QEMU", "--cask utm"], + ["VLC media player ", "Multimedia player", "--cask vlc"], + ["Windows App ", "Connect to Windows", "--cask windows-app"], + ["yt-dlp ", "Feature-rich command-line audio/video downloader", "yt-dlp"], + ["Zen Browser ", "Gecko based web browser", "--cask zen"], + ["- DONE", "", ""]] + +selected = [False] * len(items) +progress, progress_total = 1, 3 + +def brew_install(): + os.system('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"') + brew analytics off + +def brew_choose_default_apps(stdscr): + curses.curs_set(0) + stdscr.clear() + current_row = 0 + while True: + stdscr.clear() + stdscr.addstr(0, 0, "Select items with arrow keys and space bar:", curses.A_BOLD) + for idx, item in enumerate(items): + checkbox = "[X]" if selected[idx] else "[ ]" + if idx == current_row: + stdscr.addstr(idx + 1, 0, f"> {checkbox} {item[0]} - {item[1]}", curses.A_BOLD) + else: + stdscr.addstr(idx + 1, 0, f" {checkbox} {item[0]} - {item[1]}") + stdscr.refresh() + key = stdscr.getch() + if key == curses.KEY_UP and current_row > 0: + current_row -= 1 + elif key == curses.KEY_DOWN and current_row < len(items) - 1: + current_row += 1 + elif key == ord(' '): + if current_row == len(items) - 1: + break + selected[current_row] = not selected[current_row] + +def brew_choose_custom_apps(): + pass + +def brew_install_apps(): + for idx, item in enumerate(items): + if selected[idx]: + os.system("brew install " + items[idx][2]) + +input(f"[{progress}/{progress_total}] Install Brew. Needs sudo") +brew_install() +progress += 1 +input(f"[{progress}/{progress_total}] Choose apps") +curses.wrapper(brew_choose_default_apps) +progress += 1 +input(f"[{progress}/{progress_total}] Install apps") +brew_install_apps() \ No newline at end of file