diff --git a/lemurs-core/src/post_login/mod.rs b/lemurs-core/src/post_login/mod.rs index 82176d7..00679c2 100644 --- a/lemurs-core/src/post_login/mod.rs +++ b/lemurs-core/src/post_login/mod.rs @@ -10,9 +10,9 @@ use users::get_user_groups; use std::os::unix::process::CommandExt; use std::process::{Child, Command, Stdio}; -use crate::{ShellLoginFlag, LemursConfig}; use crate::auth::AuthUserInfo; use crate::post_login::x::setup_x; +use crate::{LemursConfig, ShellLoginFlag}; use env_container::EnvironmentContainer; use nix::unistd::{Gid, Uid}; diff --git a/lemurs-core/src/post_login/x.rs b/lemurs-core/src/post_login/x.rs index 7e406c4..9f99d9f 100644 --- a/lemurs-core/src/post_login/x.rs +++ b/lemurs-core/src/post_login/x.rs @@ -15,9 +15,9 @@ use std::path::{Path, PathBuf}; use log::{error, info}; -use crate::LemursConfig; use crate::auth::AuthUserInfo; use crate::post_login::output_command_to_log; +use crate::LemursConfig; use env_container::EnvironmentContainer; const XSTART_CHECK_INTERVAL_MILLIS: u64 = 100; diff --git a/lemurs-tui/src/main.rs b/lemurs-tui/src/main.rs index c712b24..7789518 100644 --- a/lemurs-tui/src/main.rs +++ b/lemurs-tui/src/main.rs @@ -17,8 +17,8 @@ mod config; mod info_caching; mod ui; -use config::Config; use crate::cli::{Cli, Commands}; +use config::Config; const DEFAULT_CONFIG_PATH: &str = "/etc/lemurs/config.toml"; const PREVIEW_LOG_PATH: &str = "lemurs.log"; @@ -80,7 +80,9 @@ fn main() -> Result<(), Box> { if let Some(cmd) = cli.command { match cmd { Commands::Envs => { - let envs = lemurs_core::post_login::get_envs(config.environment_switcher.include_tty_shell); + let envs = lemurs_core::post_login::get_envs( + config.environment_switcher.include_tty_shell, + ); for (env_name, _) in envs.into_iter() { println!("{env_name}"); diff --git a/lemurs-tui/src/ui/mod.rs b/lemurs-tui/src/ui/mod.rs index d41c6b4..fe1e46c 100644 --- a/lemurs-tui/src/ui/mod.rs +++ b/lemurs-tui/src/ui/mod.rs @@ -5,8 +5,8 @@ use std::sync::mpsc::channel; use std::sync::{Arc, Mutex, MutexGuard}; use std::time::Duration; -use lemurs_core::{start_session, Hooks, StartSessionError, LemursConfig}; use lemurs_core::post_login::PostLoginEnvironment; +use lemurs_core::{start_session, Hooks, LemursConfig, StartSessionError}; use crate::config::{Config, FocusBehaviour}; use crate::info_caching::{get_cached_information, set_cache}; @@ -271,10 +271,12 @@ impl LoginForm { widgets: Widgets { power_menu: PowerMenuWidget::new(config.power_controls.clone()), environment: Arc::new(Mutex::new(SwitcherWidget::new( - lemurs_core::post_login::get_envs(config.environment_switcher.include_tty_shell) - .into_iter() - .map(|(title, content)| SwitcherItem::new(title, content)) - .collect(), + lemurs_core::post_login::get_envs( + config.environment_switcher.include_tty_shell, + ) + .into_iter() + .map(|(title, content)| SwitcherItem::new(title, content)) + .collect(), config.environment_switcher.clone(), ))), username: Arc::new(Mutex::new(InputFieldWidget::new(