From 0934f4c3e74340c50b3d56bd3b2c1c2ace553e68 Mon Sep 17 00:00:00 2001 From: m1ten <57693631+m1ten@users.noreply.github.com> Date: Sun, 4 Apr 2021 12:57:24 -0400 Subject: Create cinnamon.py --- profiles/cinnamon.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 profiles/cinnamon.py (limited to 'profiles') diff --git a/profiles/cinnamon.py b/profiles/cinnamon.py new file mode 100644 index 00000000..e9c5d085 --- /dev/null +++ b/profiles/cinnamon.py @@ -0,0 +1,33 @@ +# A desktop environment using "Cinnamon" + +import archinstall + +def _prep_function(*args, **kwargs): + """ + Magic function called by the importing installer + before continuing any further. It also avoids executing any + other code in this stage. So it's a safe way to ask the user + for more input before any other installer steps start. + """ + + # Cinnamon optionally supports xorg, we'll install it since it also + # includes graphic driver setups (this might change in the future) + profile = archinstall.Profile(None, 'xorg') + with profile.load_instructions(namespace='xorg.py') as imported: + if hasattr(imported, '_prep_function'): + return imported._prep_function() + else: + print('Deprecated (??): xorg profile has no _prep_function() anymore') + +# Ensures that this code only gets executed if executed +# through importlib.util.spec_from_file_location("cinnamon", "/somewhere/cinnamon.py") +# or through conventional import cinnamon +if __name__ == 'cinnamon': + # Install dependency profiles + installation.install_profile('xorg') + + # Install the application cinnamon from the template under /applications/ + cinnamon = archinstall.Application(installation, 'cinnamon') + cinnamon.install() + + installation.enable_service('lightdm') # Light Display Manager -- cgit v1.2.3-70-g09d2 From 5ec1e1d4f5bd7844aa3d42c093a2e59e7cebb859 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 16:53:20 -0400 Subject: Fix incorrect comment. Cinnamon doesn't have any Wayland support yet. --- profiles/cinnamon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'profiles') diff --git a/profiles/cinnamon.py b/profiles/cinnamon.py index e9c5d085..dac38bd3 100644 --- a/profiles/cinnamon.py +++ b/profiles/cinnamon.py @@ -10,8 +10,7 @@ def _prep_function(*args, **kwargs): for more input before any other installer steps start. """ - # Cinnamon optionally supports xorg, we'll install it since it also - # includes graphic driver setups (this might change in the future) + # Cinnamon requires a functioning Xorg installation. profile = archinstall.Profile(None, 'xorg') with profile.load_instructions(namespace='xorg.py') as imported: if hasattr(imported, '_prep_function'): -- cgit v1.2.3-70-g09d2 From dfec4b77fd948317108a8306347b1bf74f82042c Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Thu, 8 Apr 2021 15:35:33 -0400 Subject: Integrate cinnamon with changes on master. --- profiles/cinnamon.py | 2 ++ profiles/desktop.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'profiles') diff --git a/profiles/cinnamon.py b/profiles/cinnamon.py index dac38bd3..91a59811 100644 --- a/profiles/cinnamon.py +++ b/profiles/cinnamon.py @@ -2,6 +2,8 @@ import archinstall +is_top_level_profile = False + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer diff --git a/profiles/desktop.py b/profiles/desktop.py index 1e914546..4a31399a 100644 --- a/profiles/desktop.py +++ b/profiles/desktop.py @@ -16,7 +16,7 @@ def _prep_function(*args, **kwargs): for more input before any other installer steps start. """ - supported_desktops = ['gnome', 'kde', 'awesome', 'sway'] + supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon'] desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ') # Temporarily store the selected desktop profile -- cgit v1.2.3-70-g09d2 From c2c112625414e23bc15da083c06c97750bfa154d Mon Sep 17 00:00:00 2001 From: m1ten <57693631+m1ten@users.noreply.github.com> Date: Sat, 3 Apr 2021 16:17:51 -0400 Subject: xfce4 --- profiles/xfce4.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 profiles/xfce4.py (limited to 'profiles') diff --git a/profiles/xfce4.py b/profiles/xfce4.py new file mode 100644 index 00000000..040f29bd --- /dev/null +++ b/profiles/xfce4.py @@ -0,0 +1,34 @@ + +# A desktop environment using "Xfce4" + +import archinstall + +def _prep_function(*args, **kwargs): + """ + Magic function called by the importing installer + before continuing any further. It also avoids executing any + other code in this stage. So it's a safe way to ask the user + for more input before any other installer steps start. + """ + + # Gnome optionally supports xorg, we'll install it since it also + # includes graphic driver setups (this might change in the future) + profile = archinstall.Profile(None, 'xorg') + with profile.load_instructions(namespace='xorg.py') as imported: + if hasattr(imported, '_prep_function'): + return imported._prep_function() + else: + print('Deprecated (??): xorg profile has no _prep_function() anymore') + +# Ensures that this code only gets executed if executed +# through importlib.util.spec_from_file_location("xfce4", "/somewhere/xfce4.py") +# or through conventional import gnome +if __name__ == 'xfce4': + # Install dependency profiles + installation.install_profile('xorg') + + # Install the application xfce4 from the template under /applications/ + xfce = archinstall.Application(installation, 'xfce4') + xfce.install() + + installation.enable_service('lightdm') # Light Display Manager -- cgit v1.2.3-70-g09d2 From eb7497f2aada18ba5d992fa890503782aefea726 Mon Sep 17 00:00:00 2001 From: m1ten <57693631+m1ten@users.noreply.github.com> Date: Sat, 3 Apr 2021 17:58:25 -0400 Subject: Update xfce4.py --- profiles/xfce4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profiles') diff --git a/profiles/xfce4.py b/profiles/xfce4.py index 040f29bd..1cc4a62d 100644 --- a/profiles/xfce4.py +++ b/profiles/xfce4.py @@ -22,7 +22,7 @@ def _prep_function(*args, **kwargs): # Ensures that this code only gets executed if executed # through importlib.util.spec_from_file_location("xfce4", "/somewhere/xfce4.py") -# or through conventional import gnome +# or through conventional import xfce4 if __name__ == 'xfce4': # Install dependency profiles installation.install_profile('xorg') -- cgit v1.2.3-70-g09d2 From 84e6db27bb0454625873db85e0e58e35b5333901 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 6 Apr 2021 16:55:04 -0400 Subject: Fix another incorrect comment on XFCE4 profile --- profiles/xfce4.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'profiles') diff --git a/profiles/xfce4.py b/profiles/xfce4.py index 1cc4a62d..36c9958a 100644 --- a/profiles/xfce4.py +++ b/profiles/xfce4.py @@ -11,8 +11,7 @@ def _prep_function(*args, **kwargs): for more input before any other installer steps start. """ - # Gnome optionally supports xorg, we'll install it since it also - # includes graphic driver setups (this might change in the future) + # XFCE requires a functional xorg installation. profile = archinstall.Profile(None, 'xorg') with profile.load_instructions(namespace='xorg.py') as imported: if hasattr(imported, '_prep_function'): -- cgit v1.2.3-70-g09d2 From 72f3423798586430b1849083e3a4ae65013ad613 Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Thu, 8 Apr 2021 15:41:08 -0400 Subject: Integrate XFCE4 with master --- profiles/desktop.py | 2 +- profiles/xfce4.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'profiles') diff --git a/profiles/desktop.py b/profiles/desktop.py index 4a31399a..d552a17f 100644 --- a/profiles/desktop.py +++ b/profiles/desktop.py @@ -16,7 +16,7 @@ def _prep_function(*args, **kwargs): for more input before any other installer steps start. """ - supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon'] + supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4'] desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ') # Temporarily store the selected desktop profile diff --git a/profiles/xfce4.py b/profiles/xfce4.py index 36c9958a..fee8c37a 100644 --- a/profiles/xfce4.py +++ b/profiles/xfce4.py @@ -3,6 +3,8 @@ import archinstall +is_top_level_profile = False + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer -- cgit v1.2.3-70-g09d2