mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-27 07:50:45 +02:00
config: Add grab_focus_tty (closes #1039)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
95a1bca7de
commit
32dd0967ba
3 changed files with 12 additions and 1 deletions
|
|
@ -67,6 +67,7 @@ gameoflife_frame_delay: usize = 6,
|
|||
gameoflife_initial_density: f32 = 0.4,
|
||||
gameoflife_param_birth: []const u8 = "3",
|
||||
gameoflife_param_survival: []const u8 = "23",
|
||||
grab_focus_tty: ?u8 = null,
|
||||
hide_borders: bool = false,
|
||||
inactivity_cmd: ?[]const u8 = null,
|
||||
inactivity_delay: u16 = 0,
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,10 @@ pub fn main(init: std.process.Init) !void {
|
|||
);
|
||||
break :no_tty_found build_options.fallback_tty;
|
||||
};
|
||||
if (!state.use_kmscon_vt) {
|
||||
if (!state.use_kmscon_vt) switch_tty: {
|
||||
if (state.config.grab_focus_tty) |tty| {
|
||||
if (tty != state.active_tty) break :switch_tty;
|
||||
}
|
||||
interop.switchTty(state.active_tty) catch |err| {
|
||||
try state.info_line.addMessage(
|
||||
state.lang.err_switch_tty,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue