index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-05-12 14:45:04 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-05-12 14:45:04 +0200 |
commit | 12dc55650d78dc41bbc0ab7013baa7b3ce61ec7c (patch) | |
tree | 945dd48af6c32e03f10aa14186149e92f2a120a1 /profiles/sway.py | |
parent | 1708f1850d5d620e7a44ab4da4a9c5c028f5008b (diff) | |
parent | df6c4e77f721da2b03a510548d281992b25987b2 (diff) |
-rw-r--r-- | profiles/sway.py | 41 |
diff --git a/profiles/sway.py b/profiles/sway.py index c3a6e31a..8e256a87 100644 --- a/profiles/sway.py +++ b/profiles/sway.py @@ -4,6 +4,20 @@ import archinstall is_top_level_profile = False +__packages__ = [ + "sway", + "swaylock", + "swayidle", + "waybar", + "dmenu", + "light", + "grim", + "slurp", + "pavucontrol", + "alacritty", +] + + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -11,19 +25,26 @@ def _prep_function(*args, **kwargs): other code in this stage. So it's a safe way to ask the user for more input before any other installer steps start. """ - if "nvidia" in _gfx_driver_packages: - choice = input("The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] ") - if choice.lower() in ("n", ""): - raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.") - - __builtins__['_gfx_driver_packages'] = archinstall.select_driver() + __builtins__["_gfx_driver_packages"] = archinstall.select_driver() return True + # Ensures that this code only gets executed if executed # through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py") # or through conventional import sway -if __name__ == 'sway': - # Install the application sway from the template under /applications/ - sway = archinstall.Application(installation, 'sway') - sway.install() +if __name__ == "sway": + if "nvidia" in _gfx_driver_packages: + choice = input( + "The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] " + ) + if choice.lower() in ("n", ""): + raise archinstall.lib.exceptions.HardwareIncompatibilityError( + "Sway does not support the proprietary nvidia drivers." + ) + + # Install the Sway packages + installation.add_additional_packages(__packages__) + + # Install the graphics driver packages + installation.add_additional_packages(_gfx_driver_packages) |