mirror of https://github.com/fairyglade/ly.git
Continue merge
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
commit
5ea780f806
|
@ -19,6 +19,11 @@ clear_password = false
|
|||
# Enable vi keybindings
|
||||
vi_mode = false
|
||||
|
||||
# Default vi mode
|
||||
# normal -> normal mode
|
||||
# insert -> insert mode
|
||||
vi_default_mode = normal
|
||||
|
||||
# The `fg` and `bg` color settings take a digit 0-8 corresponding to:
|
||||
#define TB_DEFAULT 0x00
|
||||
#define TB_BLACK 0x01
|
||||
|
|
|
@ -3,6 +3,7 @@ const enums = @import("../enums.zig");
|
|||
|
||||
const Animation = enums.Animation;
|
||||
const Input = enums.Input;
|
||||
const ViMode = enums.ViMode;
|
||||
|
||||
animation: Animation = .none,
|
||||
asterisk: u8 = '*',
|
||||
|
@ -45,6 +46,7 @@ term_reset_cmd: [:0]const u8 = "/usr/bin/tput reset",
|
|||
term_restore_cursor_cmd: []const u8 = "/usr/bin/tput cnorm",
|
||||
tty: u8 = build_options.tty,
|
||||
vi_mode: bool = false,
|
||||
vi_default_mode: ViMode = .normal,
|
||||
wayland_cmd: []const u8 = build_options.data_directory ++ "/wsetup.sh",
|
||||
waylandsessions: []const u8 = "/usr/share/wayland-sessions",
|
||||
x_cmd: []const u8 = "/usr/bin/X",
|
||||
|
|
|
@ -16,3 +16,8 @@ pub const Input = enum {
|
|||
login,
|
||||
password,
|
||||
};
|
||||
|
||||
pub const ViMode = enum {
|
||||
normal,
|
||||
insert,
|
||||
};
|
||||
|
|
|
@ -194,7 +194,7 @@ pub fn main() !void {
|
|||
defer password.deinit();
|
||||
|
||||
var active_input = config.default_input;
|
||||
var insert_mode = !config.vi_mode;
|
||||
var insert_mode = !config.vi_mode or config.vi_default_mode == .insert;
|
||||
|
||||
// Load last saved username and desktop selection, if any
|
||||
if (config.load) {
|
||||
|
|
Loading…
Reference in New Issue