diff --git a/src/greeter.rs b/src/greeter.rs index 31d26bc..ee5af64 100644 --- a/src/greeter.rs +++ b/src/greeter.rs @@ -508,8 +508,9 @@ impl cosmic::Application for App { } match &user.gecos { Some(gecos) => { + let full_name = gecos.split(",").next().unwrap_or(""); column = column.push( - widget::container(widget::text::title4(gecos)) + widget::container(widget::text::title4(full_name)) .width(Length::Fill) .align_x(alignment::Horizontal::Center), ); @@ -541,8 +542,9 @@ impl cosmic::Application for App { } match &user.gecos { Some(gecos) => { + let full_name = gecos.split(",").next().unwrap_or(""); column = column.push( - widget::container(widget::text::title4(gecos)) + widget::container(widget::text::title4(full_name)) .width(Length::Fill) .align_x(alignment::Horizontal::Center), ); diff --git a/src/locker.rs b/src/locker.rs index 6584c1e..e2f1eed 100644 --- a/src/locker.rs +++ b/src/locker.rs @@ -529,8 +529,9 @@ impl cosmic::Application for App { } match &self.flags.current_user.gecos { Some(gecos) => { + let full_name = gecos.split(",").next().unwrap_or(""); column = column.push( - widget::container(widget::text::title4(gecos)) + widget::container(widget::text::title4(full_name)) .width(Length::Fill) .align_x(alignment::Horizontal::Center), );