コード例 #1
0
ファイル: __init__.py プロジェクト: swipswaps/macify-linux
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    # run install.sh
    u.bash_action(action="install",
                  file=__file__,
                  name=component_name,
                  interactive=True)
コード例 #2
0
ファイル: __init__.py プロジェクト: garethrees/macify-linux
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    # run install.sh
    u.bash_action(action="install",
                  file=__file__,
                  name=component_name,
                  stderr_level=logging.DEBUG)

    # Start and stop latte once after installing in order to generate the default configs.
    start_latte()
    time.sleep(2)
    stop_latte()

    # run configure.sh
    u.bash_action(action="configure", file=__file__, name=component_name)

    # remove any default panels we find automatically
    script = u.get_template("removeDefaultPanels.js")
    u.eval_plasma_script(script)

    # Edit latte config files
    u.kwriteconfig({
        "file": "~/.config/lattedockrc",
        "group": "UniversalSettings",
        "key": "currentLayout",
        "value": "macifyLinux",
    })
    u.kwriteconfig({
        "file": "~/.config/lattedockrc",
        "group": "UniversalSettings",
        "key": "lastNonAssignedLayout",
        "value": "macifyLinux",
    })
    start_latte()
コード例 #3
0
ファイル: __init__.py プロジェクト: swipswaps/macify-linux
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    # run install.sh
    u.bash_action(action="install",
                  file=__file__,
                  name=component_name,
                  stderr_level=logging.DEBUG)
コード例 #4
0
def pre(*args, **kwargs):
    prerequisites = [
        "build-essential",
        "cmake",
        "extra-cmake-modules",
        "gettext",
        "git",
        "libkf5activities-dev",
        "libkf5archive-dev",
        "libkf5crash-dev",
        "libkf5declarative-dev",
        "libkf5iconthemes-dev",
        "libkf5newstuff-dev",
        "libkf5notifications-dev",
        "libkf5plasma-dev",
        "libkf5wayland-dev",
        "libkf5windowsystem-dev",
        "libkf5xmlgui-dev",
        "libqt5x11extras5-dev",
        "libsm-dev",
        "libxcb-util-dev",
        "libxcb-util0-dev",
        "qtdeclarative5-dev",
    ]

    u.apt_install(
        prerequisites, "latte-dock prerequisites",
    )

    u.git_clone("https://github.com/KDE/latte-dock.git", G["SOURCES_DIR"])
    return True
コード例 #5
0
ファイル: __init__.py プロジェクト: swipswaps/macify-linux
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    # run install.sh
    u.bash_action(action="install", file=__file__, name=component_name)

    # icons
    u.kwriteconfig({
        "file": "~/.config/kdeglobals",
        "group": "Icons",
        "key": "Theme",
        "value": "Os-Catalina-icons",
    })
コード例 #6
0
ファイル: install.py プロジェクト: mybigman/macify-linux
def install_cursors():
    logger.info("Installing cursors.")
    u.git_clone("https://github.com/vinceliuice/McMojave-cursors.git",
                G["SOURCES_DIR"])
    mcmojave_cursors = Path("~/sources/McMojave-cursors/dist").expanduser()
    """
    u.setup_symlink(mcmojave_cursors, G['ICONS_DIR'] / Path("McMojave-cursors"))
    u.copy_file(
        mcmojave_cursors, G['ICONS_DIR'] / Path("McMojave-cursors"), recursive=True,
    )
    """
    u.cp(mcmojave_cursors, G["ICONS_DIR"] / Path("McMojave-cursors"), "r")
コード例 #7
0
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"], flags="--branch MacifyLinux --recursive")
    # run install.sh
    u.bash_action(
        action="install", file=__file__, name=component_name, stderr_level=logging.DEBUG
    )

    # run configure.sh
    u.bash_action(action="configure", file=__file__, name=component_name)

    # start albert
    albert_desktop_file = Path("/usr/local/share/applications/albert.desktop")
    u.run_shell_bg("nohup /bin/sh {}".format(albert_desktop_file.resolve()))
コード例 #8
0
ファイル: install.py プロジェクト: mybigman/macify-linux
def install_login_screen():
    # Login Screen
    kde_plasma_chili = u.git_clone(
        "https://github.com/MarianArlt/kde-plasma-chili.git", G["SOURCES_DIR"])
    u.cp(kde_plasma_chili,
         "/usr/share/sddm/themes/plasma-chili",
         flags='r',
         root=True)

    with u.get_template("sddm/theme.conf.user").open() as f:
        sddm_theme_conf = f.read()
    sddm_theme_conf = sddm_theme_conf.replace("$BACKGROUND_IMAGE",
                                              G["DEFAULT_WALLPAPER"])

    default_wallpaper = G["WALLPAPER_DIR"] / G["DEFAULT_WALLPAPER"]

    # Create theme.user.conf (points to wallpaper) and move it to theme directory. Doing it weird like this because sudo is required.
    tmp_file = tempfile.NamedTemporaryFile("w", delete=False)
    tmp_file.write(sddm_theme_conf)
    tmp_file.close()
    u.cp(default_wallpaper, "/usr/share/sddm/themes/plasma-chili", root=True)
    tmp_file_path = Path(tmp_file.name)
    tmp_file_path.chmod(0o664)
    u.cp(tmp_file_path,
         "/usr/share/sddm/themes/plasma-chili/theme.conf.user",
         root=True)
    tmp_file_path.unlink()
コード例 #9
0
def pre(*args, **kwargs):
    prerequisites = ["xbindkeys", "xdotool", "ibus"]

    u.apt_install(
        prerequisites,
        "kinto prerequisites",
    )
    """
    logger.info(
        "You may be asked to start the IBus Daemon. Please answer yes. Then, close the preferences window that pops up after."
    )
    """
    u.run_shell("ibus-daemon -drx")
    # u.run_shell("ibus-setup", stderr_level=logging.DEBUG)
    u.run_shell("im-config -n ibus", stderr_level=logging.DEBUG)

    u.git_clone("https://github.com/rbreaves/kinto.git", G["SOURCES_DIR"])
    return True
コード例 #10
0
def pre_applet_window_appmenu():
    prerequisites = [
        "cmake",
        "extra-cmake-modules",
        "libkdecorations2-dev",
        "qtdeclarative5-dev",
        "libkf5windowsystem-dev",
        "libkf5plasma-dev",
        "libkf5configwidgets-dev",
        "libsm-dev",
        "libqt5x11extras5-dev",
    ]
    u.apt_install(
        prerequisites,
        "Window AppMenu plasmoid prerequisites",
    )
    u.git_clone("https://github.com/psifidotos/applet-window-appmenu.git",
                G["SOURCES_DIR"])
コード例 #11
0
ファイル: install.py プロジェクト: mybigman/macify-linux
def install_icons():
    logger.info("Installing icon packs.")

    u.git_clone("https://github.com/vinceliuice/McMojave-circle.git",
                G["SOURCES_DIR"])
    u.git_clone("https://github.com/zayronxio/Os-Catalina-icons",
                G["SOURCES_DIR"])

    # This install script does a lot... don't want to figure out/translate it into python right now.
    try:
        u.run_shell(
            "cd ~/sources/McMojave-circle/ && bash ./install.sh",
            stderr_level=logging.DEBUG,
        )
    except subprocess.CalledProcessError:
        logger.error("Unable to install McMojave-circle icon pack!")

    catalina_icons = Path("~/sources/Os-Catalina-icons").expanduser()
    u.cp(catalina_icons, G["ICONS_DIR"], "rf")
    """
コード例 #12
0
ファイル: albert.py プロジェクト: mybigman/macify-linux
def pre(*args, **kwargs):
    prerequisites = [
        "cmake",
        "libqt5x11extras5-dev",
        "libqt5svg5-dev",
        "qtdeclarative5-dev",
        "python3-distutils",
        "libqt5charts5-dev",
        "libmuparser-dev",
        "python3-dev",
        "python3-distutils",
    ]
    u.apt_install(
        prerequisites, "albert prerequisites",
    )
    u.git_clone(
        "https://github.com/Jonchun/albert.git",
        G["SOURCES_DIR"],
        flags="--branch MacifyLinux --recursive",
    )
    return True
コード例 #13
0
ファイル: install.py プロジェクト: mybigman/macify-linux
def install_fonts():
    logger.info("Installing SF fonts.")
    u.git_clone("https://github.com/blaisck/sfwin.git", G["SOURCES_DIR"])

    installed = 0
    sf_compact = Path("~/sources/sfwin/SFCompact").expanduser()
    installed += int(
        u.setup_symlink(sf_compact, G["FONTS_DIR"], target_is_directory=True))
    sf_mono = Path("~/sources/sfwin/SFMono").expanduser()
    installed += int(
        u.setup_symlink(sf_mono, G["FONTS_DIR"], target_is_directory=True))
    sf_pro = Path("~/sources/sfwin/SFPro").expanduser()
    installed += int(
        u.setup_symlink(sf_pro, G["FONTS_DIR"], target_is_directory=True))

    if installed > 0:
        logger.info(
            "Installed %s fonts. Refreshing font cache. This may take a while.",
            installed,
        )
        u.run_shell("fc-cache -fv")
    else:
        logger.warning(
            "No fonts were installed. They probably already existed.")
コード例 #14
0
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    u.plasmoid_install(
        G["SOURCES_DIR"] / Path(repo_name) / Path("org.kde.plasma.chiliclock")
    )
コード例 #15
0
def pre(*args, **kwargs):
    pre_applet_window_appmenu()
    u.git_clone("https://github.com/psifidotos/applet-window-title.git",
                G["SOURCES_DIR"])
    u.git_clone("https://github.com/psifidotos/applet-latte-spacer.git",
                G["SOURCES_DIR"])
    u.git_clone("https://github.com/psifidotos/applet-latte-separator.git",
                G["SOURCES_DIR"])
    u.git_clone("https://github.com/MarianArlt/kde-plasmoid-chiliclock.git",
                G["SOURCES_DIR"])
    u.git_clone("https://github.com/Polunom/mac-inline-battery.git",
                G["SOURCES_DIR"])
    u.git_clone(
        "https://github.com/psifidotos/applet-latte-sidebar-button.git",
        G["SOURCES_DIR"],
    )
    u.git_clone("https://github.com/Zren/plasma-applet-eventcalendar.git",
                G["SOURCES_DIR"])
    u.git_clone("https://gitlab.com/divinae/uswitch.git", G["SOURCES_DIR"])
    return True
コード例 #16
0
def install(*args, **kwargs):
    u.git_clone("https://github.com/MarianArlt/kde-plasma-chili.git", G["SOURCES_DIR"])
    # run install.sh
    u.bash_action(action="install", file=__file__, name=component_name)
    configure()
コード例 #17
0
ファイル: install.py プロジェクト: mybigman/macify-linux
def install_themes():
    logger.info("Installing KDE themes.")

    u.git_clone("https://github.com/vinceliuice/McMojave-kde.git",
                G["SOURCES_DIR"])

    mcmojave_kde = Path("~/sources/McMojave-kde").expanduser()

    u.setup_symlink(
        mcmojave_kde / Path("aurorae/McMojave"),
        G["AURORAE_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde / Path("aurorae/McMojave-light"),
        G["AURORAE_DIR"],
        target_is_directory=True,
    )

    u.setup_symlink(
        mcmojave_kde / Path("Kvantum/McMojave"),
        G["KVANTUM_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde / Path("Kvantum/McMojave-light"),
        G["KVANTUM_DIR"],
        target_is_directory=True,
    )

    u.setup_symlink(
        mcmojave_kde / Path("plasma/desktoptheme/McMojave"),
        G["PLASMA_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde / Path("plasma/desktoptheme/McMojave-light"),
        G["PLASMA_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde / Path("color-schemes/McMojave.colors"),
        G["PLASMA_DIR"] / Path("McMojave/colors"),
    )
    u.setup_symlink(
        mcmojave_kde / Path("color-schemes/McMojaveLight.colors"),
        G["PLASMA_DIR"] / Path("McMojave-light/colors"),
    )

    u.setup_symlink(
        mcmojave_kde / Path("color-schemes/McMojave.colors"),
        G["COLOR_SCHEMES_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde / Path("color-schemes/McMojaveLight.colors"),
        G["COLOR_SCHEMES_DIR"],
        target_is_directory=True,
    )

    u.setup_symlink(
        mcmojave_kde /
        Path("plasma/look-and-feel/com.github.vinceliuice.McMojave"),
        G["LOOK_FEEL_DIR"],
        target_is_directory=True,
    )
    u.setup_symlink(
        mcmojave_kde /
        Path("plasma/look-and-feel/com.github.vinceliuice.McMojave-light"),
        G["LOOK_FEEL_DIR"],
        target_is_directory=True,
    )

    panel_layout = mcmojave_kde / Path(
        "plasma/layout-templates/org.github.desktop.McMojavePanel")
    u.copy_file(
        panel_layout,
        G["LAYOUT_DIR"] / panel_layout.name,
        recursive=True,
    )
コード例 #18
0
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    u.plasmoid_install(G["SOURCES_DIR"] / Path(repo_name))
コード例 #19
0
ファイル: __init__.py プロジェクト: swipswaps/macify-linux
def install(*args, **kwargs):
    u.git_clone(repo_url, G["SOURCES_DIR"])
    u.plasmoid_install(G["SOURCES_DIR"] / Path(repo_name) / Path("package"),
                       pretty_name="uswitch")