mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-22 21:44:20 +02:00
Add login & logout script support
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
2901b408dc
commit
b5b3317dd8
4 changed files with 28 additions and 9 deletions
|
|
@ -698,6 +698,11 @@ pub fn main() !void {
|
|||
try info_line.addMessage(getAuthErrorMsg(err, lang), config.error_bg, config.error_fg);
|
||||
if (config.clear_password or err != error.PamAuthError) password.clear();
|
||||
} else {
|
||||
if (config.logout_cmd) |logout_cmd| {
|
||||
var logout_process = std.process.Child.init(&[_][]const u8{ "/bin/sh", "-c", logout_cmd }, allocator);
|
||||
_ = logout_process.spawnAndWait() catch .{};
|
||||
}
|
||||
|
||||
password.clear();
|
||||
try info_line.addMessage(lang.logout, config.bg, config.fg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue