Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/sway.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-05-12 14:45:04 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-05-12 14:45:04 +0200
commit12dc55650d78dc41bbc0ab7013baa7b3ce61ec7c (patch)
tree945dd48af6c32e03f10aa14186149e92f2a120a1 /profiles/sway.py
parent1708f1850d5d620e7a44ab4da4a9c5c028f5008b (diff)
parentdf6c4e77f721da2b03a510548d281992b25987b2 (diff)
Merge branch 'master' of github.com:Torxed/archinstall into torxed-fix-350
Diffstat (limited to 'profiles/sway.py')
-rw-r--r--profiles/sway.py41
1 files changed, 31 insertions, 10 deletions
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)