mirror of
https://github.com/coastalwhite/lemurs
synced 2024-11-29 13:10:16 +00:00
Refactor: Format code
This commit is contained in:
parent
9d9b37a2ec
commit
c2f257a0be
4 changed files with 13 additions and 9 deletions
|
@ -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};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<dyn Error>> {
|
|||
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}");
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue