mirror of
https://github.com/fairyglade/ly.git
synced 2026-02-04 08:24:55 +00:00
Add config.x_vt option (fixes #910)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -20,6 +20,7 @@ pub const AuthOptions = struct {
|
||||
setup_cmd: []const u8,
|
||||
login_cmd: ?[]const u8,
|
||||
x_cmd: []const u8,
|
||||
x_vt: ?u8,
|
||||
session_pid: std.posix.pid_t,
|
||||
};
|
||||
|
||||
@@ -189,7 +190,7 @@ fn startSession(
|
||||
.wayland, .shell, .custom => try executeCmd(log_file, allocator, user_entry.shell.?, options, current_environment.is_terminal, current_environment.cmd),
|
||||
.xinitrc, .x11 => if (build_options.enable_x11_support) {
|
||||
var vt_buf: [5]u8 = undefined;
|
||||
const vt = try std.fmt.bufPrint(&vt_buf, "vt{d}", .{options.tty});
|
||||
const vt = try std.fmt.bufPrint(&vt_buf, "vt{d}", .{options.x_vt orelse options.tty});
|
||||
try executeX11Cmd(log_file, allocator, user_entry.shell.?, user_entry.home.?, options, current_environment.cmd orelse "", vt);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ vi_default_mode: ViMode = .normal,
|
||||
vi_mode: bool = false,
|
||||
waylandsessions: []const u8 = build_options.prefix_directory ++ "/share/wayland-sessions",
|
||||
x_cmd: []const u8 = build_options.prefix_directory ++ "/bin/X",
|
||||
x_vt: ?u8 = null,
|
||||
xauth_cmd: []const u8 = build_options.prefix_directory ++ "/bin/xauth",
|
||||
xinitrc: ?[]const u8 = "~/.xinitrc",
|
||||
xsessions: []const u8 = build_options.prefix_directory ++ "/share/xsessions",
|
||||
|
||||
@@ -1086,6 +1086,7 @@ pub fn main() !void {
|
||||
.setup_cmd = config.setup_cmd,
|
||||
.login_cmd = config.login_cmd,
|
||||
.x_cmd = config.x_cmd,
|
||||
.x_vt = config.x_vt,
|
||||
.session_pid = session_pid,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user