From b9547beba72d82b388b6d34f9384784884f4f108 Mon Sep 17 00:00:00 2001 From: axtloss Date: Fri, 5 Aug 2022 15:30:12 +0200 Subject: [PATCH] Add new desktop environments and window managers --- src/args.rs | 18 ++++++ src/functions/desktops.rs | 126 ++++++++++++++++++++++++++++++++++++++ src/internal/config.rs | 6 ++ 3 files changed, 150 insertions(+) diff --git a/src/args.rs b/src/args.rs index b656852..eb21828 100644 --- a/src/args.rs +++ b/src/args.rs @@ -260,6 +260,24 @@ pub enum DesktopSetup { #[clap(name = "enlightenment")] Enlightenment, + #[clap(name = "lxqt")] + Lxqt, + + #[clap(name = "sway")] + Sway, + + #[clap(name = "i3gaps")] + I3gaps, + + #[clap(name = "herbstluftwm")] + Herbstluftwm, + + #[clap(name = "awesome")] + Awesome, + + #[clap(name = "bspwm")] + Bspwm, + #[clap(name = "None/DIY")] None, } diff --git a/src/functions/desktops.rs b/src/functions/desktops.rs index 9217b22..5f86e04 100755 --- a/src/functions/desktops.rs +++ b/src/functions/desktops.rs @@ -13,6 +13,12 @@ pub fn install_desktop_setup(desktop_setup: DesktopSetup) { DesktopSetup::Mate => install_mate(), DesktopSetup::Xfce => install_xfce(), DesktopSetup::Enlightenment => install_enlightenment(), + DesktopSetup::Lxqt => install_lxqt(), + DesktopSetup::Sway => install_sway(), + DesktopSetup::I3gaps => install_i3gaps(), + DesktopSetup::Herbstluftwm => install_herbstluftwm(), + DesktopSetup::Awesome => install_awesome(), + DesktopSetup::Bspwm => install_bspwm(), DesktopSetup::None => log::debug!("No desktop setup selected"), } install_networkmanager(); @@ -29,6 +35,126 @@ fn install_networkmanager() { ); } +fn install_bspwm() { + install(vec![ + "xorg", + "bspwm", + "sxhkd", + "xdo", + "lightdm", + "lightdm-gtk-greeter", + "lightdm-gtk-greeter-settings", + ]); + files_eval( + files::append_file( + "/mnt/etc/lightdm/lightdm.conf", + "[SeatDefaults]\ngreeter-session=lightdm-gtk-greeter\n", + ), + "Add lightdm greeter", + ); + enable_dm("lightdm"); +} + +fn install_awesome() { + install(vec![ + "xorg", + "awesome", + "dex", + "rlwrap", + "vicious", + "lightdm", + "lightdm-gtk-greeter", + "lightdm-gtk-greeter-settings", + ]); + files_eval( + files::append_file( + "/mnt/etc/lightdm/lightdm.conf", + "[SeatDefaults]\ngreeter-session=lightdm-gtk-greeter\n", + ), + "Add lightdm greeter", + ); + enable_dm("lightdm"); +} + +fn install_herbstluftwm() { + install(vec![ + "xorg", + "herbstluftwm", + "dmenu", + "dzen2", + "xorg-xsetroot", + "xterm", + "lightdm", + "lightdm-gtk-greeter", + "lightdm-gtk-greeter-settings", + ]); + files_eval( + files::append_file( + "/mnt/etc/lightdm/lightdm.conf", + "[SeatDefaults]\ngreeter-session=lightdm-gtk-greeter\n", + ), + "Add lightdm greeter", + ); + enable_dm("lightdm"); +} + +fn install_i3gaps() { + install(vec![ + "xorg", + "i3-gaps", + "dmenu", + "i3lock", + "i3status", + "rxvt-unicode", + "lightdm", + "lightdm-gtk-greeter", + "lightdm-gtk-greeter-settings", + ]); + files_eval( + files::append_file( + "/mnt/etc/lightdm/lightdm.conf", + "[SeatDefaults]\ngreeter-session=lightdm-gtk-greeter\n", + ), + "Add lightdm greeter", + ); + enable_dm("lightdm"); +} + +fn install_sway() { + install(vec![ + "xorg-xwayland", + "sway", + "bemenu", + "foot", + "mako", + "polkit", + "swaybg", + "lightdm", + "lightdm-gtk-greeter", + "lightdm-gtk-greeter-settings", + ]); + files_eval( + files::append_file( + "/mnt/etc/lightdm/lightdm.conf", + "[SeatDefaults]\ngreeter-session=lightdm-gtk-greeter\n", + ), + "Add lightdm greeter", + ); + enable_dm("lightdm"); +} + +fn install_lxqt() { + install(vec![ + "xorg", + "lxqt", + "breeze-icons", + "nm-tray", + "xscreensaver", + "sddm", + ]); + enable_dm("sddm"); +} + fn install_enlightenment() { install(vec![ "xorg", diff --git a/src/internal/config.rs b/src/internal/config.rs index 080383d..09655b0 100755 --- a/src/internal/config.rs +++ b/src/internal/config.rs @@ -166,6 +166,12 @@ pub fn read_config(configpath: PathBuf) { "xfce" => desktops::install_desktop_setup(DesktopSetup::Xfce), "budgie" => desktops::install_desktop_setup(DesktopSetup::Budgie), "enlightenment" => desktops::install_desktop_setup(DesktopSetup::Enlightenment), + "lxqt" => desktops::install_desktop_setup(DesktopSetup::Lxqt), + "sway" => desktops::install_desktop_setup(DesktopSetup::Sway), + "i3-gaps" => desktops::install_desktop_setup(DesktopSetup::I3gaps), + "herbstluftwm" => desktops::install_desktop_setup(DesktopSetup::Herbstluftwm), + "awesome" => desktops::install_desktop_setup(DesktopSetup::Awesome), + "bspwm" => desktops::install_desktop_setup(DesktopSetup::Bspwm), "None/DIY" => desktops::install_desktop_setup(DesktopSetup::None), _ => log::info!("No desktop setup selected!"), }