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);