mirror of
https://github.com/fairyglade/ly.git
synced 2026-02-04 00:14:55 +00:00
Add config.x_vt option (fixes #910)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -359,6 +359,11 @@ waylandsessions = $PREFIX_DIRECTORY/share/wayland-sessions
|
|||||||
# Xorg server command
|
# Xorg server command
|
||||||
x_cmd = $PREFIX_DIRECTORY/bin/X
|
x_cmd = $PREFIX_DIRECTORY/bin/X
|
||||||
|
|
||||||
|
# Xorg virtual terminal number
|
||||||
|
# Mostly useful for FreeBSD where choosing the current TTY causes issues
|
||||||
|
# If null, the current TTY will be chosen
|
||||||
|
x_vt = null
|
||||||
|
|
||||||
# Xorg xauthority edition tool
|
# Xorg xauthority edition tool
|
||||||
xauth_cmd = $PREFIX_DIRECTORY/bin/xauth
|
xauth_cmd = $PREFIX_DIRECTORY/bin/xauth
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ pub const AuthOptions = struct {
|
|||||||
setup_cmd: []const u8,
|
setup_cmd: []const u8,
|
||||||
login_cmd: ?[]const u8,
|
login_cmd: ?[]const u8,
|
||||||
x_cmd: []const u8,
|
x_cmd: []const u8,
|
||||||
|
x_vt: ?u8,
|
||||||
session_pid: std.posix.pid_t,
|
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),
|
.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) {
|
.xinitrc, .x11 => if (build_options.enable_x11_support) {
|
||||||
var vt_buf: [5]u8 = undefined;
|
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);
|
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,
|
vi_mode: bool = false,
|
||||||
waylandsessions: []const u8 = build_options.prefix_directory ++ "/share/wayland-sessions",
|
waylandsessions: []const u8 = build_options.prefix_directory ++ "/share/wayland-sessions",
|
||||||
x_cmd: []const u8 = build_options.prefix_directory ++ "/bin/X",
|
x_cmd: []const u8 = build_options.prefix_directory ++ "/bin/X",
|
||||||
|
x_vt: ?u8 = null,
|
||||||
xauth_cmd: []const u8 = build_options.prefix_directory ++ "/bin/xauth",
|
xauth_cmd: []const u8 = build_options.prefix_directory ++ "/bin/xauth",
|
||||||
xinitrc: ?[]const u8 = "~/.xinitrc",
|
xinitrc: ?[]const u8 = "~/.xinitrc",
|
||||||
xsessions: []const u8 = build_options.prefix_directory ++ "/share/xsessions",
|
xsessions: []const u8 = build_options.prefix_directory ++ "/share/xsessions",
|
||||||
|
|||||||
@@ -1086,6 +1086,7 @@ pub fn main() !void {
|
|||||||
.setup_cmd = config.setup_cmd,
|
.setup_cmd = config.setup_cmd,
|
||||||
.login_cmd = config.login_cmd,
|
.login_cmd = config.login_cmd,
|
||||||
.x_cmd = config.x_cmd,
|
.x_cmd = config.x_cmd,
|
||||||
|
.x_vt = config.x_vt,
|
||||||
.session_pid = session_pid,
|
.session_pid = session_pid,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user