From 96aaa7885095a43126918615a3562c6ae39e020f Mon Sep 17 00:00:00 2001 From: axtlos Date: Sat, 14 May 2022 23:44:31 +0200 Subject: [PATCH] fix de issue in config --- PKGBUILD | 2 +- src/internal/config.rs | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index af780ad..34c4565 100755 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Matt C pkgname=jade -pkgver=1.0.3 +pkgver=1.0.4 pkgrel=2 pkgdesc="Scriptable backend & TUI Installer for Crystal Linux" arch=('x86_64') diff --git a/src/internal/config.rs b/src/internal/config.rs index a0f1256..7768d9f 100755 --- a/src/internal/config.rs +++ b/src/internal/config.rs @@ -13,7 +13,7 @@ struct Config { networking: Networking, users: Vec, rootpass: String, - desktop: Option, + desktop: String, timeshift: bool, flatpak: bool, extra_packages: Vec, @@ -137,8 +137,20 @@ pub fn read_config(configpath: PathBuf) { users::root_pass(config.rootpass.as_str()); println!(); log::info!("Installing desktop : {:?}", config.desktop); - if let Some(desktop) = &config.desktop { + /*if let Some(desktop) = &config.desktop { desktops::install_desktop_setup(*desktop); + }*/ + match config.desktop.as_str() { + "onyx" => desktops::install_desktop_setup(DesktopSetup::Onyx), + "plasma" => desktops::install_desktop_setup(DesktopSetup::Kde), + "mate" => desktops::install_desktop_setup(DesktopSetup::Mate), + "gnome" => desktops::install_desktop_setup(DesktopSetup::Gnome), + "cinnamon" => desktops::install_desktop_setup(DesktopSetup::Cinnamon), + "xfce" => desktops::install_desktop_setup(DesktopSetup::Xfce), + "budgie" => desktops::install_desktop_setup(DesktopSetup::Budgie), + "enlightenment" => desktops::install_desktop_setup(DesktopSetup::Enlightenment), + "None/DIY" => desktops::install_desktop_setup(DesktopSetup::None), + _ => log::info!("No desktop setup selected!"), } println!(); log::info!("Enabling timeshift : {}", config.timeshift);