Exemple #1
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
Exemple #2
0
def run():
    configure_logging()
    u.get_sudo()
    logger.info(
        "Only basic information will be output on screen. To see full debug logs, you can tail -f macifylinux.log."
    )
    install_prerequisites()

    # Make sure all of the local directories we want to use exist.
    for local_dir in G["LOCAL_DIRS"]:
        local_dir.mkdir(parents=True, exist_ok=True)

    modules = []
    # install Kinto(hotkeys module) first because it requires user interaction.
    modules.append(m.hotkeys)
    # modules.append((m.lookandfeel, [], {"style": "light"}))
    modules.append(m.lookandfeel)
    # spotlight should be installed after lookandfeel because it needs access to the installed icons
    # modules.append(m.spotlight)
    modules.append(m.plasmoids)
    # dockandpanel should be installed AFTER plasmoids because latte-dock depends on the installed plasmoids.
    modules.append(m.dockandpanel)

    for module in modules:
        args = []
        kwargs = {}
        if isinstance(module, tuple):
            module, args, kwargs = module

        pretty_name = module.__doc__
        if not pretty_name:
            pretty_name = module.__name__
        logger.info("Installing module: %s", pretty_name)
        module_build_reqs = u.get_module_build_requirements(module)
        module_reqs = u.get_module_requirements(module)
        logger.debug("%s", module_reqs)
        u.apt_install(module_build_reqs,
                      "{} build requirements".format(pretty_name))
        u.apt_install(module_reqs, "{} requirements".format(pretty_name))
        module.install(*args, **kwargs)

        # if module.pre(*args, **kwargs):
        #     module.run(*args, **kwargs)
        # else:
        #     logger.error(
        #         "Problem while processing prerequisites for: %s", module.__name__
        #     )

    logger.info("Setup Complete. Please restart your machine.")
Exemple #3
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
Exemple #4
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"])
Exemple #5
0
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
Exemple #6
0
def install(*args, **kwargs):
    from_source = kwargs.get("from_source", False)
    if from_source:
        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,
        )
    else:
        u.apt_install(["latte-dock"])

    # 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()
Exemple #7
0
def install_prerequisites():
    u.apt_update()
    u.apt_install(
        ["build-essential", "git", "software-properties-common"],
        "General Dependencies",
    )
Exemple #8
0
def install_window_decorations():
    u.apt_add_ppa("krisives/kde-hello")
    u.apt_install(["kde-hello"], "kde-hello window decorations")