Skip to content

Commit

Permalink
Parse gecos csv
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Oct 25, 2023
1 parent 8645382 commit 8a9d836
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/greeter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand Down Expand Up @@ -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),
);
Expand Down
3 changes: 2 additions & 1 deletion src/locker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand Down

0 comments on commit 8a9d836

Please sign in to comment.